GM_AUTH_CHECK_PROGRAM is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name GM_AUTH_CHECK_PROGRAM into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
GMAU
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'GM_AUTH_CHECK_PROGRAM' "GM: Check Authority for Object Class using Sponsored Class.
EXPORTING
sponsored_program = " gm_sponsored_prog Sponsored Class
activity = " activ_auth Activity
* no_extra_checkings = SPACE " xfeld Do not perform parameter checkings
EXCEPTIONS
NOT_AUTHORIZED = 1 " User not authorized for requested activity
SPONSORED_PROGRAM_NOT_EXIST = 2 " The Sponsored Program does not exist.
WRONG_ACTIVITY = 3 " The Activity is not allowed for Obect Sponsored Class
WRONG_AUTH_GROUP = 4 " The Authority Group from the Sponsored Class is incorrect
. " GM_AUTH_CHECK_PROGRAM
The ABAP code below is a full code listing to execute function module GM_AUTH_CHECK_PROGRAM including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
DATA(ld_sponsored_program) = 'Check type of data required'.
DATA(ld_activity) = 'Check type of data required'.
DATA(ld_no_extra_checkings) = 'Check type of data required'. . CALL FUNCTION 'GM_AUTH_CHECK_PROGRAM' EXPORTING sponsored_program = ld_sponsored_program activity = ld_activity * no_extra_checkings = ld_no_extra_checkings EXCEPTIONS NOT_AUTHORIZED = 1 SPONSORED_PROGRAM_NOT_EXIST = 2 WRONG_ACTIVITY = 3 WRONG_AUTH_GROUP = 4 . " GM_AUTH_CHECK_PROGRAM
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_sponsored_program | TYPE GM_SPONSORED_PROG , |
| ld_activity | TYPE ACTIV_AUTH , |
| ld_no_extra_checkings | TYPE XFELD . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name GM_AUTH_CHECK_PROGRAM or its description.
GM_AUTH_CHECK_PROGRAM - GM: Check Authority for Object Class using Sponsored Class. GM_AUTH_CHECK_GRANT_GROUP - GM: Check Authority for Object Class using Authority Group. GM_AUTH_CHECK_GRANT - GM: Check Authority for Object Class using Authority Group. GM_AUTH_CHECK_DERIVE_ENTRIES - GM: Authority Check for Derivation Tool GM_AUTH_CHECK_DERIVE - GM: Authority Check for Derivation Tool GM_AUTH_CHECK_CLASS_GROUP - GM: Check Authority for Object Class using Authority Group.