BAPI_MATPHYSINV_GETDETAIL Read Physical Inventory Document Details
Returns the header data and items of a physical inventory document (material, storage location, batch, book and counted quantity, difference status). It is used in programs that print count lists, send items to handheld terminals for counting or analyse differences. Pass the document number together with the fiscal year; posting the differences after counting is a separate step.
- Function group
- MB_BUS2028
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
ABAP Cloud and clean core status
Not to be released for ABAP Cloud MM-IM
SAP does not release this object for ABAP Cloud. It keeps working in classic ABAP; in ABAP Cloud and clean core development use the successor below.
Use instead in ABAP Cloud:
- I_PHYSICALINVENTORYDOCUMENTTP
Source: SAP's list of released objects (S/4HANA Cloud Private Edition, latest), SAP Cloudification Repository
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PHYSINVENTORY | IKPF-IBLNR | Physical inventory document | Yes |
| FISCALYEAR | IKPF-GJAHR | Fiscal year | Yes |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| HEAD | BAPI_PHYSINV_HEAD | Document header |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| ITEMS | BAPI_PHYSINV_ITEM | Document items | — |
| RETURN | BAPIRET2 | Return messages | Yes |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_MATPHYSINV_GETDETAIL'
EXPORTING
physinventory = lv_physinventory
fiscalyear = lv_fiscalyear
IMPORTING
head = lv_head
TABLES
items = lt_items
return = lt_return.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.