‎2007 May 11 9:05 AM
Hello,
I have to check auhorisation. I created in su20 2 authorization check fields (Z_UO and Z_ACT). In su21 I created an authorization object named Z_APO_MGTM. I assigned my two authorization check fields to it.
Now in an ABAP Program, i try this
AUTHORITY-CHECK OBJECT 'Z_APO_MGTM'
ID 'Z_UO' FIELD WS_T1-UO
ID 'Z_ACT' FIELD W_SENS .
I run the program myself. My authorization are SAPALL. In the program, after AUTHORITY-CHECK sy-subrc = 12. Why? It should be equal to 0 since i'm am SAPALL.
Did i forget something when i created the objects?
Thanks by advance,
LB.
‎2007 May 11 9:12 AM
Hi
SY-SUBRC = 12 means you haven't the authorization object in your profile.
The profile SAP_ALL contains all standard authorization objects only, if you create new one, it can't be in SAP_ALL automatically, so your control is failing.
U have to create a new (Z)profile where you have to insert your all new authorizations and then assign it to your user.
In this way your profile will have SAP_ALL (with std authorizations) and Z<profile> (with custom authorization).
Max
‎2007 May 11 9:12 AM
Hi
SY-SUBRC = 12 means you haven't the authorization object in your profile.
The profile SAP_ALL contains all standard authorization objects only, if you create new one, it can't be in SAP_ALL automatically, so your control is failing.
U have to create a new (Z)profile where you have to insert your all new authorizations and then assign it to your user.
In this way your profile will have SAP_ALL (with std authorizations) and Z<profile> (with custom authorization).
Max
‎2007 May 11 9:22 AM
‎2007 Jun 27 12:39 PM
If we assign SAP_NEW profile also to the user along with SAP_ALL.
Every time we no need to create a role for the newly created Tcodes ( authorization objects) .
is this useful ???