User Authority Check... .

User Authority Check
---
About Authorty Common T-Code:

SU01:Assign profile=>就是创建用户然后分配权限的profile
SU02:Creating profile=>创建profile
SU03:Creating authorization=>创建权限
PFCG:Role Maintain=>角色的维护
SU21:List of object class=>在这里创建object class
SU22:List of transaction with check object=>把事务代码相关的check object找出来
SU24:Maintain assignment of authorization object of transaction=>根据事务代码找到相关的authority object.
SU25:我没有权限使用,就是复制系统标准的profile
SUIM:Display a generated authorization profile
SU53:Display authorization data for user=>列出用户的权限
SM59:Display and Maintain RFC Destinations => 远程登录

---
Authority Check Type List:
    (1). Transcation Run Check.
   Create T-Code, you can in [Authorization Object] Field there Input Authority Object and Set Value Field.If User

want run the corresponding T-Code, User must have the corresponding authority,else user run the T-Code ,system will show

message.
    (2). Program Run Check.
   In the ABAP Program Attributes,Input Authorization Groups Attribute, Authorization Group and S_Develop and

S_Program Authorization Object 's P_Group Field Correlation.Via Check the Field and User Master Record's Corresponding value

to decide user whether run this program.
    (3). Inside Program Authorization Check.
   If System Can not automatic control user run the program's Authorization, You may also use inside program check

authorization.
 Check Like this:
 Authority-Check Object 'Object_Name'
   ID   'Field_Name1'     Field  F1
   ID   'Field_Name2'     Field     F2

 If you not want check some field,you can set:
   ID   'Field_Name'      Dummy


Step 1: Use T-Code:SU21 Crate a Atuhority Object Class
     e.g:  ZZW01

Step 2: Use T-Code: PFCG  Or SU02->TO Profile Generator.
       
  Authorizations -> Change Authorization Data ->Manually(At Menu Bar) ->Authorization Object ->ZZW01

Step 3: Codeing.

---Complete Program: ZZW_AUTHORITY_CHECK

*-----------------------------------------------------------------------
*
*  Company ASAT Company Limited
*
*  ProgrameName:  ZZW_AUTHORITY_CHECK
*
*  Author: Wei_Zhu
*
*  Date: 06/01/2007
*
*  Description: Study SAP In Programe How To Check Control User
*               Authority.
*
*-----------------------------------------------------------------------
REPORT  ZZW_AUTHORITY_CHECK                     .
  Parameters: P_Carrid  Type Sflight-Carrid.

  Authority-Check  Object 'ZZW01'
           ID 'CARRID' Field P_CARRID
           ID 'ACTVT'  Field '999'.

if SY-SUBRC = 4.
  Message e045(sabapdocu) with p_carrid.
elseif sy-subrc <> 0.
*  message e045(sabapdocu) with 'Error!'.
  message e045(sabapdocu) with sy-subrc.
endif.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值