Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>MaterialPhysInv



Index

MaterialPhysInv

MaterialPhysInv


The business object Plant storage area physical inventory is the
physically counting and recording of the actual stock levels of a given material in a given storage location at a specific time.


Structure
A physical inventory comprises items of the same stock type. Each item
indicates the quantity counted for a material of that stock type in the plant storage area.

Integration

If the material stocks are managed in a storage bin, the physical
inventory is carried for the storage bin rather than for the plant storage area.


11-Dec-2005


Methods

Available Methods


  • ChangeCount : Change count for particular items of a phys. inv. doc. [ BAPI_MATPHYSINV_CHANGECOUNT ]
  • Count : Enter count for particular items of a phys. inv. doc. [ BAPI_MATPHYSINV_COUNT ]
  • Create : Create physical inventory document [ BAPI_MATPHYSINV_CREATE ] (Obsolete in 46A)
  • CreateMultiple : Create phys.inv.docmt(s) [ BAPI_MATPHYSINV_CREATE_MULT ]
  • GetDetail : Read header and items of a phys. inv. doc. [ BAPI_MATPHYSINV_GETDETAIL ]
  • GetItems : List of phys. inv. docs with headers and items [ BAPI_MATPHYSINV_GETITEMS ]
  • GetList : List of phys. inv. doc. header records [ BAPI_MATPHYSINV_GETLIST ]
  • PostDifferences : Post differences [ BAPI_MATPHYSINV_POSTDIFF ]

11-Dec-2005


ChangeCount

ChangeCount


The ChangeCount method allows you to change the count for physicalinventory document items that have already been counted in a physical inventory document.

Notes

The following authorization object is checked when this method is used:

  • M_ISEG_WZL Physical inventory: Count in plant

  • Transfer

    The key fields of the physical inventory document ((PhysInventory andFiscalYear) have to be transferred as import parameters to the method. You can also transfer a variance in percentage (parameterPercentageVariance).
    The data for each item is imported in the Items table.


    Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.

    Further Information

    The method can only carry out your function if no error messages were
    generated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has been
    successfully invoked (i.e. if no errors were reported in the Return parameter).

    Ensure that you transfer the unit of entry to the method as an importparameter (ITEMS), otherwise the method issues an error message.


    11-Dec-2005


    Count

    Count


    The Count method allows you to enter the count for items in a physical inventory document that have not yet been counted.

    Notes

    The following authorization object is checked when this method is used:

  • M_ISEG_WZL Physical inventory: Count in plant

  • Transfer

    The key fields of the physical inventor document (PhysInventory andFiscalYear) have to be transferred to the method as import parameters.The count date (CountDate parameter) and a percentage variance (PercentageVariance parameter) can also be transferred.


    The data for each item is imported in the Items table.

    Ensure that you transfer the unit of entry as an import parameter(ITEMS) to the method, otherwise the method issues an error message.

    Confirmations

    Messages are returned in the parameter return. The parameter
    documentation shows the return codes and their meanings.

    Further Information

    The method can only carry out your function if no error messages weregenerated in the "Return" table. This is the case if the header data and all the items were processed successfully.


    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has beensuccessfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    Create

    Create


    The Create method is used to create one or more physical inventory documents.

    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 inventory documents.

    Notes

    The following authorization object is checked when this method is used:

  • 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 of items for each physical inventory document.


    Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.

    Further Information

    The method can only carry out your function if no error messages were
    generated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has been
    successfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    CreateMultiple

    CreateMultiple


    You can use the CreateMultiple method to create one or more physical inventory documents.

    Notes

    The following authorization object is checked when this method is used:

  • M_ISEG_WIB plant authorization for physical inventory

  • Transfer

    The header data of the physical inventory document is transferred withthe help of the 'head' structure. The data for the individual items isimported in the 'Items' table. There is also a parameter calledMaxItems, which you can use to define the maximum number of items that each physical inventory document contains.


    Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.

    Further Information

    The method can only carry out your function if no error messages were
    generated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has been
    successfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    GetDetail

    GetDetail


    The GetDetail method uses the key fields of a physical inventorydocument to read a whole document (header and items). The system does not block the document during this process.

    Notes

    The following authorization object is checked when this method is used:


  • M_ISEG_WIB Plant authorization for physical inventory
  • Transfer

    The key fields of the physical inventory document (PhysInventory andFiscalYear) have to be transferred to the method as import parameters.

    The data for each item is imported in the Items table.


    Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.

    Further Information

    The method can only carry out your function if no error messages were
    generated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has been
    successfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    GetItems

    GetItems


    The GetItems method uses the selection criteria below to read theheader and item data for all physical inventory documents that meet the criteria.

    Notes

    The following authorization object is checked when this method is used:

  • M_ISEG_WIB Plant authorization for physical inventory

  • Transfer

    The following criteria can be used to select the physical inventory documents:

  • Plant (PlantRa structure)
  • Storage location (StgeLocRa structure)
  • Physical inv. no. (PhysInvNoRa structure)

  • Physical inv. doc. (PhysinventoryRa structure)
  • Fiscal year (FiscalyearRa structure)
  • Planned count date (PlanDateRa structure)
  • Count status (CountStatusRa structure)

  • Status of adjustment posting (AdjustStatusRa structure
  • Grouping criterion (GroupingCritRa structure)
  • Material (MaterialRa structure)
  • Batch (BatchRa structure)

  • Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.

    Further Information

    The method can only carry out your function if no error messages were
    generated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program thereforehas to execute the 'Commit Work' itself after this method has been
    successfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    GetList

    GetList


    The GetList method uses the selection criteria below to read the headerdata for all physical inventory documents that meet the criteria.

    Notes

    The following authorization object is checked when this method is used:

  • M_ISEG_WIB Plant authorization for physical inventory

  • Transfer

    The following criteria can be used to select the physical inventory documents:

  • Plant (PlantRa structure)
  • Storage location (StgeLocRa structure)
  • Phys. inv. no. (PhysInvNoRa structure)

  • Phys. inv. doc. (PhysinventoryRa structure)
  • Fiscal year (FiscalyearRa structure)
  • Planned count date (PlanDateRa structure)
  • Count status (CountStatusRa structure)

  • Status of adjustment posting (AdjustStatusRa structure)
  • Grouping criterion (GroupingCritRa structure)
  • Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.


    Further Information

    The method can only carry out your function if no error messages weregenerated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program therefore
    has to execute the 'Commit Work' itself after this method has beensuccessfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005


    PostDifferences

    PostDifferences


    The PostDifferences method allows you to post differences for physical inventory documents that have been counted.

    Notes

    The following authorization object is checked when this method is used:

  • M_ISEG_WDB Plant authorization for inventory difference posting

  • Further Information

    Transfer

    The key fields of the physical inventory document (PhysInventory andFiscalYear) must be transferred to the method as import parameters. Youcan also transfer a threshold value for physical inventory differences
    (ThresholdValue parameter) and the posting date (Pstng date field). The data for each item is imported in the Items table.

    Confirmations

    Messages are returned in the parameter return. The parameterdocumentation shows the return codes and their meanings.


    Further Information

    The method can only carry out your function if no error messages weregenerated in the "Return" table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program therefore
    has to execute the 'Commit Work' itself after this method has beensuccessfully invoked (i.e. if no errors were reported in the Return parameter).


    11-Dec-2005