How to use PFCG in the sap

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值