SAP Function Modules

S_AUTH_ROLE_DATA_LOAD SAP Function module







S_AUTH_ROLE_DATA_LOAD 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 S_AUTH_ROLE_DATA_LOAD into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: S_AUTH_TOOL_2
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM S_AUTH_ROLE_DATA_LOAD - S AUTH ROLE DATA LOAD





CALL FUNCTION 'S_AUTH_ROLE_DATA_LOAD' "
* EXPORTING
*   activity_group = SPACE      " agr_define-agr_name  Role Name
*   ranges_parameter_for_select =   " agr_define-agr_name
*   like_parameter_for_select =   " agr_define-agr_name
*   select_texts = 'X'          "
*   select_all_activity_groups = SPACE  "
*   select_texts_in_any_language = SPACE  " smensapnew-customized
*   no_derived_roles = SPACE    " smensapnew-customized  Customized ('C') or standard menu ('S') flag
*   no_sap_roles = SPACE        " smensapnew-customized  Customized ('C') or standard menu ('S') flag
  TABLES
    activity_groups_texts =     " agr_texts
  EXCEPTIONS
    NO_ACTIVITY_GROUPS_AVAILABLE = 1  "         No roles found
    .  "  S_AUTH_ROLE_DATA_LOAD

ABAP code example for Function Module S_AUTH_ROLE_DATA_LOAD





The ABAP code below is a full code listing to execute function module S_AUTH_ROLE_DATA_LOAD 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:
it_activity_groups_texts  TYPE STANDARD TABLE OF AGR_TEXTS,"TABLES PARAM
wa_activity_groups_texts  LIKE LINE OF it_activity_groups_texts .


SELECT single AGR_NAME
FROM AGR_DEFINE
INTO @DATA(ld_activity_group).


SELECT single AGR_NAME
FROM AGR_DEFINE
INTO @DATA(ld_ranges_parameter_for_select).


SELECT single AGR_NAME
FROM AGR_DEFINE
INTO @DATA(ld_like_parameter_for_select).

DATA(ld_select_texts) = 'some text here'.
DATA(ld_select_all_activity_groups) = 'some text here'.

SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO @DATA(ld_select_texts_in_any_language).


SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO @DATA(ld_no_derived_roles).


SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO @DATA(ld_no_sap_roles).


"populate fields of struture and append to itab
append wa_activity_groups_texts to it_activity_groups_texts. . CALL FUNCTION 'S_AUTH_ROLE_DATA_LOAD' * EXPORTING * activity_group = ld_activity_group * ranges_parameter_for_select = ld_ranges_parameter_for_select * like_parameter_for_select = ld_like_parameter_for_select * select_texts = ld_select_texts * select_all_activity_groups = ld_select_all_activity_groups * select_texts_in_any_language = ld_select_texts_in_any_language * no_derived_roles = ld_no_derived_roles * no_sap_roles = ld_no_sap_roles TABLES activity_groups_texts = it_activity_groups_texts EXCEPTIONS NO_ACTIVITY_GROUPS_AVAILABLE = 1 . " S_AUTH_ROLE_DATA_LOAD
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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_activity_group  TYPE AGR_DEFINE-AGR_NAME ,
it_activity_groups_texts  TYPE STANDARD TABLE OF AGR_TEXTS ,
wa_activity_groups_texts  LIKE LINE OF it_activity_groups_texts,
ld_ranges_parameter_for_select  TYPE AGR_DEFINE-AGR_NAME ,
ld_like_parameter_for_select  TYPE AGR_DEFINE-AGR_NAME ,
ld_select_texts  TYPE STRING ,
ld_select_all_activity_groups  TYPE STRING ,
ld_select_texts_in_any_language  TYPE SMENSAPNEW-CUSTOMIZED ,
ld_no_derived_roles  TYPE SMENSAPNEW-CUSTOMIZED ,
ld_no_sap_roles  TYPE SMENSAPNEW-CUSTOMIZED .


SELECT single AGR_NAME
FROM AGR_DEFINE
INTO ld_activity_group.


"populate fields of struture and append to itab
append wa_activity_groups_texts to it_activity_groups_texts.

SELECT single AGR_NAME
FROM AGR_DEFINE
INTO ld_ranges_parameter_for_select.


SELECT single AGR_NAME
FROM AGR_DEFINE
INTO ld_like_parameter_for_select.

ld_select_texts = 'some text here'.
ld_select_all_activity_groups = 'some text here'.

SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO ld_select_texts_in_any_language.


SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO ld_no_derived_roles.


SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO ld_no_sap_roles.

Contribute (Add Comments)

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 S_AUTH_ROLE_DATA_LOAD or its description.