Ansicht
Dokumentation

/SAPAPO/OM_STOCK_TSERIES_GET - Get Stock Curve for Pegging Areas

/SAPAPO/OM_STOCK_TSERIES_GET - Get Stock Curve for Pegging Areas

Vendor Master (General Section)   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function gets the stock changes caused by receipts and issues in the time interval [IV_START_TIME, IV_END_TIME] as time series in ET_STOCK or ET_RESOURCE. It does this for the pegging area keys (UIDs) specified in IT_PEGAREA and the storage resource keys (UIDs) specified in IT_RESOURCE. The entries in ET_STOCK are sorted by TIME for each PEGID. The same applies to the entries in ET_RESOURCE. In the table ET_STOCK_GRAPH_MODE, you can see for each pegging area (for which a stock time series is returned) whether the data in ET_STOCK is extracted in line mode or step mode. The same applies to the table ET_RESOURCE_GRAPH_MODE.

You can use the import parameter IV_UNIQUE_TIME to control the appearance of the time series data in line mode when stock is changed at a specific time. If IV_UNIQUE_TIME = GC_FALSE, then there are two entries for the same time. If IV_UNIQUE_TIME = GC_TRUE, the second entry, which actually belongs to the same time, is moved by one second to make the times are unique.

The following example illustrates the differences between step mode and line mode and the effects on the IV_UNIQUE_TIME flag.

In step mode, there are only steps in the stock time series:

m   + -------------- +
  |   |
0 -------- +   + -----
t0   t1   t2

The following is returned as a stock time series:
(t0,0)
(t1,m)
(t2,0)

In line mode, you can have both steps and "diagonal" lines:

m   + -------------- +  
  |   \
0 -------- +     \ ----------
t0   t1   t2   t3 te

The following is returned as a stock time series:
(t0,0)
(t1,0)
(t1,m) if IV_UNIQUE_TIME = GC_TRUE, this time is set to t1+1 (*) instead
(t2,m)
(t3,0)
(te,0)

(*) The subsequent times (t2, t3, and so on) are also incremented, if they coincide with t1, t2, and so on

ET_RC contains return codes for pegging areas or storage resources with processing errors.

Example

Notes

Return codes (see table ET_RC):

  • om_invalid_pegarea:
No pegging area with this key exists in liveCache.

Further information





Parameters

ET_RC
ET_RESOURCE
ET_RESOURCE_GRAPH_MODE
ET_STOCK
ET_STOCK_GRAPH_MODE
IS_GEN_PARAMS
IT_PEGAREA
IT_RESOURCE
IV_END_TIME
IV_RES_DRILL_DOWN
IV_SIMSESSION
IV_START_TIME
IV_UNIQUE_TIME

Exceptions

LC_APPL_ERROR
LC_COM_ERROR
LC_CONNECT_FAILED

Function Group

APO/SAPLOM_STOCK

Fill RESBD Structure from EBP Component Structure   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 4635 Date: 20240420 Time: 091423     sap01-206 ( 57 ms )