SAP GET_AUTH_VALUES Function Module for Display a user's authorizations and values for an object
GET_AUTH_VALUES is a standard get auth values SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Display a user's authorizations and values for an object processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for get auth values FM, simply by entering the name GET_AUTH_VALUES into the relevant SAP transaction such as SE37 or SE38.
Function Group: SUSR
Program Name: SAPLSUSR
Main Program: SAPLSUSR
Appliation area: S
Release date: 02-Mar-2005
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GET_AUTH_VALUES pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'GET_AUTH_VALUES'"Display a user's authorizations and values for an object.
EXPORTING
* OBJECT1 = ' ' "Object Name
* OBJECT2 = ' ' "Object Name
* OBJECT3 = ' ' "Object Name
* OBJECT4 = ' ' "Object Name
* OBJECT5 = ' ' "Object Name
* OBJECT6 = ' ' "Object Name
* OBJECT7 = ' ' "Object Name
* USER = ' ' "User Name
* TCODE = SY-TCODE "ABAP Program, Current Transaction Code
TABLES
VALUES = "Tables of Values and Authorization Names
EXCEPTIONS
USER_DOESNT_EXIST = 1
IMPORTING Parameters details for GET_AUTH_VALUES
OBJECT1 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT2 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT3 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT4 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT5 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT6 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT7 - Object Name
Data type: USR12-OBJCTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
USER - User Name
Data type: USR04-BNAMEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TCODE - ABAP Program, Current Transaction Code
Data type: SY-TCODEDefault: SY-TCODE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GET_AUTH_VALUES
VALUES - Tables of Values and Authorization Names
Data type: US335Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
USER_DOESNT_EXIST - User does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GET_AUTH_VALUES Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lt_values | TYPE STANDARD TABLE OF US335, " | |||
| lv_object1 | TYPE USR12-OBJCT, " ' ' | |||
| lv_user_doesnt_exist | TYPE USR12, " | |||
| lv_object2 | TYPE USR12-OBJCT, " ' ' | |||
| lv_object3 | TYPE USR12-OBJCT, " ' ' | |||
| lv_object4 | TYPE USR12-OBJCT, " ' ' | |||
| lv_object5 | TYPE USR12-OBJCT, " ' ' | |||
| lv_object6 | TYPE USR12-OBJCT, " ' ' | |||
| lv_object7 | TYPE USR12-OBJCT, " ' ' | |||
| lv_user | TYPE USR04-BNAME, " ' ' | |||
| lv_tcode | TYPE SY-TCODE. " SY-TCODE |
|   CALL FUNCTION 'GET_AUTH_VALUES' "Display a user's authorizations and values for an object |
| EXPORTING | ||
| OBJECT1 | = lv_object1 | |
| OBJECT2 | = lv_object2 | |
| OBJECT3 | = lv_object3 | |
| OBJECT4 | = lv_object4 | |
| OBJECT5 | = lv_object5 | |
| OBJECT6 | = lv_object6 | |
| OBJECT7 | = lv_object7 | |
| USER | = lv_user | |
| TCODE | = lv_tcode | |
| TABLES | ||
| VALUES | = lt_values | |
| EXCEPTIONS | ||
| USER_DOESNT_EXIST = 1 | ||
| . " GET_AUTH_VALUES | ||
ABAP code using 7.40 inline data declarations to call FM GET_AUTH_VALUES
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object1). | ||||
| DATA(ld_object1) | = ' '. | |||
| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object2). | ||||
| DATA(ld_object2) | = ' '. | |||
| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object3). | ||||
| DATA(ld_object3) | = ' '. | |||
| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object4). | ||||
| DATA(ld_object4) | = ' '. | |||
| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object5). | ||||
| DATA(ld_object5) | = ' '. | |||
| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object6). | ||||
| DATA(ld_object6) | = ' '. | |||
| "SELECT single OBJCT FROM USR12 INTO @DATA(ld_object7). | ||||
| DATA(ld_object7) | = ' '. | |||
| "SELECT single BNAME FROM USR04 INTO @DATA(ld_user). | ||||
| DATA(ld_user) | = ' '. | |||
| "SELECT single TCODE FROM SY INTO @DATA(ld_tcode). | ||||
| DATA(ld_tcode) | = SY-TCODE. | |||
Search for further information about these or an SAP related objects