SAP RSEC_GET_AUTHS Function Module for Returns List of Authorization Names
RSEC_GET_AUTHS is a standard rsec get auths SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Returns List of Authorization Names 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 rsec get auths FM, simply by entering the name RSEC_GET_AUTHS into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSEC_CHECKS
Program Name: SAPLRSEC_CHECKS
Main Program: SAPLRSEC_CHECKS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSEC_GET_AUTHS 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 'RSEC_GET_AUTHS'"Returns List of Authorization Names.
EXPORTING
* I_USERNAME = "User Name
* I_AUTHCHECK = RS_C_FALSE "With Authorization Check
* I_WITH_TEXTS = RS_C_FALSE "With Texts
* I_WITH_GENERATED = RS_C_TRUE "With the Generated Authorizations
* I_WITH_ROLES = RS_C_TRUE "With the Authorizations from Roles
* I_OBJVERS = RS_C_OBJVERS-ACTIVE "Object Version (Active, Modified, Content)
* I_OBJSTAT = RS_C_OBJSTAT-ALL "Object Status
IMPORTING
E_T_AUTHS = "Authorizations
E_T_AUTHT = "Authorization Texts BI Reporting
E_T_ROLE_AUTHS = "Table with Authorization Names
E_T_ROLE_AUTHT = "Authorization Texts BI Reporting
EXCEPTIONS
NOTHING_FOUND = 1 NO_AUTH = 2 INVALID_PARAMS = 3
IMPORTING Parameters details for RSEC_GET_AUTHS
I_USERNAME - User Name
Data type: UNAMEOptional: Yes
Call by Reference: Yes
I_AUTHCHECK - With Authorization Check
Data type: RS_BOOLDefault: RS_C_FALSE
Optional: Yes
Call by Reference: Yes
I_WITH_TEXTS - With Texts
Data type: RS_BOOLDefault: RS_C_FALSE
Optional: Yes
Call by Reference: Yes
I_WITH_GENERATED - With the Generated Authorizations
Data type: RS_BOOLDefault: RS_C_TRUE
Optional: Yes
Call by Reference: Yes
I_WITH_ROLES - With the Authorizations from Roles
Data type: RS_BOOLDefault: RS_C_TRUE
Optional: Yes
Call by Reference: Yes
I_OBJVERS - Object Version (Active, Modified, Content)
Data type: RSOBJVERSDefault: RS_C_OBJVERS-ACTIVE
Optional: Yes
Call by Reference: Yes
I_OBJSTAT - Object Status
Data type: RSOBJSTATDefault: RS_C_OBJSTAT-ALL
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RSEC_GET_AUTHS
E_T_AUTHS - Authorizations
Data type: RSEC_T_AUTHSOptional: No
Call by Reference: Yes
E_T_AUTHT - Authorization Texts BI Reporting
Data type: RSEC_T_AUTHTOptional: No
Call by Reference: Yes
E_T_ROLE_AUTHS - Table with Authorization Names
Data type: RSEC_T_AUTHSOptional: No
Call by Reference: Yes
E_T_ROLE_AUTHT - Authorization Texts BI Reporting
Data type: RSEC_T_AUTHTOptional: No
Call by Reference: Yes
EXCEPTIONS details
NOTHING_FOUND - Nothing found
Data type:Optional: No
Call by Reference: Yes
NO_AUTH - No authorization
Data type:Optional: No
Call by Reference: Yes
INVALID_PARAMS - Parameter combination not permitted
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RSEC_GET_AUTHS 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: | ||||
| lv_e_t_auths | TYPE RSEC_T_AUTHS, " | |||
| lv_i_username | TYPE UNAME, " | |||
| lv_nothing_found | TYPE UNAME, " | |||
| lv_no_auth | TYPE UNAME, " | |||
| lv_e_t_autht | TYPE RSEC_T_AUTHT, " | |||
| lv_i_authcheck | TYPE RS_BOOL, " RS_C_FALSE | |||
| lv_i_with_texts | TYPE RS_BOOL, " RS_C_FALSE | |||
| lv_e_t_role_auths | TYPE RSEC_T_AUTHS, " | |||
| lv_invalid_params | TYPE RSEC_T_AUTHS, " | |||
| lv_e_t_role_autht | TYPE RSEC_T_AUTHT, " | |||
| lv_i_with_generated | TYPE RS_BOOL, " RS_C_TRUE | |||
| lv_i_with_roles | TYPE RS_BOOL, " RS_C_TRUE | |||
| lv_i_objvers | TYPE RSOBJVERS, " RS_C_OBJVERS-ACTIVE | |||
| lv_i_objstat | TYPE RSOBJSTAT. " RS_C_OBJSTAT-ALL |
|   CALL FUNCTION 'RSEC_GET_AUTHS' "Returns List of Authorization Names |
| EXPORTING | ||
| I_USERNAME | = lv_i_username | |
| I_AUTHCHECK | = lv_i_authcheck | |
| I_WITH_TEXTS | = lv_i_with_texts | |
| I_WITH_GENERATED | = lv_i_with_generated | |
| I_WITH_ROLES | = lv_i_with_roles | |
| I_OBJVERS | = lv_i_objvers | |
| I_OBJSTAT | = lv_i_objstat | |
| IMPORTING | ||
| E_T_AUTHS | = lv_e_t_auths | |
| E_T_AUTHT | = lv_e_t_autht | |
| E_T_ROLE_AUTHS | = lv_e_t_role_auths | |
| E_T_ROLE_AUTHT | = lv_e_t_role_autht | |
| EXCEPTIONS | ||
| NOTHING_FOUND = 1 | ||
| NO_AUTH = 2 | ||
| INVALID_PARAMS = 3 | ||
| . " RSEC_GET_AUTHS | ||
ABAP code using 7.40 inline data declarations to call FM RSEC_GET_AUTHS
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.| DATA(ld_i_authcheck) | = RS_C_FALSE. | |||
| DATA(ld_i_with_texts) | = RS_C_FALSE. | |||
| DATA(ld_i_with_generated) | = RS_C_TRUE. | |||
| DATA(ld_i_with_roles) | = RS_C_TRUE. | |||
| DATA(ld_i_objvers) | = RS_C_OBJVERS-ACTIVE. | |||
| DATA(ld_i_objstat) | = RS_C_OBJSTAT-ALL. | |||
Search for further information about these or an SAP related objects