SAP MENU_AGR_MENU_OLD_2_NEW_REPAIR Function Module for
MENU_AGR_MENU_OLD_2_NEW_REPAIR is a standard menu agr menu old 2 new repair 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 menu agr menu old 2 new repair FM, simply by entering the name MENU_AGR_MENU_OLD_2_NEW_REPAIR into the relevant SAP transaction such as SE37 or SE38.
Function Group: PRGN_TREE
Program Name: SAPLPRGN_TREE
Main Program: SAPLPRGN_TREE
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MENU_AGR_MENU_OLD_2_NEW_REPAIR 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 'MENU_AGR_MENU_OLD_2_NEW_REPAIR'".
EXPORTING
IV_INPUT_TREE = "
IV_AGR_NAME = "
* IV_INSERT_TABLES = 'X' "
* IV_SOURCE_RELEASE = "
* IV_SYSTYPE = 'SAP' "
IV_CLIENT = "
* USE_JOIN_TO_SELECT_DATA = 'X' "
* ADD_TEXTS_FOR_TCODES = 'X' "
* INSERT_IN_PORTIONS = 'X' "
IMPORTING
EV_AGR_HIER = "
EV_AGR_HIERT = "
IMPORTING Parameters details for MENU_AGR_MENU_OLD_2_NEW_REPAIR
IV_INPUT_TREE -
Data type: SMENSAPNEWTYPOptional: No
Call by Reference: No ( called with pass by value option)
IV_AGR_NAME -
Data type: AGR_NAMEOptional: No
Call by Reference: Yes
IV_INSERT_TABLES -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: Yes
IV_SOURCE_RELEASE -
Data type: SAPRELEASEOptional: Yes
Call by Reference: Yes
IV_SYSTYPE -
Data type: SY-SYSIDDefault: 'SAP'
Optional: Yes
Call by Reference: Yes
IV_CLIENT -
Data type: MANDTOptional: No
Call by Reference: Yes
USE_JOIN_TO_SELECT_DATA -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ADD_TEXTS_FOR_TCODES -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
INSERT_IN_PORTIONS -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MENU_AGR_MENU_OLD_2_NEW_REPAIR
EV_AGR_HIER -
Data type: SMENHIERTYPOptional: No
Call by Reference: Yes
EV_AGR_HIERT -
Data type: SMENHIERTTYPOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for MENU_AGR_MENU_OLD_2_NEW_REPAIR 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_ev_agr_hier | TYPE SMENHIERTYP, " | |||
| lv_iv_input_tree | TYPE SMENSAPNEWTYP, " | |||
| lv_iv_agr_name | TYPE AGR_NAME, " | |||
| lv_ev_agr_hiert | TYPE SMENHIERTTYP, " | |||
| lv_iv_insert_tables | TYPE CHAR1, " 'X' | |||
| lv_iv_source_release | TYPE SAPRELEASE, " | |||
| lv_iv_systype | TYPE SY-SYSID, " 'SAP' | |||
| lv_iv_client | TYPE MANDT, " | |||
| lv_use_join_to_select_data | TYPE CHAR1, " 'X' | |||
| lv_add_texts_for_tcodes | TYPE CHAR1, " 'X' | |||
| lv_insert_in_portions | TYPE CHAR1. " 'X' |
|   CALL FUNCTION 'MENU_AGR_MENU_OLD_2_NEW_REPAIR' " |
| EXPORTING | ||
| IV_INPUT_TREE | = lv_iv_input_tree | |
| IV_AGR_NAME | = lv_iv_agr_name | |
| IV_INSERT_TABLES | = lv_iv_insert_tables | |
| IV_SOURCE_RELEASE | = lv_iv_source_release | |
| IV_SYSTYPE | = lv_iv_systype | |
| IV_CLIENT | = lv_iv_client | |
| USE_JOIN_TO_SELECT_DATA | = lv_use_join_to_select_data | |
| ADD_TEXTS_FOR_TCODES | = lv_add_texts_for_tcodes | |
| INSERT_IN_PORTIONS | = lv_insert_in_portions | |
| IMPORTING | ||
| EV_AGR_HIER | = lv_ev_agr_hier | |
| EV_AGR_HIERT | = lv_ev_agr_hiert | |
| . " MENU_AGR_MENU_OLD_2_NEW_REPAIR | ||
ABAP code using 7.40 inline data declarations to call FM MENU_AGR_MENU_OLD_2_NEW_REPAIR
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.| DATA(ld_iv_insert_tables) | = 'X'. | |||
| "SELECT single SYSID FROM SY INTO @DATA(ld_iv_systype). | ||||
| DATA(ld_iv_systype) | = 'SAP'. | |||
| DATA(ld_use_join_to_select_data) | = 'X'. | |||
| DATA(ld_add_texts_for_tcodes) | = 'X'. | |||
| DATA(ld_insert_in_portions) | = 'X'. | |||
Search for further information about these or an SAP related objects