ABAP Authority-Check Object For User Other Than Current
Using ABAP Authority-Check Object statement with For User addition enables ABAP developers to check authorization of a specific user in their custom programs. If the checked authorization object is defined for the related SAP user pointed with the help of "For User" addition. If FOR USER and a SAP user following the FOR USER addition is not defined in AUTHORITY-CHECK ABAP statement, authorization of the current user is checked by default.
ABAP developers can use the FOR USER addition to check authorization for a specific user instead of current user running ABAP program.
Here is the ABAP code, following the FOR USER addition a local variable can be used to store the target SAP user name.