SAP Function Modules

PRGN_STRU_LOAD_DEFINITION SAP Function module







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

Associated Function Group: PRGN_STRUCTURE
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM PRGN_STRU_LOAD_DEFINITION - PRGN STRU LOAD DEFINITION





CALL FUNCTION 'PRGN_STRU_LOAD_DEFINITION' "
  EXPORTING
    activity_group =            " agr_define-agr_name
*   check_hierarchy = SPACE     " smensapnew-customized
  TABLES
    i_definition =              " agr_define    Role definition
*   i_actgroup_texts =          " agr_texts     File Structure for Hierarchical Menu - Customer
*   i_actgroup_flags =          " agr_flags     Role attributes
*   i_actgroup_agrs =           " agr_agrs      Roles in composite role
*   i_actgroup_atts =           " agr_atts      Role attributes
*   i_actgroup_mini =           " agr_mini      MiniApps in Role
*   i_actgroup_minit =          " agr_minit     Role mini-application texts
*   i_actgroup_mapp =           " agr_mapp      MiniApps in Role
*   i_actgroup_hpage =          " agr_hpage     Role Home Page
  EXCEPTIONS
    NOT_AUTHORIZED = 1          "
    .  "  PRGN_STRU_LOAD_DEFINITION

ABAP code example for Function Module PRGN_STRU_LOAD_DEFINITION





The ABAP code below is a full code listing to execute function module PRGN_STRU_LOAD_DEFINITION 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_i_definition  TYPE STANDARD TABLE OF AGR_DEFINE,"TABLES PARAM
wa_i_definition  LIKE LINE OF it_i_definition ,
it_i_actgroup_texts  TYPE STANDARD TABLE OF AGR_TEXTS,"TABLES PARAM
wa_i_actgroup_texts  LIKE LINE OF it_i_actgroup_texts ,
it_i_actgroup_flags  TYPE STANDARD TABLE OF AGR_FLAGS,"TABLES PARAM
wa_i_actgroup_flags  LIKE LINE OF it_i_actgroup_flags ,
it_i_actgroup_agrs  TYPE STANDARD TABLE OF AGR_AGRS,"TABLES PARAM
wa_i_actgroup_agrs  LIKE LINE OF it_i_actgroup_agrs ,
it_i_actgroup_atts  TYPE STANDARD TABLE OF AGR_ATTS,"TABLES PARAM
wa_i_actgroup_atts  LIKE LINE OF it_i_actgroup_atts ,
it_i_actgroup_mini  TYPE STANDARD TABLE OF AGR_MINI,"TABLES PARAM
wa_i_actgroup_mini  LIKE LINE OF it_i_actgroup_mini ,
it_i_actgroup_minit  TYPE STANDARD TABLE OF AGR_MINIT,"TABLES PARAM
wa_i_actgroup_minit  LIKE LINE OF it_i_actgroup_minit ,
it_i_actgroup_mapp  TYPE STANDARD TABLE OF AGR_MAPP,"TABLES PARAM
wa_i_actgroup_mapp  LIKE LINE OF it_i_actgroup_mapp ,
it_i_actgroup_hpage  TYPE STANDARD TABLE OF AGR_HPAGE,"TABLES PARAM
wa_i_actgroup_hpage  LIKE LINE OF it_i_actgroup_hpage .


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


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


"populate fields of struture and append to itab
append wa_i_definition to it_i_definition.

"populate fields of struture and append to itab
append wa_i_actgroup_texts to it_i_actgroup_texts.

"populate fields of struture and append to itab
append wa_i_actgroup_flags to it_i_actgroup_flags.

"populate fields of struture and append to itab
append wa_i_actgroup_agrs to it_i_actgroup_agrs.

"populate fields of struture and append to itab
append wa_i_actgroup_atts to it_i_actgroup_atts.

"populate fields of struture and append to itab
append wa_i_actgroup_mini to it_i_actgroup_mini.

