Ansicht
Dokumentation
/SAPAPO/OM_STOCK_CHANGE - Create, Change, or Delete Stock Items in liveCache
BAL_S_LOG - Application Log: Log header data RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
Further information
@0P@Stocks
Functionality
This module creates, changes, or deletes stock items in liveCache.
The stock items passed in the table IT_STOCK are processed in accordance with the appropriate method (field METHOD):
Value | Constant | Description | |
---|---|---|---|
N | gc_new | Adds the stock item to the stock with the key STOCK. This stock is created implicitly if it does not exist. | |
C | gc_change | Deletes the stock item and creates it again with the specified data. | |
A | gc_add | Adds the specified quantity (REAL_QUANTITY) to the existing stock item. | |
D | gc_delete | Deletes the stock item of the stock with the key STOCK. The stock is deleted implicitly if no longer has any items. | |
R | gc_delete_order | Deletes the stock with the key STOCK and all its stock items. |
The switch IV_ANCHOR_FIELDS indicates whether the fields ADDLOCID and MATID of the stock item are filled correctly. This must be the case for the first item of a stock that does not yet exist in liveCache, since this item is required for the creation of the corresponding entry in the stock anchor table.
Stock Characteristics
Stock items can have characteristic value assignments, where the key fields of the data records of the characteristic table IT_CHARACT_VAL_OUTNODE must be filled as follows:
Characteristic Field | Field of the Stock Item |
---|---|
OBJECT_ID | STOCK |
POSITION_NO | SUBLOC |
LINE_NO | CATEGORIE |
Stock items with negative quantities equate to requirements. Accordingly, the characteristics specified for them are handled as template value assignments for input nodes.
Lists of Changed or Deleted Objects
The keys of stocks deleted explicitly by the method gc_delete_order or deleted implicitly by the deletion of their last schedule line are written to the table ET_DELETED_STOCKS.
The table ET_CHANGED_STOCKS contains the stocks that still exist and in which items were created, changed, or deleted.
When stock items are changed or deleted, fixed peggings can also be deleted. These deletions are returned in the table ET_DELETED_FIX_PEGGING.
The method gc_add can cause stock items with the quantity 0 to be created. If the item does not have any characteristics, it is deleted implicitly and listed in the export table ET_IMPLIC_DELETED_STOCK_POS.
Notes
Error Handling and Troubleshooting
Possible return codes:
- 108 = om_invalid_stock:
A stock item with this key already exists in liveCache (method gc_new) or does not exist (other methods).
- 40 = om_invalid_order:
A stock with this key does not exist in liveCache.
- 34 = om_invalid_method:
Invalid method; only the methods listed above are valid
- 359 = om_no_stock_anc_entry:
The stock with the key STOCK does not yet exist and cannot be created. This is because the required fields in the stock anchor table have not been specified (IV_ANCHOR_FIELDS = gc_do_not_use_anchor).
Parameters
ET_CHANGED_STOCKSET_DELETED_FIX_PEGGING
ET_DELETED_STOCKS
ET_IMPLIC_DELETED_STOCK_POS
ET_RC
IS_ATP_INFO
IS_EXCLUDE_EXPORTS
IS_GEN_PARAMS
IT_CHARACT_VAL_OUTNODE
IT_STOCK
IV_ANCHOR_FIELDS
IV_SIMSESSION
IV_SUBTRANS_MODE
IV_SUPPR_IMPL_DEL_ZERO_STOCK
Exceptions
LC_APPL_ERRORLC_COM_ERROR
LC_CONNECT_FAILED
Function Group
APO/SAPLOM_STOCKFill RESBD Structure from EBP Component Structure General Material Data
This documentation is copyright by SAP AG.
Length: 6406 Date: 20240501 Time: 234712 sap01-206 ( 73 ms )