SAP MRM_INVOICE_SAVE_WITH_NEW_KEY Function Module for NOTRANSL: Logistik-Rechnungsprüfung: Beleg merken bei Geschäftsjahreswechs
MRM_INVOICE_SAVE_WITH_NEW_KEY is a standard mrm invoice save with new key 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: Logistik-Rechnungsprüfung: Beleg merken bei Geschäftsjahreswechs 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 save with new key FM, simply by entering the name MRM_INVOICE_SAVE_WITH_NEW_KEY into the relevant SAP transaction such as SE37 or SE38.
Function Group: MRME
Program Name: SAPLMRME
Main Program: SAPLMRME
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MRM_INVOICE_SAVE_WITH_NEW_KEY 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_SAVE_WITH_NEW_KEY'"NOTRANSL: Logistik-Rechnungsprüfung: Beleg merken bei Geschäftsjahreswechs.
EXPORTING
I_RBKPV = "
* TI_SELWERK = "Invoice Receipt, Plants Selection
* TI_KONV = "
* TI_SELERFB = "Invoice Receipt, Service Entry Sheet Selection
* I_XBATCH = ' ' "Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
I_XUPDA = "Select
I_XSELK = "Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
* I_XNOTIZ = ' ' "Indicates Whether a Note Exists
I_GJAHR = "Fiscal Year
* TI_DRSEG = "
* TI_SELBEST = "Invoice Receipt, Purchasing Documents Selection
* TI_SELLIFS = "Invoice Receipt, Delivery Notes Selection
* TI_SELFRBR = "Invoice Receipt, Bills of Lading Selection
IMPORTING
E_BELNR = "Document Number of an Invoice Document
E_GJAHR = "Fiscal Year
TE_ERRPROT = "
EXCEPTIONS
INVALID_STATUS = 1 UPDATE_IMPOSSIBLE = 2 USER_EXIT = 3
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_SAPLMRME_003 Customer Exit: Number Assignment in Logistics Invoice Verification
IMPORTING Parameters details for MRM_INVOICE_SAVE_WITH_NEW_KEY
I_RBKPV -
Data type: MRM_RBKPVOptional: No
Call by Reference: Yes
TI_SELWERK - Invoice Receipt, Plants Selection
Data type: MRM_TAB_SELWERKOptional: Yes
Call by Reference: No ( called with pass by value option)
TI_KONV -
Data type: MRM_TAB_KONVOptional: Yes
Call by Reference: No ( called with pass by value option)
TI_SELERFB - Invoice Receipt, Service Entry Sheet Selection
Data type: MRM_TAB_SELERFBOptional: Yes
Call by Reference: No ( called with pass by value option)
I_XBATCH - Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XUPDA - Select
Data type: DRSEG-XUPDAOptional: No
Call by Reference: Yes
I_XSELK - Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
Data type: BOOLE-BOOLEOptional: No
Call by Reference: Yes
I_XNOTIZ - Indicates Whether a Note Exists
Data type: RBKP_V-XNOTIZDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_GJAHR - Fiscal Year
Data type: RBKP_V-GJAHROptional: No
Call by Reference: Yes
TI_DRSEG -
Data type: MMCR_TDRSEGOptional: Yes
Call by Reference: No ( called with pass by value option)
TI_SELBEST - Invoice Receipt, Purchasing Documents Selection
Data type: MRM_TAB_SELBESTOptional: Yes
Call by Reference: No ( called with pass by value option)
TI_SELLIFS - Invoice Receipt, Delivery Notes Selection
Data type: MRM_TAB_SELLIFSOptional: Yes
Call by Reference: No ( called with pass by value option)
TI_SELFRBR - Invoice Receipt, Bills of Lading Selection
Data type: MRM_TAB_SELFRBROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MRM_INVOICE_SAVE_WITH_NEW_KEY
E_BELNR - Document Number of an Invoice Document
Data type: RBKP-BELNROptional: No
Call by Reference: No ( called with pass by value option)
E_GJAHR - Fiscal Year
Data type: RBKP-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
TE_ERRPROT -
Data type: MRM_TAB_ERRPROTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_STATUS -
Data type:Optional: No
Call by Reference: Yes
UPDATE_IMPOSSIBLE -
Data type:Optional: No
Call by Reference: Yes
USER_EXIT - Termination by User
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for MRM_INVOICE_SAVE_WITH_NEW_KEY 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_belnr | TYPE RBKP-BELNR, " | |||
| lv_i_rbkpv | TYPE MRM_RBKPV, " | |||
| lv_invalid_status | TYPE MRM_RBKPV, " | |||
| lv_ti_selwerk | TYPE MRM_TAB_SELWERK, " | |||
| lv_ti_konv | TYPE MRM_TAB_KONV, " | |||
| lv_ti_selerfb | TYPE MRM_TAB_SELERFB, " | |||
| lv_i_xbatch | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_e_gjahr | TYPE RBKP-GJAHR, " | |||
| lv_i_xupda | TYPE DRSEG-XUPDA, " | |||
| lv_update_impossible | TYPE DRSEG, " | |||
| lv_i_xselk | TYPE BOOLE-BOOLE, " | |||
| lv_user_exit | TYPE BOOLE, " | |||
| lv_te_errprot | TYPE MRM_TAB_ERRPROT, " | |||
| lv_i_xnotiz | TYPE RBKP_V-XNOTIZ, " SPACE | |||
| lv_i_gjahr | TYPE RBKP_V-GJAHR, " | |||
| lv_ti_drseg | TYPE MMCR_TDRSEG, " | |||
| lv_ti_selbest | TYPE MRM_TAB_SELBEST, " | |||
| lv_ti_sellifs | TYPE MRM_TAB_SELLIFS, " | |||
| lv_ti_selfrbr | TYPE MRM_TAB_SELFRBR. " |
|   CALL FUNCTION 'MRM_INVOICE_SAVE_WITH_NEW_KEY' "NOTRANSL: Logistik-Rechnungsprüfung: Beleg merken bei Geschäftsjahreswechs |
| EXPORTING | ||
| I_RBKPV | = lv_i_rbkpv | |
| TI_SELWERK | = lv_ti_selwerk | |
| TI_KONV | = lv_ti_konv | |
| TI_SELERFB | = lv_ti_selerfb | |
| I_XBATCH | = lv_i_xbatch | |
| I_XUPDA | = lv_i_xupda | |
| I_XSELK | = lv_i_xselk | |
| I_XNOTIZ | = lv_i_xnotiz | |
| I_GJAHR | = lv_i_gjahr | |
| TI_DRSEG | = lv_ti_drseg | |
| TI_SELBEST | = lv_ti_selbest | |
| TI_SELLIFS | = lv_ti_sellifs | |
| TI_SELFRBR | = lv_ti_selfrbr | |
| IMPORTING | ||
| E_BELNR | = lv_e_belnr | |
| E_GJAHR | = lv_e_gjahr | |
| TE_ERRPROT | = lv_te_errprot | |
| EXCEPTIONS | ||
| INVALID_STATUS = 1 | ||
| UPDATE_IMPOSSIBLE = 2 | ||
| USER_EXIT = 3 | ||
| . " MRM_INVOICE_SAVE_WITH_NEW_KEY | ||
ABAP code using 7.40 inline data declarations to call FM MRM_INVOICE_SAVE_WITH_NEW_KEY
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 BELNR FROM RBKP INTO @DATA(ld_e_belnr). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xbatch). | ||||
| DATA(ld_i_xbatch) | = ' '. | |||
| "SELECT single GJAHR FROM RBKP INTO @DATA(ld_e_gjahr). | ||||
| "SELECT single XUPDA FROM DRSEG INTO @DATA(ld_i_xupda). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xselk). | ||||
| "SELECT single XNOTIZ FROM RBKP_V INTO @DATA(ld_i_xnotiz). | ||||
| DATA(ld_i_xnotiz) | = ' '. | |||
| "SELECT single GJAHR FROM RBKP_V INTO @DATA(ld_i_gjahr). | ||||
Search for further information about these or an SAP related objects