SAP MB_PHYSICAL_INVENTORY Function Module for NOTRANSL: Aufruf und Steuerung der Inventurfunktionen
MB_PHYSICAL_INVENTORY is a standard mb physical inventory 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: Aufruf und Steuerung der Inventurfunktionen 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 physical inventory FM, simply by entering the name MB_PHYSICAL_INVENTORY into the relevant SAP transaction such as SE37 or SE38.
Function Group: MBIF
Program Name: SAPLMBIF
Main Program: SAPLMBIF
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MB_PHYSICAL_INVENTORY 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_PHYSICAL_INVENTORY'"NOTRANSL: Aufruf und Steuerung der Inventurfunktionen.
EXPORTING
S_IIKPF = "
CTCOD = "Transaction code
* INV_ACTION = 1 "
* X_SPERRE = "Document is already blocked
* X_DELTA_UEBERGABE = "
* X_FB_BELEG_SCHON_GELESEN = "
* MAX_POSITIONS = "Max. number of items that may have a new document
* X_REFRESH_MAT_BUFFER = X "
IMPORTING
S_EIKPF = "
TABLES
T_IISEG = "
T_EISEG = "
* T_SERIALNUMBERS = "
IMPORTING Parameters details for MB_PHYSICAL_INVENTORY
S_IIKPF -
Data type: IIKPFOptional: No
Call by Reference: No ( called with pass by value option)
CTCOD - Transaction code
Data type: SY-TCODEOptional: No
Call by Reference: No ( called with pass by value option)
INV_ACTION -
Data type: NDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_SPERRE - Document is already blocked
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
X_DELTA_UEBERGABE -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
X_FB_BELEG_SCHON_GELESEN -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
MAX_POSITIONS - Max. number of items that may have a new document
Data type: AM07M-MAXPOOptional: Yes
Call by Reference: No ( called with pass by value option)
X_REFRESH_MAT_BUFFER -
Data type:Default: X
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MB_PHYSICAL_INVENTORY
S_EIKPF -
Data type: EIKPFOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MB_PHYSICAL_INVENTORY
T_IISEG -
Data type: IISEGOptional: No
Call by Reference: No ( called with pass by value option)
T_EISEG -
Data type: EISEGOptional: No
Call by Reference: No ( called with pass by value option)
T_SERIALNUMBERS -
Data type: BAPI_PHYSINV_SERIALNUMBERSOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MB_PHYSICAL_INVENTORY 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_s_eikpf | TYPE EIKPF, " | |||
| lv_s_iikpf | TYPE IIKPF, " | |||
| lt_t_iiseg | TYPE STANDARD TABLE OF IISEG, " | |||
| lv_ctcod | TYPE SY-TCODE, " | |||
| lt_t_eiseg | TYPE STANDARD TABLE OF EISEG, " | |||
| lv_inv_action | TYPE N, " 1 | |||
| lt_t_serialnumbers | TYPE STANDARD TABLE OF BAPI_PHYSINV_SERIALNUMBERS, " | |||
| lv_x_sperre | TYPE BAPI_PHYSINV_SERIALNUMBERS, " | |||
| lv_x_delta_uebergabe | TYPE BAPI_PHYSINV_SERIALNUMBERS, " | |||
| lv_x_fb_beleg_schon_gelesen | TYPE BAPI_PHYSINV_SERIALNUMBERS, " | |||
| lv_max_positions | TYPE AM07M-MAXPO, " | |||
| lv_x_refresh_mat_buffer | TYPE AM07M. " X |
|   CALL FUNCTION 'MB_PHYSICAL_INVENTORY' "NOTRANSL: Aufruf und Steuerung der Inventurfunktionen |
| EXPORTING | ||
| S_IIKPF | = lv_s_iikpf | |
| CTCOD | = lv_ctcod | |
| INV_ACTION | = lv_inv_action | |
| X_SPERRE | = lv_x_sperre | |
| X_DELTA_UEBERGABE | = lv_x_delta_uebergabe | |
| X_FB_BELEG_SCHON_GELESEN | = lv_x_fb_beleg_schon_gelesen | |
| MAX_POSITIONS | = lv_max_positions | |
| X_REFRESH_MAT_BUFFER | = lv_x_refresh_mat_buffer | |
| IMPORTING | ||
| S_EIKPF | = lv_s_eikpf | |
| TABLES | ||
| T_IISEG | = lt_t_iiseg | |
| T_EISEG | = lt_t_eiseg | |
| T_SERIALNUMBERS | = lt_t_serialnumbers | |
| . " MB_PHYSICAL_INVENTORY | ||
ABAP code using 7.40 inline data declarations to call FM MB_PHYSICAL_INVENTORY
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 TCODE FROM SY INTO @DATA(ld_ctcod). | ||||
| DATA(ld_inv_action) | = 1. | |||
| "SELECT single MAXPO FROM AM07M INTO @DATA(ld_max_positions). | ||||
| DATA(ld_x_refresh_mat_buffer) | = X. | |||
Search for further information about these or an SAP related objects