Ansicht
Dokumentation

/SCWM/BAPI_PI_READ_FOR_COUNT - Function Module to Read Physical Inventory Documents for Counting

/SCWM/BAPI_PI_READ_FOR_COUNT - Function Module to Read Physical Inventory Documents for Counting

BAL_S_LOG - Application Log: Log header data   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module reads physical inventory documents and returns the data needed to perform a count.

As import parameters, the caller needs to provide the warehouse number in IS_HEADER and a list IT_KEYS of physical inventory document keys with at least the fields DOC_NUMBER and DOC_YEAR specified.

The data is returned in the table ET_PI_COUNT_ITEM. For each PI document item, multiple lines are returned: One line of either item type L (location) or item type O (object) containing the header data and one or more lines of item type C (count lines). These count lines correspond to the count proposals and depend on the quantities and handling units in the storage location. See below in the examples section for more details.

Messages are written to the parameter ET_RETURN, which needs to be evaluated by the caller.

With IV_CURRENT_BOOK_QUAN the caller can control, whether the current stock in the location should be read and proposed or whether the book quantities at document creation time should be proposed.

Example

  • Example 1: On storage bin BIN1, there is a handling unit H1 with a quantity of 10 EA of product P1. You are reading an active physical inventory document for BIN1. The function module will return three lines:
  • One row with item type L (location) which contains the header data for the physical inventory document item.

  • One row with item type C (count line) containing the handling unit data.

  • Another row with item type C containing the product data.,,

  • Example 2: Storage bin BIN2 is empty. You are reading an active physical inventory document for this bin. The function module will return two lines.
  • One row with item type L (location) which contains the header data for the physical inventory document item.

  • One row with item type C (count line) without any handling unit or product data.

Notes

The table ET_PI_COUNT_ITEM has the same type as the import table of function module /SCWM/BAPI_PI_DOCUMENT_COUNT. So in order to perform the count, it is sufficient to read the PI documents into an internal table, modify the count proposals if necessary, enter the count results and call /SCWM/BAPI_PI_DOCUMENT_COUNT with the internal table as importing parameter.

In the count proposals, book quantities may or may not be pre-filled. This depends on the customizing of the Physical Inventory Area under Define Physical Inventory Area. The quantities are pre-filled only if the flag "Display Book Quantity at Time of Count Entry" is activated.

Further information

Refer to the documentation of /SCWM/BAPI_PI_DOCUMENT_COUNT for examples how to enter the count results.





Parameters

ET_PI_COUNT_ITEM
ET_RETURN
IS_HEADER
IT_KEYS
IV_CURRENT_BOOK_QUAN

Exceptions

Function Group

M/SAPLPI_BAPI

CL_GUI_FRONTEND_SERVICES - Frontend Services   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 3452 Date: 20240418 Time: 160020     sap01-206 ( 70 ms )