SAP MEREQBADI_BAPI Function Module for NOTRANSL: Bestellanforderungs-BAPI
MEREQBADI_BAPI is a standard mereqbadi bapi SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Bestellanforderungs-BAPI 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 mereqbadi bapi FM, simply by entering the name MEREQBADI_BAPI into the relevant SAP transaction such as SE37 or SE38.
Function Group: MEREQBADI
Program Name: SAPLMEREQBADI
Main Program: SAPLMEREQBADI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MEREQBADI_BAPI 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 'MEREQBADI_BAPI'"NOTRANSL: Bestellanforderungs-BAPI.
EXPORTING
* IM_BANFN = "Purchase Requisition Number
IM_AKTYP = "Transaction Type
IM_VORGA = "Generic Type
CHANGING
* CH_TESTRUN = MMPUR_NO "Boolean Type
* CH_ADDRDELIVERY = "Type BAPIMERQADDRDELIVERY
* CH_ACCOUNT = "Type BAPIMEREQACCOUNT
* CH_ACCOUNTX = "Type BAPIMEREQACCOUNTX
* CH_PROFITSEGMENT = "Type BAPIMEREQACCOUNTPROFITSEG
* CH_HEADER = "Transfer Structure for Enjoy Purchase Req. - Header
* CH_HEADERX = "Change Parameter for Enjoy Purchase Requisition - Header
* CH_VERSION = "Table Type BAPIMEREQDCM
* CH_VERSIONX = "Table Type BAPIMEREQDCMX
* CH_SOURCE = "Type BAPIMEREQSOURCE
* CH_COMPONENTS = "Subcontracting for BAPI of Purchase Requisition BUS2105
* CH_ITEMTEXT = "Type BAPIMEREQITEMTEXT
* CH_COMPONENTSX = "Subcontracting for BAPI of Purchase Requisition BUS2105
* CH_SERIALNUMBER = "Serial Numbers in Purchase Requisition BAPI
* CH_SERIALNUMBERX = "Change Parameter for Serial Nos. in Purch. Requisition BAPI
* CH_RETURN = "Exceptions During Purchase Requisition Validation
* CH_EXTENSIONIN = "Table Type for BAPIPAREX
* CH_EXTENSIONOUT = "Table Type for BAPIPAREX
* CH_HEADERTEXT = "Type BAPIMEREQHEADTEXT
* CH_ITEM = "Type BAPIMEREQITEMIMP
* CH_ITEMX = "Type BAPIMEREQITEMX
* CH_ITEMEXP = "type for BAPIMEREQITEM
IMPORTING Parameters details for MEREQBADI_BAPI
IM_BANFN - Purchase Requisition Number
Data type: BANFNOptional: Yes
Call by Reference: Yes
IM_AKTYP - Transaction Type
Data type: T160-TRTYPOptional: No
Call by Reference: Yes
IM_VORGA - Generic Type
Data type: ANYOptional: No
Call by Reference: Yes
CHANGING Parameters details for MEREQBADI_BAPI
CH_TESTRUN - Boolean Type
Data type: MMPUR_BOOLDefault: MMPUR_NO
Optional: Yes
Call by Reference: Yes
CH_ADDRDELIVERY - Type BAPIMERQADDRDELIVERY
Data type: TY_BAPIMERQADDRDELIVERYOptional: Yes
Call by Reference: Yes
CH_ACCOUNT - Type BAPIMEREQACCOUNT
Data type: TY_BAPIMEREQACCOUNTOptional: Yes
Call by Reference: Yes
CH_ACCOUNTX - Type BAPIMEREQACCOUNTX
Data type: TY_BAPIMEREQACCOUNTXOptional: Yes
Call by Reference: Yes
CH_PROFITSEGMENT - Type BAPIMEREQACCOUNTPROFITSEG
Data type: TY_BAPIMEREQACCOUNTPROFITSEGOptional: Yes
Call by Reference: Yes
CH_HEADER - Transfer Structure for Enjoy Purchase Req. - Header
Data type: BAPIMEREQHEADEROptional: Yes
Call by Reference: Yes
CH_HEADERX - Change Parameter for Enjoy Purchase Requisition - Header
Data type: BAPIMEREQHEADERXOptional: Yes
Call by Reference: Yes
CH_VERSION - Table Type BAPIMEREQDCM
Data type: TY_BAPIMEREQDCMOptional: Yes
Call by Reference: Yes
CH_VERSIONX - Table Type BAPIMEREQDCMX
Data type: TY_BAPIMEREQDCMXOptional: Yes
Call by Reference: Yes
CH_SOURCE - Type BAPIMEREQSOURCE
Data type: TY_BAPIMEREQSOURCEOptional: Yes
Call by Reference: Yes
CH_COMPONENTS - Subcontracting for BAPI of Purchase Requisition BUS2105
Data type: TY_BAPIMEREQCOMPONENTOptional: Yes
Call by Reference: Yes
CH_ITEMTEXT - Type BAPIMEREQITEMTEXT
Data type: TY_BAPIMEREQITEMTEXTOptional: Yes
Call by Reference: Yes
CH_COMPONENTSX - Subcontracting for BAPI of Purchase Requisition BUS2105
Data type: TY_BAPIMEREQCOMPONENTXOptional: Yes
Call by Reference: Yes
CH_SERIALNUMBER - Serial Numbers in Purchase Requisition BAPI
Data type: BAPIMEREQ_T_SERIALNOOptional: Yes
Call by Reference: Yes
CH_SERIALNUMBERX - Change Parameter for Serial Nos. in Purch. Requisition BAPI
Data type: BAPIMEREQ_T_SERIALNOXOptional: Yes
Call by Reference: Yes
CH_RETURN - Exceptions During Purchase Requisition Validation
Data type: MEREQ_T_BAPIRET2Optional: Yes
Call by Reference: Yes
CH_EXTENSIONIN - Table Type for BAPIPAREX
Data type: BAPIPAREX_TPOptional: Yes
Call by Reference: Yes
CH_EXTENSIONOUT - Table Type for BAPIPAREX
Data type: BAPIPAREX_TPOptional: Yes
Call by Reference: Yes
CH_HEADERTEXT - Type BAPIMEREQHEADTEXT
Data type: TY_BAPIMEREQHEADTEXTOptional: Yes
Call by Reference: Yes
CH_ITEM - Type BAPIMEREQITEMIMP
Data type: TY_BAPIMEREQITEMIMPOptional: Yes
Call by Reference: Yes
CH_ITEMX - Type BAPIMEREQITEMX
Data type: TY_BAPIMEREQITEMXOptional: Yes
Call by Reference: Yes
CH_ITEMEXP - type for BAPIMEREQITEM
Data type: TY_BAPIMEREQITEMOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for MEREQBADI_BAPI 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_im_banfn | TYPE BANFN, " | |||
| lv_ch_testrun | TYPE MMPUR_BOOL, " MMPUR_NO | |||
| lv_ch_addrdelivery | TYPE TY_BAPIMERQADDRDELIVERY, " | |||
| lv_ch_account | TYPE TY_BAPIMEREQACCOUNT, " | |||
| lv_ch_accountx | TYPE TY_BAPIMEREQACCOUNTX, " | |||
| lv_ch_profitsegment | TYPE TY_BAPIMEREQACCOUNTPROFITSEG, " | |||
| lv_ch_header | TYPE BAPIMEREQHEADER, " | |||
| lv_ch_headerx | TYPE BAPIMEREQHEADERX, " | |||
| lv_ch_version | TYPE TY_BAPIMEREQDCM, " | |||
| lv_ch_versionx | TYPE TY_BAPIMEREQDCMX, " | |||
| lv_ch_source | TYPE TY_BAPIMEREQSOURCE, " | |||
| lv_ch_components | TYPE TY_BAPIMEREQCOMPONENT, " | |||
| lv_im_aktyp | TYPE T160-TRTYP, " | |||
| lv_ch_itemtext | TYPE TY_BAPIMEREQITEMTEXT, " | |||
| lv_ch_componentsx | TYPE TY_BAPIMEREQCOMPONENTX, " | |||
| lv_ch_serialnumber | TYPE BAPIMEREQ_T_SERIALNO, " | |||
| lv_ch_serialnumberx | TYPE BAPIMEREQ_T_SERIALNOX, " | |||
| lv_im_vorga | TYPE ANY, " | |||
| lv_ch_return | TYPE MEREQ_T_BAPIRET2, " | |||
| lv_ch_extensionin | TYPE BAPIPAREX_TP, " | |||
| lv_ch_extensionout | TYPE BAPIPAREX_TP, " | |||
| lv_ch_headertext | TYPE TY_BAPIMEREQHEADTEXT, " | |||
| lv_ch_item | TYPE TY_BAPIMEREQITEMIMP, " | |||
| lv_ch_itemx | TYPE TY_BAPIMEREQITEMX, " | |||
| lv_ch_itemexp | TYPE TY_BAPIMEREQITEM. " |
|   CALL FUNCTION 'MEREQBADI_BAPI' "NOTRANSL: Bestellanforderungs-BAPI |
| EXPORTING | ||
| IM_BANFN | = lv_im_banfn | |
| IM_AKTYP | = lv_im_aktyp | |
| IM_VORGA | = lv_im_vorga | |
| CHANGING | ||
| CH_TESTRUN | = lv_ch_testrun | |
| CH_ADDRDELIVERY | = lv_ch_addrdelivery | |
| CH_ACCOUNT | = lv_ch_account | |
| CH_ACCOUNTX | = lv_ch_accountx | |
| CH_PROFITSEGMENT | = lv_ch_profitsegment | |
| CH_HEADER | = lv_ch_header | |
| CH_HEADERX | = lv_ch_headerx | |
| CH_VERSION | = lv_ch_version | |
| CH_VERSIONX | = lv_ch_versionx | |
| CH_SOURCE | = lv_ch_source | |
| CH_COMPONENTS | = lv_ch_components | |
| CH_ITEMTEXT | = lv_ch_itemtext | |
| CH_COMPONENTSX | = lv_ch_componentsx | |
| CH_SERIALNUMBER | = lv_ch_serialnumber | |
| CH_SERIALNUMBERX | = lv_ch_serialnumberx | |
| CH_RETURN | = lv_ch_return | |
| CH_EXTENSIONIN | = lv_ch_extensionin | |
| CH_EXTENSIONOUT | = lv_ch_extensionout | |
| CH_HEADERTEXT | = lv_ch_headertext | |
| CH_ITEM | = lv_ch_item | |
| CH_ITEMX | = lv_ch_itemx | |
| CH_ITEMEXP | = lv_ch_itemexp | |
| . " MEREQBADI_BAPI | ||
ABAP code using 7.40 inline data declarations to call FM MEREQBADI_BAPI
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_ch_testrun) | = MMPUR_NO. | |||
| "SELECT single TRTYP FROM T160 INTO @DATA(ld_im_aktyp). | ||||
Search for further information about these or an SAP related objects