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

Function MRM_FINAL_CHECK 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_FINAL_CHECK'"Logistic invoice verification: Final check and posting preparation.
EXPORTING
I_RBKPV = "Invoice Document Header
* I_XPOST_PREPARE = 'X' "
* I_XUSVR = ' ' "
* I_SIMULATION = ' ' "
* IT_LIMIT = "Limits
IMPORTING
E_RBKPV = "
E_SKV_NAV_SUM = "
E_XUNKLFEH = "
E_SKTOBAS_INCL = "
E_SKTOBAS_EXCL = "
E_SKONTO_INCL = "
E_SKONTO_EXCL = "
E_SKONTO_BNK = "
E_FWSTE = "
E_FWNAV = "
E_NAV_BNK = "
CHANGING
* C_RET = "Table Type for Retention Amounts
TABLES
T_DRSEG = "Invoice Items
* T_RSKOF = "
* T_BSET = "
* T_TXTEMP = "
* T_KUERZ_BSET = "
* T_RIRK = "
* T_ERRPROT = "
EXCEPTIONS
ERROR_IN_FUNCTION_MODULE = 1 NO_ENTRY_FOUND = 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_SAPLMRMC_001 Customer Exit: Change Tolerance Check - Logistics Invoice Verification
EXIT_SAPLMRMC_002 Customer Exit: Change Criteria for Parked Document Release for Posting
IMPORTING Parameters details for MRM_FINAL_CHECK
I_RBKPV - Invoice Document Header
Data type: MRM_RBKPVOptional: No
Call by Reference: No ( called with pass by value option)
I_XPOST_PREPARE -
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XUSVR -
Data type: BKPF-XUSVRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SIMULATION -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_LIMIT - Limits
Data type: MMCR_TLIMITOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MRM_FINAL_CHECK
E_RBKPV -
Data type: MRM_RBKPVOptional: No
Call by Reference: No ( called with pass by value option)
E_SKV_NAV_SUM -
Data type: DRSEG-NAV_FWOptional: No
Call by Reference: No ( called with pass by value option)
E_XUNKLFEH -
Data type: BOOLE-BOOLEOptional: No
Call by Reference: No ( called with pass by value option)
E_SKTOBAS_INCL -
Data type: MRM_RBKPV-RMWWROptional: No
Call by Reference: No ( called with pass by value option)
E_SKTOBAS_EXCL -
Data type: MRM_RBKPV-RMWWROptional: No
Call by Reference: No ( called with pass by value option)
E_SKONTO_INCL -
Data type: MRM_RBKPV-RMWWROptional: No
Call by Reference: No ( called with pass by value option)
E_SKONTO_EXCL -
Data type: MRM_RBKPV-RMWWROptional: No
Call by Reference: No ( called with pass by value option)
E_SKONTO_BNK -
Data type: MRM_RBKPV-RMWWROptional: No
Call by Reference: No ( called with pass by value option)
E_FWSTE -
Data type: MRM_RBKPV-WMWST1Optional: No
Call by Reference: No ( called with pass by value option)
E_FWNAV -
Data type: MRM_RBKPV-WMWST1Optional: No
Call by Reference: No ( called with pass by value option)
E_NAV_BNK -
Data type: MRM_RBKPV-BEZNKOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for MRM_FINAL_CHECK
C_RET - Table Type for Retention Amounts
Data type: MRM_T_RETENTOptional: Yes
Call by Reference: Yes
TABLES Parameters details for MRM_FINAL_CHECK
T_DRSEG - Invoice Items
Data type: MMCR_TDRSEGOptional: No
Call by Reference: No ( called with pass by value option)
T_RSKOF -
Data type: RSKOFOptional: Yes
Call by Reference: No ( called with pass by value option)
T_BSET -
Data type: BSETOptional: Yes
Call by Reference: No ( called with pass by value option)
T_TXTEMP -
Data type: RBTX_TEMPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_KUERZ_BSET -
Data type: BSETOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RIRK -
Data type: RIRKOptional: Yes
Call by Reference: No ( called with pass by value option)
T_ERRPROT -
Data type: MRM_TAB_ERRPROTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_IN_FUNCTION_MODULE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_FOUND - No Entry Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MRM_FINAL_CHECK 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_c_ret | TYPE MRM_T_RETENT, " | |||
| lv_e_rbkpv | TYPE MRM_RBKPV, " | |||
| lv_i_rbkpv | TYPE MRM_RBKPV, " | |||
| lt_t_drseg | TYPE STANDARD TABLE OF MMCR_TDRSEG, " | |||
| lv_error_in_function_module | TYPE MMCR_TDRSEG, " | |||
| lv_e_skv_nav_sum | TYPE DRSEG-NAV_FW, " | |||
| lv_e_xunklfeh | TYPE BOOLE-BOOLE, " | |||
| lt_t_rskof | TYPE STANDARD TABLE OF RSKOF, " | |||
| lv_e_sktobas_incl | TYPE MRM_RBKPV-RMWWR, " | |||
| lv_no_entry_found | TYPE MRM_RBKPV, " | |||
| lv_i_xpost_prepare | TYPE BOOLE-BOOLE, " 'X' | |||
| lt_t_bset | TYPE STANDARD TABLE OF BSET, " | |||
| lv_i_xusvr | TYPE BKPF-XUSVR, " SPACE | |||
| lv_e_sktobas_excl | TYPE MRM_RBKPV-RMWWR, " | |||
| lt_t_txtemp | TYPE STANDARD TABLE OF RBTX_TEMP, " | |||
| lv_i_simulation | TYPE C, " SPACE | |||
| lv_e_skonto_incl | TYPE MRM_RBKPV-RMWWR, " | |||
| lv_it_limit | TYPE MMCR_TLIMIT, " | |||
| lt_t_kuerz_bset | TYPE STANDARD TABLE OF BSET, " | |||
| lv_e_skonto_excl | TYPE MRM_RBKPV-RMWWR, " | |||
| lt_t_rirk | TYPE STANDARD TABLE OF RIRK, " | |||
| lv_e_skonto_bnk | TYPE MRM_RBKPV-RMWWR, " | |||
| lv_e_fwste | TYPE MRM_RBKPV-WMWST1, " | |||
| lt_t_errprot | TYPE STANDARD TABLE OF MRM_TAB_ERRPROT, " | |||
| lv_e_fwnav | TYPE MRM_RBKPV-WMWST1, " | |||
| lv_e_nav_bnk | TYPE MRM_RBKPV-BEZNK. " |
|   CALL FUNCTION 'MRM_FINAL_CHECK' "Logistic invoice verification: Final check and posting preparation |
| EXPORTING | ||
| I_RBKPV | = lv_i_rbkpv | |
| I_XPOST_PREPARE | = lv_i_xpost_prepare | |
| I_XUSVR | = lv_i_xusvr | |
| I_SIMULATION | = lv_i_simulation | |
| IT_LIMIT | = lv_it_limit | |
| IMPORTING | ||
| E_RBKPV | = lv_e_rbkpv | |
| E_SKV_NAV_SUM | = lv_e_skv_nav_sum | |
| E_XUNKLFEH | = lv_e_xunklfeh | |
| E_SKTOBAS_INCL | = lv_e_sktobas_incl | |
| E_SKTOBAS_EXCL | = lv_e_sktobas_excl | |
| E_SKONTO_INCL | = lv_e_skonto_incl | |
| E_SKONTO_EXCL | = lv_e_skonto_excl | |
| E_SKONTO_BNK | = lv_e_skonto_bnk | |
| E_FWSTE | = lv_e_fwste | |
| E_FWNAV | = lv_e_fwnav | |
| E_NAV_BNK | = lv_e_nav_bnk | |
| CHANGING | ||
| C_RET | = lv_c_ret | |
| TABLES | ||
| T_DRSEG | = lt_t_drseg | |
| T_RSKOF | = lt_t_rskof | |
| T_BSET | = lt_t_bset | |
| T_TXTEMP | = lt_t_txtemp | |
| T_KUERZ_BSET | = lt_t_kuerz_bset | |
| T_RIRK | = lt_t_rirk | |
| T_ERRPROT | = lt_t_errprot | |
| EXCEPTIONS | ||
| ERROR_IN_FUNCTION_MODULE = 1 | ||
| NO_ENTRY_FOUND = 2 | ||
| . " MRM_FINAL_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM MRM_FINAL_CHECK
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 NAV_FW FROM DRSEG INTO @DATA(ld_e_skv_nav_sum). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_e_xunklfeh). | ||||
| "SELECT single RMWWR FROM MRM_RBKPV INTO @DATA(ld_e_sktobas_incl). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xpost_prepare). | ||||
| DATA(ld_i_xpost_prepare) | = 'X'. | |||
| "SELECT single XUSVR FROM BKPF INTO @DATA(ld_i_xusvr). | ||||
| DATA(ld_i_xusvr) | = ' '. | |||
| "SELECT single RMWWR FROM MRM_RBKPV INTO @DATA(ld_e_sktobas_excl). | ||||
| DATA(ld_i_simulation) | = ' '. | |||
| "SELECT single RMWWR FROM MRM_RBKPV INTO @DATA(ld_e_skonto_incl). | ||||
| "SELECT single RMWWR FROM MRM_RBKPV INTO @DATA(ld_e_skonto_excl). | ||||
| "SELECT single RMWWR FROM MRM_RBKPV INTO @DATA(ld_e_skonto_bnk). | ||||
| "SELECT single WMWST1 FROM MRM_RBKPV INTO @DATA(ld_e_fwste). | ||||
| "SELECT single WMWST1 FROM MRM_RBKPV INTO @DATA(ld_e_fwnav). | ||||
| "SELECT single BEZNK FROM MRM_RBKPV INTO @DATA(ld_e_nav_bnk). | ||||
Search for further information about these or an SAP related objects