SAP BAPI_APPREQUEST_CHANGE_MPO Function Module for Interface Module
BAPI_APPREQUEST_CHANGE_MPO is a standard bapi apprequest change mpo SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Interface Module 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 bapi apprequest change mpo FM, simply by entering the name BAPI_APPREQUEST_CHANGE_MPO into the relevant SAP transaction such as SE37 or SE38.
Function Group: AIA_MPO_APP_REQUEST_46CFF
Program Name: SAPLAIA_MPO_APP_REQUEST_46CFF
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function BAPI_APPREQUEST_CHANGE_MPO 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 'BAPI_APPREQUEST_CHANGE_MPO'"Interface Module.
EXPORTING
EXTERNALNUMBER = "Appropriation Request Number (Formatted for Coding Mask)
* MASTER_DATA = "Approp. Request Master Data (IMAK,IMAKT,IMAKZS)
* MASTER_DATA_X = "Change Parameter: Approp. Request Master Data
* USER_FIELDS = "User fields
* USER_FIELDS_X = "Change Parameter: User Fields
* LANGUAGE = "Language key
* LANGUAGE_ISO = "Language according to ISO 639
* TEST_RUN = "Execute test run
TABLES
* ORG_UNITS = "Organizational Units
* ENVIRONMNT_INVEST_X = "Change Parameters: Org Units, Division etc. for BAPI.
* ASSETS_EQUIS = "Affected Assets/Equipment
* ASSETS_EQUIS_X = "Change Parameters: Org Units, Division etc. for BAPI.
* PARTNER = "Partner
* PARTNER_X = "Change Parameters: Org Units, Division etc. for BAPI.
* RETURN = "Return parameter
* ORG_UNITS_X = "Change Parameters: Org. Units, Division, etc. for BAPI
* DIVISION = "Distribution by Requesting Division
* DIVISION_X = "Change Parameters: Org Units, Division etc. for BAPI.
* MATERIAL_GRP = "Distribution by Material Group
* MATERIAL_GRP_X = "Change Parameters: Org Units, Division etc. for BAPI.
* INVESTMENT_REASON = "Distribution by Reason for Investment
* INVESTMENT_REASON_X = "Change Parameters: Org Units, Division etc. for BAPI.
* ENVIRONMNT_INVEST = "Distribution by Reasons for Environmental Investment
IMPORTING Parameters details for BAPI_APPREQUEST_CHANGE_MPO
EXTERNALNUMBER - Appropriation Request Number (Formatted for Coding Mask)
Data type: BAPI_APPREQ_ID-APPREQOptional: No
Call by Reference: No ( called with pass by value option)
MASTER_DATA - Approp. Request Master Data (IMAK,IMAKT,IMAKZS)
Data type: BAPIAPPREQMASTEROptional: Yes
Call by Reference: Yes
MASTER_DATA_X - Change Parameter: Approp. Request Master Data
Data type: BAPIAPPREQMASTERXOptional: Yes
Call by Reference: No ( called with pass by value option)
USER_FIELDS - User fields
Data type: BAPIAPPREQUSEROptional: Yes
Call by Reference: No ( called with pass by value option)
USER_FIELDS_X - Change Parameter: User Fields
Data type: BAPIAPPREQUSERXOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language key
Data type: BAPI_APPREQ_AUX-LANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE_ISO - Language according to ISO 639
Data type: BAPI_APPREQ_AUX-LANGU_ISOOptional: Yes
Call by Reference: No ( called with pass by value option)
TEST_RUN - Execute test run
Data type: BAPI_APPREQ_AUX-TESTRUNOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_APPREQUEST_CHANGE_MPO
ORG_UNITS - Organizational Units
Data type: BAPIAPPREQORGUNITOptional: Yes
Call by Reference: No ( called with pass by value option)
ENVIRONMNT_INVEST_X - Change Parameters: Org Units, Division etc. for BAPI.
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
ASSETS_EQUIS - Affected Assets/Equipment
Data type: BAPIAPPREQASSETOptional: Yes
Call by Reference: No ( called with pass by value option)
ASSETS_EQUIS_X - Change Parameters: Org Units, Division etc. for BAPI.
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
PARTNER - Partner
Data type: BAPIAPPREQPARTNEROptional: Yes
Call by Reference: No ( called with pass by value option)
PARTNER_X - Change Parameters: Org Units, Division etc. for BAPI.
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
RETURN - Return parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
ORG_UNITS_X - Change Parameters: Org. Units, Division, etc. for BAPI
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
DIVISION - Distribution by Requesting Division
Data type: BAPIAPPREQDIVISIONOptional: Yes
Call by Reference: No ( called with pass by value option)
DIVISION_X - Change Parameters: Org Units, Division etc. for BAPI.
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_GRP - Distribution by Material Group
Data type: BAPIAPPREQMATGROUPOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_GRP_X - Change Parameters: Org Units, Division etc. for BAPI.
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
INVESTMENT_REASON - Distribution by Reason for Investment
Data type: BAPIAPPREQINVREASONOptional: Yes
Call by Reference: No ( called with pass by value option)
INVESTMENT_REASON_X - Change Parameters: Org Units, Division etc. for BAPI.
Data type: BAPIAPPREQCHANGEX_MPOOptional: Yes
Call by Reference: No ( called with pass by value option)
ENVIRONMNT_INVEST - Distribution by Reasons for Environmental Investment
Data type: BAPIAPPREQENVINVESTOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_APPREQUEST_CHANGE_MPO 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_org_units | TYPE STANDARD TABLE OF BAPIAPPREQORGUNIT, " | |||
lv_externalnumber | TYPE BAPI_APPREQ_ID-APPREQ, " | |||
lt_environmnt_invest_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lt_assets_equis | TYPE STANDARD TABLE OF BAPIAPPREQASSET, " | |||
lt_assets_equis_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lt_partner | TYPE STANDARD TABLE OF BAPIAPPREQPARTNER, " | |||
lt_partner_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lv_master_data | TYPE BAPIAPPREQMASTER, " | |||
lt_org_units_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lt_division | TYPE STANDARD TABLE OF BAPIAPPREQDIVISION, " | |||
lv_master_data_x | TYPE BAPIAPPREQMASTERX, " | |||
lt_division_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lv_user_fields | TYPE BAPIAPPREQUSER, " | |||
lt_material_grp | TYPE STANDARD TABLE OF BAPIAPPREQMATGROUP, " | |||
lv_user_fields_x | TYPE BAPIAPPREQUSERX, " | |||
lv_language | TYPE BAPI_APPREQ_AUX-LANGU, " | |||
lt_material_grp_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lv_language_iso | TYPE BAPI_APPREQ_AUX-LANGU_ISO, " | |||
lt_investment_reason | TYPE STANDARD TABLE OF BAPIAPPREQINVREASON, " | |||
lv_test_run | TYPE BAPI_APPREQ_AUX-TESTRUN, " | |||
lt_investment_reason_x | TYPE STANDARD TABLE OF BAPIAPPREQCHANGEX_MPO, " | |||
lt_environmnt_invest | TYPE STANDARD TABLE OF BAPIAPPREQENVINVEST. " |
  CALL FUNCTION 'BAPI_APPREQUEST_CHANGE_MPO' "Interface Module |
