Fonction SAP BAPI_MATPHYSINV_CREATE - Create Physical Inventory Document

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
HEAD BAPI_PHYSINV_CREATE_HEAD u 132 Header data of phys. inv. doc.
MAX_ITEMS AM07M-MAXPO N 5 X Max. number of items that may have a new document

Paramètre Reférence Long. Facultatif Description
ITEMS BAPI_PHYSINV_CREATE_ITEMS 172 Physical inventory document item data
RETURN BAPIRET2 548 Return messages

Functionality
The Create method is used to create one or more physical inventorydocuments.
Caution
AS of Release 4.6A, this method is obsolete. It is replaced by themethod CreateMultiple (function module BAPI_MATPHYSINV_CREATE_MULT).
In the next two releases you can still use this method. After that, youwill only be able to use the new method to create physical inventorydocuments.

Notes
INCLUDE BAPI_BERECHTIGUNG

  • M_ISEG_WIB,,Plant authorization for physical
  • inventory
    Transfer
    The Head structure is used to transfer the physical inventory documentheader data. The data for each item is imported in the Items table. Youcan also use the MaxItems parameter to define the maximum number ofitems for each physical inventory document.
    Confirmations
    INCLUDE BAPI_RET

    Further information
    INCLUDE BAPI_INVENTUR_WEITERINF

    Description
    This structure contains the header data for the physical inventorydocument that is to be created.
    INCLUDE BAPI_DATAELEMENT
    The following fields must be filled:

    • Plant (PLANT field)

    • Storage location (STGE_LOC field)

    • The following fields can be filled:
      • Special stock (SPEC_STOCK field)

      • Document date (DOC_DATE field)

      • Planned date for phys. inv. count (PLAN_DATE field)

      • Posting block (POST_BLOCK field)

      • Freeze book inv. balance (FREEZEBOOKINV field)

      • Include batches flagged for del. (DEL_BATCHES field)

      • Physical inv. no. (PHYS_INV_NO field)

      • Physical inventory reference no. (PHYS_INV_REF field)

      • Type of grouping criterion (GROUPING_TYPE field)
      • Description
        When creating a physical inventory document, you can specify themaximum number of items each document should contain. If there are moreitems than the number specified per document, the system creates thecorresponding number of documents.
        If the batch management requirement is activated for a material, thesystem carries out batch determination and creates a physical inventorydocument item per batch (also applies to split valuation).

        Default
        If this parameter is not imported, the system automatically uses themaximum upper limit of 300 items per physical inventory document.

        Description
        This table is used to transfer data for the physical inventory documentitems.
        INCLUDE BAPI_DATAELEMENT
        The following fields must be filled:

        • Material (MATERIAL field)

        • Stock type (STOCK_TYPE field)

        • The following fields can be filled:
          • Batch (BATCH field)

          • Alternative unit of measure (ALT_UNIT field)

          • If the SPEC_STOCK parameter was filled in the HEAD structure, theparameters for this special stock type must be filled:
            • Sales order number (SALES_ORD field)

            • Item number in sales order (S_ORD_ITEM field)

            • Vendor (VENDOR field)

            • Customer (CUSTOMER field)

            • WBS element (WBS_ELEMENT field)
            • Description
              INCLUDE BAPI_TABLE

              Value range
              INCLUDE BAPI_INVENTUR_RETURN