"populate fields of struture and append to itab
append wa_i_actgroup_minit to it_i_actgroup_minit.

"populate fields of struture and append to itab
append wa_i_actgroup_mapp to it_i_actgroup_mapp.

"populate fields of struture and append to itab
append wa_i_actgroup_hpage to it_i_actgroup_hpage. . CALL FUNCTION 'PRGN_STRU_LOAD_DEFINITION' EXPORTING activity_group = ld_activity_group * check_hierarchy = ld_check_hierarchy TABLES i_definition = it_i_definition * i_actgroup_texts = it_i_actgroup_texts * i_actgroup_flags = it_i_actgroup_flags * i_actgroup_agrs = it_i_actgroup_agrs * i_actgroup_atts = it_i_actgroup_atts * i_actgroup_mini = it_i_actgroup_mini * i_actgroup_minit = it_i_actgroup_minit * i_actgroup_mapp = it_i_actgroup_mapp * i_actgroup_hpage = it_i_actgroup_hpage EXCEPTIONS NOT_AUTHORIZED = 1 . " PRGN_STRU_LOAD_DEFINITION
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_i_definition  TYPE STANDARD TABLE OF AGR_DEFINE ,
wa_i_definition  LIKE LINE OF it_i_definition,
ld_check_hierarchy  TYPE SMENSAPNEW-CUSTOMIZED ,
it_i_actgroup_texts  TYPE STANDARD TABLE OF AGR_TEXTS ,
wa_i_actgroup_texts  LIKE LINE OF it_i_actgroup_texts,
it_i_actgroup_flags  TYPE STANDARD TABLE OF AGR_FLAGS ,
wa_i_actgroup_flags  LIKE LINE OF it_i_actgroup_flags,
it_i_actgroup_agrs  TYPE STANDARD TABLE OF AGR_AGRS ,
wa_i_actgroup_agrs  LIKE LINE OF it_i_actgroup_agrs,
it_i_actgroup_atts  TYPE STANDARD TABLE OF AGR_ATTS ,
wa_i_actgroup_atts  LIKE LINE OF it_i_actgroup_atts,
it_i_actgroup_mini  TYPE STANDARD TABLE OF AGR_MINI ,
wa_i_actgroup_mini  LIKE LINE OF it_i_actgroup_mini,
it_i_actgroup_minit  TYPE STANDARD TABLE OF AGR_MINIT ,
wa_i_actgroup_minit  LIKE LINE OF it_i_actgroup_minit,
it_i_actgroup_mapp  TYPE STANDARD TABLE OF AGR_MAPP ,
wa_i_actgroup_mapp  LIKE LINE OF it_i_actgroup_mapp,
it_i_actgroup_hpage  TYPE STANDARD TABLE OF AGR_HPAGE ,
wa_i_actgroup_hpage  LIKE LINE OF it_i_actgroup_hpage.


SELECT single AGR_NAME
FROM AGR_DEFINE
INTO ld_activity_group.


"populate fields of struture and append to itab
append wa_i_definition to it_i_definition.

SELECT single CUSTOMIZED
FROM SMENSAPNEW
INTO ld_check_hierarchy.


"populate fields of struture and append to itab
append wa_i_actgroup_texts to it_i_actgroup_texts.

"populate fields of struture and append to itab
append wa_i_actgroup_flags to it_i_actgroup_flags.

"populate fields of struture and append to itab
append wa_i_actgroup_agrs to it_i_actgroup_agrs.

"populate fields of struture and append to itab
append wa_i_actgroup_atts to it_i_actgroup_atts.

"populate fields of struture and append to itab
append wa_i_actgroup_mini to it_i_actgroup_mini.

"populate fields of struture and append to itab
append wa_i_actgroup_minit to it_i_actgroup_minit.

"populate fields of struture and append to itab
append wa_i_actgroup_mapp to it_i_actgroup_mapp.

"populate fields of struture and append to itab
append wa_i_actgroup_hpage to it_i_actgroup_hpage.

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