SAP MM_DOCUMENT_CHANGE_PREPARE Function Module for Preparation of Document Changes for Document Index









MM_DOCUMENT_CHANGE_PREPARE is a standard mm 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 Preparation of Document Changes for Document Index 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 mm document change prepare FM, simply by entering the name MM_DOCUMENT_CHANGE_PREPARE into the relevant SAP transaction such as SE37 or SE38.

Function Group: WIN3
Program Name: SAPLWIN3
Main Program: SAPLWIN3
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MM_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 'MM_DOCUMENT_CHANGE_PREPARE'"Preparation of Document Changes for Document Index
EXPORTING
CALCULATION_TYPE = "
* SAPGUI_MESSAGE = ' ' "
* I_NO_MESSAGING = 'X' "
* I_NO_MESSAGE_REQ = 'X' "
* I_NO_AUTHORITY_CHECK = 'X' "
* I_DOCUMENT_FIELD = 'CONDITION' "
* I_COMMIT_AND_WAIT = "
* I_MAXBLSTP = "
* I_BLTYP = '01' "

TABLES
XEKKO = "
DOCUMENT_INDEX = "
DOCUMENT_CHANGE_TAB = "
* ERROR_MESSAGES = "
T_WINDVB = "
.



IMPORTING Parameters details for MM_DOCUMENT_CHANGE_PREPARE

CALCULATION_TYPE -

Data type: KOMV-KSTEU
Optional: No
Call by Reference: No ( called with pass by value option)

SAPGUI_MESSAGE -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NO_MESSAGING -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NO_MESSAGE_REQ -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NO_AUTHORITY_CHECK -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DOCUMENT_FIELD -

Data type: C
Default: 'CONDITION'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_COMMIT_AND_WAIT -

Data type: C
Optional: Yes
Call by Reference: Yes

I_MAXBLSTP -

Data type: N
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BLTYP -

Data type: BLTYP
Default: '01'
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for MM_DOCUMENT_CHANGE_PREPARE

XEKKO -

Data type: EKKO
Optional: No
Call by Reference: No ( called with pass by value option)

DOCUMENT_INDEX -

Data type: BELINDEX
Optional: No
Call by Reference: No ( called with pass by value option)

DOCUMENT_CHANGE_TAB -

Data type: WIND_DOCU_DATA_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_MESSAGES -

Data type: BELIND_ERR
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_WINDVB -

Data type: WINDVB
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MM_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:
lt_xekko  TYPE STANDARD TABLE OF EKKO, "   
lv_calculation_type  TYPE KOMV-KSTEU, "   
lt_document_index  TYPE STANDARD TABLE OF BELINDEX, "   
lv_sapgui_message  TYPE C, "   SPACE
lv_i_no_messaging  TYPE C, "   'X'
lt_document_change_tab  TYPE STANDARD TABLE OF WIND_DOCU_DATA_TAB, "   
lt_error_messages  TYPE STANDARD TABLE OF BELIND_ERR, "   
lv_i_no_message_req  TYPE C, "   'X'
lt_t_windvb  TYPE STANDARD TABLE OF WINDVB, "   
lv_i_no_authority_check  TYPE C, "   'X'
lv_i_document_field  TYPE C, "   'CONDITION'
lv_i_commit_and_wait  TYPE C, "   
lv_i_maxblstp  TYPE N, "   
lv_i_bltyp  TYPE BLTYP. "   '01'

  CALL FUNCTION 'MM_DOCUMENT_CHANGE_PREPARE'  "Preparation of Document Changes for Document Index
    EXPORTING
         CALCULATION_TYPE = lv_calculation_type
         SAPGUI_MESSAGE = lv_sapgui_message
         I_NO_MESSAGING = lv_i_no_messaging
         I_NO_MESSAGE_REQ = lv_i_no_message_req
         I_NO_AUTHORITY_CHECK = lv_i_no_authority_check
         I_DOCUMENT_FIELD = lv_i_document_field
         I_COMMIT_AND_WAIT = lv_i_commit_and_wait
         I_MAXBLSTP = lv_i_maxblstp
         I_BLTYP = lv_i_bltyp
    TABLES
         XEKKO = lt_xekko
         DOCUMENT_INDEX = lt_document_index
         DOCUMENT_CHANGE_TAB = lt_document_change_tab
         ERROR_MESSAGES = lt_error_messages
         T_WINDVB = lt_t_windvb
. " MM_DOCUMENT_CHANGE_PREPARE




ABAP code using 7.40 inline data declarations to call FM MM_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.

 
"SELECT single KSTEU FROM KOMV INTO @DATA(ld_calculation_type).
 
 
DATA(ld_sapgui_message) = ' '.
 
DATA(ld_i_no_messaging) = 'X'.
 
 
 
DATA(ld_i_no_message_req) = 'X'.
 
 
DATA(ld_i_no_authority_check) = 'X'.
 
DATA(ld_i_document_field) = 'CONDITION'.
 
 
 
DATA(ld_i_bltyp) = '01'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!