MM BAPI RFC Used the same way in S/4HANA

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

ParameterTypeDescriptionRequired
PHYSINVENTORYIKPF-IBLNRPhysical inventory documentYes
FISCALYEARIKPF-GJAHRFiscal yearYes

Exporting parameters

ParameterTypeDescription
HEADBAPI_PHYSINV_HEADDocument header

Tables parameters

ParameterTypeDescriptionRequired
ITEMSBAPI_PHYSINV_ITEMDocument items—
RETURNBAPIRET2Return messagesYes

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.

Request a custom report