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

Function RSEC_AUTHORITY_CHECK_SUBNR 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_AUTHORITY_CHECK_SUBNR'"Authorization Check - Reduced Selection (SUBNR).
EXPORTING
I_INFOCUBE = "
* I_UNAME = SY-UNAME "User Name
I_TH_HIERARCHY = "Hierarchies
* I_MESSAGE = RS_C_TRUE "Issue Messages
CHANGING
C_TSX_AUTH_CHECK_DETAIL = "BW Reporting Authorizations: Report Selections
C_TX_NO_AUTH = "Not used! No authorization for this FEMS/CHANMID
EXCEPTIONS
USER_NOT_AUTHORIZED = 1 AUTH_CHECK_FAILURE = 2 AUTH_CHECK_ERROR = 3 INHERITED_ERROR = 4 X_MESSAGE = 5
IMPORTING Parameters details for RSEC_AUTHORITY_CHECK_SUBNR
I_INFOCUBE -
Data type: RSD_INFOCUBEOptional: No
Call by Reference: Yes
I_UNAME - User Name
Data type: SY-UNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TH_HIERARCHY - Hierarchies
Data type: RSEC_TH_HIERARCHYOptional: No
Call by Reference: Yes
I_MESSAGE - Issue Messages
Data type: RS_BOOLDefault: RS_C_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for RSEC_AUTHORITY_CHECK_SUBNR
C_TSX_AUTH_CHECK_DETAIL - BW Reporting Authorizations: Report Selections
Data type: RSEC_TSX_AUTH_CHECK_DETAILOptional: No
Call by Reference: Yes
C_TX_NO_AUTH - Not used! No authorization for this FEMS/CHANMID
Data type: RSEC_TX_NO_AUTHOptional: No
Call by Reference: Yes
EXCEPTIONS details
USER_NOT_AUTHORIZED - No authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AUTH_CHECK_FAILURE - Insufficient data maintained in user master record
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AUTH_CHECK_ERROR - Errors during check
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INHERITED_ERROR - Other Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
X_MESSAGE - Forward Cancellation
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RSEC_AUTHORITY_CHECK_SUBNR 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_i_infocube | TYPE RSD_INFOCUBE, " | |||
| lv_user_not_authorized | TYPE RSD_INFOCUBE, " | |||
| lv_c_tsx_auth_check_detail | TYPE RSEC_TSX_AUTH_CHECK_DETAIL, " | |||
| lv_i_uname | TYPE SY-UNAME, " SY-UNAME | |||
| lv_c_tx_no_auth | TYPE RSEC_TX_NO_AUTH, " | |||
| lv_auth_check_failure | TYPE RSEC_TX_NO_AUTH, " | |||
| lv_i_th_hierarchy | TYPE RSEC_TH_HIERARCHY, " | |||
| lv_auth_check_error | TYPE RSEC_TH_HIERARCHY, " | |||
| lv_i_message | TYPE RS_BOOL, " RS_C_TRUE | |||
| lv_inherited_error | TYPE RS_BOOL, " | |||
| lv_x_message | TYPE RS_BOOL. " |
|   CALL FUNCTION 'RSEC_AUTHORITY_CHECK_SUBNR' "Authorization Check - Reduced Selection (SUBNR) |
| EXPORTING | ||
| I_INFOCUBE | = lv_i_infocube | |
| I_UNAME | = lv_i_uname | |
| I_TH_HIERARCHY | = lv_i_th_hierarchy | |
| I_MESSAGE | = lv_i_message | |
| CHANGING | ||
| C_TSX_AUTH_CHECK_DETAIL | = lv_c_tsx_auth_check_detail | |
| C_TX_NO_AUTH | = lv_c_tx_no_auth | |
| EXCEPTIONS | ||
| USER_NOT_AUTHORIZED = 1 | ||
| AUTH_CHECK_FAILURE = 2 | ||
| AUTH_CHECK_ERROR = 3 | ||
| INHERITED_ERROR = 4 | ||
| X_MESSAGE = 5 | ||
| . " RSEC_AUTHORITY_CHECK_SUBNR | ||
ABAP code using 7.40 inline data declarations to call FM RSEC_AUTHORITY_CHECK_SUBNR
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 UNAME FROM SY INTO @DATA(ld_i_uname). | ||||
| DATA(ld_i_uname) | = SY-UNAME. | |||
| DATA(ld_i_message) | = RS_C_TRUE. | |||
Search for further information about these or an SAP related objects