SAP MRM_INVOICE_VERIFICATION_ERS Function Module for Logistics Invoice Verification: Function module for ERS procedure
MRM_INVOICE_VERIFICATION_ERS is a standard mrm invoice verification ers SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Logistics Invoice Verification: Function module for ERS procedure 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 mrm invoice verification ers FM, simply by entering the name MRM_INVOICE_VERIFICATION_ERS into the relevant SAP transaction such as SE37 or SE38.
Function Group: MRMH
Program Name: SAPLMRMH
Main Program: SAPLMRMH
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MRM_INVOICE_VERIFICATION_ERS 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 'MRM_INVOICE_VERIFICATION_ERS'"Logistics Invoice Verification: Function module for ERS procedure.
EXPORTING
I_LIFNR = "Vendor
* IS_ENHANCEMENT = "IS Enhancement Structure - FM Import Parameter
* I_XTM = ' ' "
I_BUKRS = "Company Code
I_LIFRE = "
I_WAERS = "Currency Key
I_WKURS = "Exchange rate
I_ZTERM = "Terms of Payment Key
I_XRECH = "
I_RETPO = "
* I_SIMULATION = ' ' "
IMPORTING
E_RBKPV = "Logistics Invoice Document
TABLES
TI_SELWENR = "
* TI_SETTLE_DC = "Planned Delivery Costs for ERS
EXCEPTIONS
NO_ENTRY_FOUND = 1 NO_INVOICE_CREATED = 2
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLMRMH_001 Customer Exit: ERS - Change Header Field
EXIT_SAPLMRMH_002 Customer Exit: ERS - Change Item Fields
EXIT_SAPLMRMH_011 Customer Exit: EDI Invoice Receipt - Change Company Code and Vendor
EXIT_SAPLMRMH_012 Customer Exit: EDI Invoice Receipt - Change SAP Tax Code
EXIT_SAPLMRMH_013 Customer Exit: EDI Invoice Receipt - Change Assignment
EXIT_SAPLMRMH_014 Customer Exit: EDI Invoice Receipt - Change IDoc Segment
EXIT_SAPLMRMH_015 Customer Exit: EDI Invoice Receipt - Change Document Item Before Posting
IMPORTING Parameters details for MRM_INVOICE_VERIFICATION_ERS
I_LIFNR - Vendor
Data type: EKKO-LIFNROptional: No
Call by Reference: No ( called with pass by value option)
IS_ENHANCEMENT - IS Enhancement Structure - FM Import Parameter
Data type: ISI_MRM_INVOICE_VERIFICATION_EOptional: Yes
Call by Reference: Yes
I_XTM -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company Code
Data type: EKKO-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_LIFRE -
Data type: EKKO-LIFREOptional: No
Call by Reference: No ( called with pass by value option)
I_WAERS - Currency Key
Data type: EKKO-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
I_WKURS - Exchange rate
Data type: EKKO-WKURSOptional: No
Call by Reference: No ( called with pass by value option)
I_ZTERM - Terms of Payment Key
Data type: EKKO-ZTERMOptional: No
Call by Reference: No ( called with pass by value option)
I_XRECH -
Data type: MRM_RBKPV-XRECHOptional: No
Call by Reference: No ( called with pass by value option)
I_RETPO -
Data type: EKPO-RETPOOptional: No
Call by Reference: No ( called with pass by value option)
I_SIMULATION -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MRM_INVOICE_VERIFICATION_ERS
E_RBKPV - Logistics Invoice Document
Data type: MRM_RBKPVOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MRM_INVOICE_VERIFICATION_ERS
TI_SELWENR -
Data type: EK08ERSWEOptional: No
Call by Reference: No ( called with pass by value option)
TI_SETTLE_DC - Planned Delivery Costs for ERS
Data type: EK08ERSDCOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_ENTRY_FOUND - No Entry Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_INVOICE_CREATED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MRM_INVOICE_VERIFICATION_ERS 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_e_rbkpv | TYPE MRM_RBKPV, " | |||
| lv_i_lifnr | TYPE EKKO-LIFNR, " | |||
| lt_ti_selwenr | TYPE STANDARD TABLE OF EK08ERSWE, " | |||
| lv_no_entry_found | TYPE EK08ERSWE, " | |||
| lv_is_enhancement | TYPE ISI_MRM_INVOICE_VERIFICATION_E, " | |||
| lv_i_xtm | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_bukrs | TYPE EKKO-BUKRS, " | |||
| lt_ti_settle_dc | TYPE STANDARD TABLE OF EK08ERSDC, " | |||
| lv_no_invoice_created | TYPE EK08ERSDC, " | |||
| lv_i_lifre | TYPE EKKO-LIFRE, " | |||
| lv_i_waers | TYPE EKKO-WAERS, " | |||
| lv_i_wkurs | TYPE EKKO-WKURS, " | |||
| lv_i_zterm | TYPE EKKO-ZTERM, " | |||
| lv_i_xrech | TYPE MRM_RBKPV-XRECH, " | |||
| lv_i_retpo | TYPE EKPO-RETPO, " | |||
| lv_i_simulation | TYPE BOOLE-BOOLE. " SPACE |
|   CALL FUNCTION 'MRM_INVOICE_VERIFICATION_ERS' "Logistics Invoice Verification: Function module for ERS procedure |
| EXPORTING | ||
| I_LIFNR | = lv_i_lifnr | |
| IS_ENHANCEMENT | = lv_is_enhancement | |
| I_XTM | = lv_i_xtm | |
| I_BUKRS | = lv_i_bukrs | |
| I_LIFRE | = lv_i_lifre | |
| I_WAERS | = lv_i_waers | |
| I_WKURS | = lv_i_wkurs | |
| I_ZTERM | = lv_i_zterm | |
| I_XRECH | = lv_i_xrech | |
| I_RETPO | = lv_i_retpo | |
| I_SIMULATION | = lv_i_simulation | |
| IMPORTING | ||
| E_RBKPV | = lv_e_rbkpv | |
| TABLES | ||
| TI_SELWENR | = lt_ti_selwenr | |
| TI_SETTLE_DC | = lt_ti_settle_dc | |
| EXCEPTIONS | ||
| NO_ENTRY_FOUND = 1 | ||
| NO_INVOICE_CREATED = 2 | ||
| . " MRM_INVOICE_VERIFICATION_ERS | ||
ABAP code using 7.40 inline data declarations to call FM MRM_INVOICE_VERIFICATION_ERS
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 LIFNR FROM EKKO INTO @DATA(ld_i_lifnr). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xtm). | ||||
| DATA(ld_i_xtm) | = ' '. | |||
| "SELECT single BUKRS FROM EKKO INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single LIFRE FROM EKKO INTO @DATA(ld_i_lifre). | ||||
| "SELECT single WAERS FROM EKKO INTO @DATA(ld_i_waers). | ||||
| "SELECT single WKURS FROM EKKO INTO @DATA(ld_i_wkurs). | ||||
| "SELECT single ZTERM FROM EKKO INTO @DATA(ld_i_zterm). | ||||
| "SELECT single XRECH FROM MRM_RBKPV INTO @DATA(ld_i_xrech). | ||||
| "SELECT single RETPO FROM EKPO INTO @DATA(ld_i_retpo). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_simulation). | ||||
| DATA(ld_i_simulation) | = ' '. | |||
Search for further information about these or an SAP related objects