11-14-2007 12:37 AM
Can some body explain me the below code...
AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD 'B'.
IF SY-SUBRC <> 0.
MESSAGE E...
ENDIF.
I know that Object is the authority object..
what is ACTVT ? field 01 02 03 for c / v / display
what is CUSTTYPE and field B?
how to code if I want to add authorization to some field say ' it_itab-cost'.
Thank you.
11-14-2007 1:06 AM
The ACTVT field indicates what kind of authority you want to check for. In this case 02 indicates that you are checking to make sure that the user has been granted the authority to change.
The custtype field is a field defined in the authorization object 'S_TRVL_BKS', in this case this looks like a standard SAP authorization object. The security people when they setup this authorization object will configure it so that only certain CUSTTYPE's have the ACTVT = 02 setup which means only certain user will have the authority to change.
So to summarize when the statement you have given is executed, this statement will check the configuration of authorization object 'S_TRVL_BKS' to see if the current user has the authority to change for CUSTTYPE = B. If the user does have the authority to change the sy-subrc will be zero, else it will be non-zero, in which case a message will be shown. If this helps please give points
11-30-2007 8:50 PM