SAP PRGN_DISTRIBUTE_AGR_TO_SYSTEMS Function Module for









PRGN_DISTRIBUTE_AGR_TO_SYSTEMS is a standard prgn distribute agr to systems SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 distribute agr to systems FM, simply by entering the name PRGN_DISTRIBUTE_AGR_TO_SYSTEMS into the relevant SAP transaction such as SE37 or SE38.

Function Group: PRGN_TREE
Program Name: SAPLPRGN_TREE
Main Program: SAPLPRGN_TREE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function PRGN_DISTRIBUTE_AGR_TO_SYSTEMS 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_DISTRIBUTE_AGR_TO_SYSTEMS'"
EXPORTING
ACTIVITY_GROUP = "Activity group name
* PARENT_AGR = "Name of imparting activity group
* UNREPLACED_TARGET_SYSTEM = "Logical Destination (Specified in Function Call)
* ACTION = 'C' "Customized ('C') or standard menu ('S') flag
* SELECT_DATA = 'X' "Customized ('C') or standard menu ('S') flag
* DISPLAY_MESSAGES = 'X' "Customized ('C') or standard menu ('S') flag
* DISTRIBUTION_TARGET = ' ' "Logical Destination (Specified in Function Call)

TABLES
* MENU_NODES = "Structure for the Drag and Drop Tool
* MENU_TEXTS = "Structure for the Drag and Drop Tool
* TEXTS = "File Structure for Hierarchical Menu - Customer
* L_AGR_DEFINE = "Activity Group Definition

EXCEPTIONS
FOREIGN_LOCK = 1 NOT_AUTHORIZED = 2 NO_DISTRIBUTION_ALLOWED = 3 ONLY_SAVE_LOCALLY = 4 ACTION_CANCELLED = 5 SYSTEM_COMMUNICATION_FAILURE = 6
.



IMPORTING Parameters details for PRGN_DISTRIBUTE_AGR_TO_SYSTEMS

ACTIVITY_GROUP - Activity group name

Data type: AGR_DEFINE-AGR_NAME
Optional: No
Call by Reference: Yes

PARENT_AGR - Name of imparting activity group

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

UNREPLACED_TARGET_SYSTEM - Logical Destination (Specified in Function Call)

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

ACTION - Customized ('C') or standard menu ('S') flag

Data type: SMENSAPNEW-CUSTOMIZED
Default: 'C'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SELECT_DATA - Customized ('C') or standard menu ('S') flag

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

DISPLAY_MESSAGES - Customized ('C') or standard menu ('S') flag

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

DISTRIBUTION_TARGET - Logical Destination (Specified in Function Call)

Data type: RFCDES-RFCDEST
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for PRGN_DISTRIBUTE_AGR_TO_SYSTEMS

MENU_NODES - Structure for the Drag and Drop Tool

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

MENU_TEXTS - Structure for the Drag and Drop Tool

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

TEXTS - File Structure for Hierarchical Menu - Customer

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

L_AGR_DEFINE - Activity Group Definition

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

EXCEPTIONS details

FOREIGN_LOCK -

Data type:
Optional: No
Call by Reference: Yes

NOT_AUTHORIZED -

Data type:
Optional: No
Call by Reference: Yes

NO_DISTRIBUTION_ALLOWED -

Data type:
Optional: No
Call by Reference: Yes

ONLY_SAVE_LOCALLY -

Data type:
Optional: No
Call by Reference: Yes

ACTION_CANCELLED -

Data type:
Optional: No
Call by Reference: Yes

SYSTEM_COMMUNICATION_FAILURE -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for PRGN_DISTRIBUTE_AGR_TO_SYSTEMS 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:
lt_menu_nodes  TYPE STANDARD TABLE OF AGR_SHIER, "   
lv_foreign_lock  TYPE AGR_SHIER, "   
lv_activity_group  TYPE AGR_DEFINE-AGR_NAME, "   
lt_menu_texts  TYPE STANDARD TABLE OF AGR_SHIERT, "   
lv_parent_agr  TYPE AGR_DEFINE-PARENT_AGR, "   
lv_not_authorized  TYPE AGR_DEFINE, "   
lt_texts  TYPE STANDARD TABLE OF AGR_TEXTS, "   
lv_no_distribution_allowed  TYPE AGR_TEXTS, "   
lv_unreplaced_target_system  TYPE RFCDES-RFCDEST, "   
lv_action  TYPE SMENSAPNEW-CUSTOMIZED, "   'C'
lt_l_agr_define  TYPE STANDARD TABLE OF AGR_DEFINE, "   
lv_only_save_locally  TYPE AGR_DEFINE, "   
lv_select_data  TYPE SMENSAPNEW-CUSTOMIZED, "   'X'
lv_action_cancelled  TYPE SMENSAPNEW, "   
lv_display_messages  TYPE SMENSAPNEW-CUSTOMIZED, "   'X'
lv_system_communication_failure  TYPE SMENSAPNEW, "   
lv_distribution_target  TYPE RFCDES-RFCDEST. "   SPACE

  CALL FUNCTION 'PRGN_DISTRIBUTE_AGR_TO_SYSTEMS'  "
    EXPORTING
         ACTIVITY_GROUP = lv_activity_group
         PARENT_AGR = lv_parent_agr
         UNREPLACED_TARGET_SYSTEM = lv_unreplaced_target_system
         ACTION = lv_action
         SELECT_DATA = lv_select_data
         DISPLAY_MESSAGES = lv_display_messages
         DISTRIBUTION_TARGET = lv_distribution_target
    TABLES
         MENU_NODES = lt_menu_nodes
         MENU_TEXTS = lt_menu_texts
         TEXTS = lt_texts
         L_AGR_DEFINE = lt_l_agr_define
    EXCEPTIONS
        FOREIGN_LOCK = 1
        NOT_AUTHORIZED = 2
        NO_DISTRIBUTION_ALLOWED = 3
        ONLY_SAVE_LOCALLY = 4
        ACTION_CANCELLED = 5
        SYSTEM_COMMUNICATION_FAILURE = 6
. " PRGN_DISTRIBUTE_AGR_TO_SYSTEMS




ABAP code using 7.40 inline data declarations to call FM PRGN_DISTRIBUTE_AGR_TO_SYSTEMS

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_activity_group).
 
 
"SELECT single PARENT_AGR FROM AGR_DEFINE INTO @DATA(ld_parent_agr).
 
 
 
 
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_unreplaced_target_system).
 
"SELECT single CUSTOMIZED FROM SMENSAPNEW INTO @DATA(ld_action).
DATA(ld_action) = 'C'.
 
 
 
"SELECT single CUSTOMIZED FROM SMENSAPNEW INTO @DATA(ld_select_data).
DATA(ld_select_data) = 'X'.
 
 
"SELECT single CUSTOMIZED FROM SMENSAPNEW INTO @DATA(ld_display_messages).
DATA(ld_display_messages) = 'X'.
 
 
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_distribution_target).
DATA(ld_distribution_target) = ' '.
 


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!