SAP MRM_DOCUMENT_CHANGE_PREPARE Function Module for NOTRANSL: Änderung für Update
MRM_DOCUMENT_CHANGE_PREPARE is a standard mrm document change prepare 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: Änderung für Update 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 document change prepare FM, simply by entering the name MRM_DOCUMENT_CHANGE_PREPARE 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_DOCUMENT_CHANGE_PREPARE 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_DOCUMENT_CHANGE_PREPARE'"NOTRANSL: Änderung für Update.
EXPORTING
I_RBKP = "Document Header in Incoming Invoice
TI_RSEG = "
TI_RBCO = "
TI_RBMA = "
TI_RBTX = "
TI_RBVS = "
TI_RBWS = "
I_XUPDA = "Select
IMPORTING
E_RBKP_OLD = "Document Header in Incoming Invoice
TE_RBCO_NEW = "
TE_RBMA_NEW = "
TE_RBTX_NEW = "
TE_RBVS_NEW = "
TE_RBWS_NEW = "
TE_MRMRSEG = "
TE_MRMRBCO = "
TE_MRMRBMA = "
TE_MRMRBTX = "
TE_MRMRBVS = "
E_RBKP_NEW = "Document Header in Incoming Invoice
TE_MRMRBWS = "
TE_RSEG_OLD = "
TE_RBCO_OLD = "
TE_RBMA_OLD = "
TE_RBTX_OLD = "
TE_RBVS_OLD = "
TE_RBWS_OLD = "
TE_RSEG_NEW = "
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_DOCUMENT_CHANGE_PREPARE
I_RBKP - Document Header in Incoming Invoice
Data type: RBKPOptional: No
Call by Reference: Yes
TI_RSEG -
Data type: MRM_TAB_RSEGOptional: No
Call by Reference: Yes
TI_RBCO -
Data type: MRM_TAB_RBCOOptional: No
Call by Reference: Yes
TI_RBMA -
Data type: MRM_TAB_RBMAOptional: No
Call by Reference: Yes
TI_RBTX -
Data type: MRM_TAB_RBTXOptional: No
Call by Reference: Yes
TI_RBVS -
Data type: MRM_TAB_RBVSOptional: No
Call by Reference: Yes
TI_RBWS -
Data type: MRM_TAB_RBWSOptional: No
Call by Reference: Yes
I_XUPDA - Select
Data type: MARKEOptional: No
Call by Reference: Yes
EXPORTING Parameters details for MRM_DOCUMENT_CHANGE_PREPARE
E_RBKP_OLD - Document Header in Incoming Invoice
Data type: RBKPOptional: No
Call by Reference: Yes
TE_RBCO_NEW -
Data type: MRM_TAB_MRMRBCOOptional: No
Call by Reference: Yes
TE_RBMA_NEW -
Data type: MRM_TAB_MRMRBMAOptional: No
Call by Reference: Yes
TE_RBTX_NEW -
Data type: MRM_TAB_MRMRBTXOptional: No
Call by Reference: Yes
TE_RBVS_NEW -
Data type: MRM_TAB_MRMRBVSOptional: No
Call by Reference: Yes
TE_RBWS_NEW -
Data type: MRM_TAB_MRMRBWSOptional: No
Call by Reference: Yes
TE_MRMRSEG -
Data type: MRM_TAB_MRMRSEGOptional: No
Call by Reference: Yes
TE_MRMRBCO -
Data type: MRM_TAB_MRMRBCOOptional: No
Call by Reference: Yes
TE_MRMRBMA -
Data type: MRM_TAB_MRMRBMAOptional: No
Call by Reference: Yes
TE_MRMRBTX -
Data type: MRM_TAB_MRMRBTXOptional: No
Call by Reference: Yes
TE_MRMRBVS -
Data type: MRM_TAB_MRMRBVSOptional: No
Call by Reference: Yes
E_RBKP_NEW - Document Header in Incoming Invoice
Data type: RBKPOptional: No
Call by Reference: Yes
TE_MRMRBWS -
Data type: MRM_TAB_MRMRBWSOptional: No
Call by Reference: Yes
TE_RSEG_OLD -
Data type: MRM_TAB_MRMRSEGOptional: No
Call by Reference: Yes
TE_RBCO_OLD -
Data type: MRM_TAB_MRMRBCOOptional: No
Call by Reference: Yes
TE_RBMA_OLD -
Data type: MRM_TAB_MRMRBMAOptional: No
Call by Reference: Yes
TE_RBTX_OLD -
Data type: MRM_TAB_MRMRBTXOptional: No
Call by Reference: Yes
TE_RBVS_OLD -
Data type: MRM_TAB_MRMRBVSOptional: No
Call by Reference: Yes
TE_RBWS_OLD -
Data type: MRM_TAB_MRMRBWSOptional: No
Call by Reference: Yes
TE_RSEG_NEW -
Data type: MRM_TAB_MRMRSEGOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for MRM_DOCUMENT_CHANGE_PREPARE 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_i_rbkp | TYPE RBKP, " | |||
| lv_e_rbkp_old | TYPE RBKP, " | |||
| lv_te_rbco_new | TYPE MRM_TAB_MRMRBCO, " | |||
| lv_te_rbma_new | TYPE MRM_TAB_MRMRBMA, " | |||
| lv_te_rbtx_new | TYPE MRM_TAB_MRMRBTX, " | |||
| lv_te_rbvs_new | TYPE MRM_TAB_MRMRBVS, " | |||
| lv_te_rbws_new | TYPE MRM_TAB_MRMRBWS, " | |||
| lv_te_mrmrseg | TYPE MRM_TAB_MRMRSEG, " | |||
| lv_te_mrmrbco | TYPE MRM_TAB_MRMRBCO, " | |||
| lv_te_mrmrbma | TYPE MRM_TAB_MRMRBMA, " | |||
| lv_te_mrmrbtx | TYPE MRM_TAB_MRMRBTX, " | |||
| lv_te_mrmrbvs | TYPE MRM_TAB_MRMRBVS, " | |||
| lv_ti_rseg | TYPE MRM_TAB_RSEG, " | |||
| lv_e_rbkp_new | TYPE RBKP, " | |||
| lv_te_mrmrbws | TYPE MRM_TAB_MRMRBWS, " | |||
| lv_ti_rbco | TYPE MRM_TAB_RBCO, " | |||
| lv_te_rseg_old | TYPE MRM_TAB_MRMRSEG, " | |||
| lv_ti_rbma | TYPE MRM_TAB_RBMA, " | |||
| lv_te_rbco_old | TYPE MRM_TAB_MRMRBCO, " | |||
| lv_ti_rbtx | TYPE MRM_TAB_RBTX, " | |||
| lv_te_rbma_old | TYPE MRM_TAB_MRMRBMA, " | |||
| lv_ti_rbvs | TYPE MRM_TAB_RBVS, " | |||
| lv_te_rbtx_old | TYPE MRM_TAB_MRMRBTX, " | |||
| lv_ti_rbws | TYPE MRM_TAB_RBWS, " | |||
| lv_te_rbvs_old | TYPE MRM_TAB_MRMRBVS, " | |||
| lv_i_xupda | TYPE MARKE, " | |||
| lv_te_rbws_old | TYPE MRM_TAB_MRMRBWS, " | |||
| lv_te_rseg_new | TYPE MRM_TAB_MRMRSEG. " |
|   CALL FUNCTION 'MRM_DOCUMENT_CHANGE_PREPARE' "NOTRANSL: Änderung für Update |
| EXPORTING | ||
| I_RBKP | = lv_i_rbkp | |
| TI_RSEG | = lv_ti_rseg | |
| TI_RBCO | = lv_ti_rbco | |
| TI_RBMA | = lv_ti_rbma | |
| TI_RBTX | = lv_ti_rbtx | |
| TI_RBVS | = lv_ti_rbvs | |
| TI_RBWS | = lv_ti_rbws | |
| I_XUPDA | = lv_i_xupda | |
| IMPORTING | ||
| E_RBKP_OLD | = lv_e_rbkp_old | |
| TE_RBCO_NEW | = lv_te_rbco_new | |
| TE_RBMA_NEW | = lv_te_rbma_new | |
| TE_RBTX_NEW | = lv_te_rbtx_new | |
| TE_RBVS_NEW | = lv_te_rbvs_new | |
| TE_RBWS_NEW | = lv_te_rbws_new | |
| TE_MRMRSEG | = lv_te_mrmrseg | |
| TE_MRMRBCO | = lv_te_mrmrbco | |
| TE_MRMRBMA | = lv_te_mrmrbma | |
| TE_MRMRBTX | = lv_te_mrmrbtx | |
| TE_MRMRBVS | = lv_te_mrmrbvs | |
| E_RBKP_NEW | = lv_e_rbkp_new | |
| TE_MRMRBWS | = lv_te_mrmrbws | |
| TE_RSEG_OLD | = lv_te_rseg_old | |
| TE_RBCO_OLD | = lv_te_rbco_old | |
| TE_RBMA_OLD | = lv_te_rbma_old | |
| TE_RBTX_OLD | = lv_te_rbtx_old | |
| TE_RBVS_OLD | = lv_te_rbvs_old | |
| TE_RBWS_OLD | = lv_te_rbws_old | |
| TE_RSEG_NEW | = lv_te_rseg_new | |
| . " MRM_DOCUMENT_CHANGE_PREPARE | ||
ABAP code using 7.40 inline data declarations to call FM MRM_DOCUMENT_CHANGE_PREPARE
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.Search for further information about these or an SAP related objects