文章目录
1.PFCG Introduce
More specifically, a role within transaction PFCG is a set of transactions that persons within specific roles would need for their daily work. In this example, a sales person could have a role that requires transactions to add new customers, display customer details, or to enter a new lead.
2. Procedure
2.1 Enter T-code PFCG and give a new name and choose Single Role.
We have to maintain The Menu, Authorization and User (If you want to maintain workflow, then you can maintain).
2.2 Choose Memu
Suppose you want to give the authorization for ZRMM162. In the tab choose Transaction and input zrmm162 and Assign Trasation.
2.3 go to Authorization tab
Here you have use a profile name for this role.
You can use the profile name as you wish or you can select Propose profile name to click the option .
Suppose you company code X in the field .otherwise you don’t need choose Expert mode for profile Generaton.
2.4 Now press the user tab.
Here just give the user id in the field '‘usr ID’ to whom you want to give the authorization .
At last : please save it .
3. How to authorize
3.1 Method 1
we add it in the code
CLEAR:zbz.
IF r2 = 'X'.
SELECT SINGLE * FROM agr_users WHERE uname = sy-uname AND agr_name = 'Z_AU_ZRPP015T'.
IF sy-subrc <> 0.
MESSAGE s001(00) WITH '没有数据维护权限'.
zbz = 'X'.
ENDIF.
ENDIF.
3.2 Method 2
we will add it in the user maintenance.
3.3 Summarry
Method2 is that need add the role in all use . it is not opimal.