SAP PRGN_READ_ROLE_MENU Function Module for Get Menu Structure, Texts, and Additional Details









PRGN_READ_ROLE_MENU is a standard prgn read role menu SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Menu Structure, Texts, and Additional Details 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 prgn read role menu FM, simply by entering the name PRGN_READ_ROLE_MENU into the relevant SAP transaction such as SE37 or SE38.

Function Group: PRGN_STRUCTURE
Program Name: SAPLPRGN_STRUCTURE
Main Program: SAPLPRGN_STRUCTURE
Appliation area:
Release date: 10-Apr-2008
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function PRGN_READ_ROLE_MENU 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 'PRGN_READ_ROLE_MENU'"Get Menu Structure, Texts, and Additional Details
EXPORTING
ROLE = "Role Name
* AUTHORIZATION_CHECK = 'X' "Flag for Authorization Check
* LANGUAGE = "Language Key of Current Text Environment
* INT_STRUC = "'X' = Copy menu data to global table

TABLES
T_NODES = "Table for Structure Information for Menu
T_DTL_FLAGS = "Additional Details for Role Menu Items: Checkboxes
T_DTL_BOR_METHODS = "Additional Details for Role Menu Items: BOR Methods
T_DTL_BOR_PARAMS = "Additional Details for Role Menu Items: Parameters
* T_AGR_HIER_BOR = "Structure for Additional Details with no STRING Field
* T_TEXTS = "Role menu texts
* T_TCODES = "Assignment of roles to Tcodes
* T_URLS = "Internet Links for a Role

EXCEPTIONS
NOT_AUTHORIZED = 1
.



IMPORTING Parameters details for PRGN_READ_ROLE_MENU

ROLE - Role Name

Data type: AGR_DEFINE-AGR_NAME
Optional: No
Call by Reference: No ( called with pass by value option)

AUTHORIZATION_CHECK - Flag for Authorization Check

Data type: CHAR01
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - Language Key of Current Text Environment

Data type: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

INT_STRUC - 'X' = Copy menu data to global table

Data type: CHAR01
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for PRGN_READ_ROLE_MENU

T_NODES - Table for Structure Information for Menu

Data type: AGR_HIER
Optional: No
Call by Reference: Yes

T_DTL_FLAGS - Additional Details for Role Menu Items: Checkboxes

Data type: AGR_DTL_FLAGS
Optional: No
Call by Reference: Yes

T_DTL_BOR_METHODS - Additional Details for Role Menu Items: BOR Methods

Data type: AGR_DTL_BOR_METHODS
Optional: No
Call by Reference: Yes

T_DTL_BOR_PARAMS - Additional Details for Role Menu Items: Parameters

Data type: AGR_DTL_BOR_PARAMS
Optional: No
Call by Reference: Yes

T_AGR_HIER_BOR - Structure for Additional Details with no STRING Field

Data type: AGR_SHIER_BOR
Optional: Yes
Call by Reference: Yes

T_TEXTS - Role menu texts

Data type: AGR_HIERT
Optional: Yes
Call by Reference: Yes

T_TCODES - Assignment of roles to Tcodes

Data type: AGR_TCODES
Optional: Yes
Call by Reference: Yes

T_URLS - Internet Links for a Role

Data type: AGR_BUFFI
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NOT_AUTHORIZED - Missing display authorization for role

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for PRGN_READ_ROLE_MENU 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_role  TYPE AGR_DEFINE-AGR_NAME, "   
lt_t_nodes  TYPE STANDARD TABLE OF AGR_HIER, "   
lv_not_authorized  TYPE AGR_HIER, "   
lt_t_dtl_flags  TYPE STANDARD TABLE OF AGR_DTL_FLAGS, "   
lv_authorization_check  TYPE CHAR01, "   'X'
lv_language  TYPE SY-LANGU, "   
lt_t_dtl_bor_methods  TYPE STANDARD TABLE OF AGR_DTL_BOR_METHODS, "   
lv_int_struc  TYPE CHAR01, "   
lt_t_dtl_bor_params  TYPE STANDARD TABLE OF AGR_DTL_BOR_PARAMS, "   
lt_t_agr_hier_bor  TYPE STANDARD TABLE OF AGR_SHIER_BOR, "   
lt_t_texts  TYPE STANDARD TABLE OF AGR_HIERT, "   
lt_t_tcodes  TYPE STANDARD TABLE OF AGR_TCODES, "   
lt_t_urls  TYPE STANDARD TABLE OF AGR_BUFFI. "   

  CALL FUNCTION 'PRGN_READ_ROLE_MENU'  "Get Menu Structure, Texts, and Additional Details
    EXPORTING
         ROLE = lv_role
         AUTHORIZATION_CHECK = lv_authorization_check
         LANGUAGE = lv_language
         INT_STRUC = lv_int_struc
    TABLES
         T_NODES = lt_t_nodes
         T_DTL_FLAGS = lt_t_dtl_flags
         T_DTL_BOR_METHODS = lt_t_dtl_bor_methods
         T_DTL_BOR_PARAMS = lt_t_dtl_bor_params
         T_AGR_HIER_BOR = lt_t_agr_hier_bor
         T_TEXTS = lt_t_texts
         T_TCODES = lt_t_tcodes
         T_URLS = lt_t_urls
    EXCEPTIONS
        NOT_AUTHORIZED = 1
. " PRGN_READ_ROLE_MENU




ABAP code using 7.40 inline data declarations to call FM PRGN_READ_ROLE_MENU

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 AGR_NAME FROM AGR_DEFINE INTO @DATA(ld_role).
 
 
 
 
DATA(ld_authorization_check) = 'X'.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_language).
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!