AUTHORITY-CHECK in ABAP

AUTHORITY-CHECK keyword is used for checking the user authorization for an object.

It syntax is as follows

 

AUTHORITY-CHECK OBJECT <object> ID <name1> FIELD <f1>

ID <name2> FIELD <f2>

ID <name10> FIELD <f10>.

  • ID contains the name of the object.
  • name1 … name10 contains the name of the authorization fields in object
  • f1… f10 contains the values for checking

Return codes

  • SY-SUBRC=0 (the use has authorization and can continue)
  • SY-SUBRC=4 (the user has no authorization)
  • SY-SUBRC=8 (Too many parameters, maximum allows is 10)
  • SY-SUBRC=12 (Specified object not maintained in the user master record.)
  • SY-SUBRC=16 (No profile entered in the user master record.)
  • SY-SUBRC=24 (Field names are not matching.)
  • SY-SUBRC=28 /32 /36 (Incorrect structure for user master record.)
Also Read : View Other ABAP Keywords & Syntax -> ABAP Transaction codes