EXPORTING | ||
EXTERNALNUMBER | = lv_externalnumber | |
MASTER_DATA | = lv_master_data | |
MASTER_DATA_X | = lv_master_data_x | |
USER_FIELDS | = lv_user_fields | |
USER_FIELDS_X | = lv_user_fields_x | |
LANGUAGE | = lv_language | |
LANGUAGE_ISO | = lv_language_iso | |
TEST_RUN | = lv_test_run | |
TABLES | ||
ORG_UNITS | = lt_org_units | |
ENVIRONMNT_INVEST_X | = lt_environmnt_invest_x | |
ASSETS_EQUIS | = lt_assets_equis | |
ASSETS_EQUIS_X | = lt_assets_equis_x | |
PARTNER | = lt_partner | |
PARTNER_X | = lt_partner_x | |
RETURN | = lt_return | |
ORG_UNITS_X | = lt_org_units_x | |
DIVISION | = lt_division | |
DIVISION_X | = lt_division_x | |
MATERIAL_GRP | = lt_material_grp | |
MATERIAL_GRP_X | = lt_material_grp_x | |
INVESTMENT_REASON | = lt_investment_reason | |
INVESTMENT_REASON_X | = lt_investment_reason_x | |
ENVIRONMNT_INVEST | = lt_environmnt_invest | |
. " BAPI_APPREQUEST_CHANGE_MPO |
ABAP code using 7.40 inline data declarations to call FM BAPI_APPREQUEST_CHANGE_MPO
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 APPREQ FROM BAPI_APPREQ_ID INTO @DATA(ld_externalnumber). | ||||
"SELECT single LANGU FROM BAPI_APPREQ_AUX INTO @DATA(ld_language). | ||||
"SELECT single LANGU_ISO FROM BAPI_APPREQ_AUX INTO @DATA(ld_language_iso). | ||||
"SELECT single TESTRUN FROM BAPI_APPREQ_AUX INTO @DATA(ld_test_run). | ||||
Search for further information about these or an SAP related objects