SAP MB_UPDATE_INVENTORY_DOCUMENT Function Module for Update of the physical inventory documents
MB_UPDATE_INVENTORY_DOCUMENT is a standard mb update inventory document SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update of the physical inventory documents 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 mb update inventory document FM, simply by entering the name MB_UPDATE_INVENTORY_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: MBIB
Program Name: SAPLMBIB
Main Program: SAPLMBIB
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1

Function MB_UPDATE_INVENTORY_DOCUMENT 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 'MB_UPDATE_INVENTORY_DOCUMENT'"Update of the physical inventory documents.
EXPORTING
L_TM07I = "Table with Fields for Physical Inventory Transaction Control
TABLES
XCM07I = "Work Structure for Status Fields in Physical Inventory Doc.
XIKPF = "Header: Physical Inventory Document
XISEG = "Physical Inventory Document Items
XVM07I = "Fields for Update Control of Module Pool SAPMM07I
ZIKPF = "Header: Physical Inventory Document
ZISEG = "Physical Inventory Document Items
OLD_ISEG = "Physical Inventory Document Items
* XMARV = "Lock Table for Material Control Record
IMPORTING Parameters details for MB_UPDATE_INVENTORY_DOCUMENT
L_TM07I - Table with Fields for Physical Inventory Transaction Control
Data type: TM07IOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MB_UPDATE_INVENTORY_DOCUMENT
XCM07I - Work Structure for Status Fields in Physical Inventory Doc.
Data type: CM07IOptional: No
Call by Reference: No ( called with pass by value option)
XIKPF - Header: Physical Inventory Document
Data type: IKPFOptional: No
Call by Reference: No ( called with pass by value option)
XISEG - Physical Inventory Document Items
Data type: ISEGOptional: No
Call by Reference: No ( called with pass by value option)
XVM07I - Fields for Update Control of Module Pool SAPMM07I
Data type: VM07IOptional: No
Call by Reference: No ( called with pass by value option)
ZIKPF - Header: Physical Inventory Document
Data type: IKPFOptional: No
Call by Reference: No ( called with pass by value option)
ZISEG - Physical Inventory Document Items
Data type: ISEGOptional: No
Call by Reference: No ( called with pass by value option)
OLD_ISEG - Physical Inventory Document Items
Data type: ISEGOptional: No
Call by Reference: No ( called with pass by value option)
XMARV - Lock Table for Material Control Record
Data type: SMARVOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for MB_UPDATE_INVENTORY_DOCUMENT 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_xcm07i | TYPE STANDARD TABLE OF CM07I, " | |||
| lv_l_tm07i | TYPE TM07I, " | |||
| lt_xikpf | TYPE STANDARD TABLE OF IKPF, " | |||
| lt_xiseg | TYPE STANDARD TABLE OF ISEG, " | |||
| lt_xvm07i | TYPE STANDARD TABLE OF VM07I, " | |||
| lt_zikpf | TYPE STANDARD TABLE OF IKPF, " | |||
| lt_ziseg | TYPE STANDARD TABLE OF ISEG, " | |||
| lt_old_iseg | TYPE STANDARD TABLE OF ISEG, " | |||
| lt_xmarv | TYPE STANDARD TABLE OF SMARV. " |
|   CALL FUNCTION 'MB_UPDATE_INVENTORY_DOCUMENT' "Update of the physical inventory documents |
| EXPORTING | ||
| L_TM07I | = lv_l_tm07i | |
| TABLES | ||
| XCM07I | = lt_xcm07i | |
| XIKPF | = lt_xikpf | |
| XISEG | = lt_xiseg | |
| XVM07I | = lt_xvm07i | |
| ZIKPF | = lt_zikpf | |
| ZISEG | = lt_ziseg | |
| OLD_ISEG | = lt_old_iseg | |
| XMARV | = lt_xmarv | |
| . " MB_UPDATE_INVENTORY_DOCUMENT | ||
ABAP code using 7.40 inline data declarations to call FM MB_UPDATE_INVENTORY_DOCUMENT
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