‎2014 May 26 4:04 PM
Hi all
Does anyone know tell me which table I check the check the program authority.
Thanks,
‎2014 May 26 6:48 PM
As in transaction SU24 we managed to get a check which objects are active in transactions, I would like to know if there is a way to do a check on programs.
‎2014 May 27 8:20 AM
1. To create authorization field - SU20.
2. To create authorization class and authorization object - SU21.
3. Create roles - PFCG . This might have to be done by BASIS.
Assign the values allowed for the fields in authorization object for that role.
4. Finally, check authorization in program .
Example if its authorization to execute a transaction ZTCODE, include this in the program for ZTCODE.
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD 'ZTCODE'.
‎2014 May 27 8:10 AM
Hi Rodrigo,
Use following code to get it done in programs.
Say, for object V_VBAK_VKO (which you can see in SU24), you can do it like this.
AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
ID 'VKORG' FIELD VKORG
ID 'VTWEG' FIELD VTWEG
ID 'SPART' FIELD SPART.
IF sy-subrc ne 0.
show an error message.
endif.
Here , VKORG, VTWEG and SPART you have to pass from program and check sy-subrc return value.
Hope this helps.
Regards,
Naveen
‎2014 May 27 8:18 AM
Hi Rodrigo,
You need check the AUTHORITY-CHECK statement in a program.Which inturn help you to get the Authorization Object used in the program.
Suppose you want to check for the AUTHORITY-CHECK used in the program present in Z Packages you can used Tcode CODE_SCANNER provide the required parameters and Execute. You will get the list of programs having this statement and Auth Object.
Thanks
Rajesh Chowdary