ABAP: adds the sap_all permission to the user.

Source: Internet
Author: User

You can add the sap_all permission to the user. The report can be used to manage user permissions by basis and ABAP developers.

Report ztestcreateuser.

Data: l_usr04 like usr04,

Rochelle ust04 like ust04,

Rochelle profs like USR04-PROFS,

Rochelle usrbf2 like usrbf2 occurs 0 with header line,

Rochelle 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.

Rochelle 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 = maid.

Modify l_usrbf2 index sy-tabix transporting bname.

Endloop.

Insert usrbf2 from Table l_usrbf2 accepting duplicate keys.

Pasted from

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.