Ansicht
Dokumentation

/SAPAPO/OM_TIMESTREAM_CHANGE - Create/Change/Delete Time Stream

/SAPAPO/OM_TIMESTREAM_CHANGE - Create/Change/Delete Time Stream

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Further information

@0P@Time Stream

Functionality

Creates, changes, shifts or deletes a time stream in liveCache.

In contrast to most other liveCache Modules, OM_TIMESTREAM_CHANGE only allows the processing of a single time stream per liveCache call.

IV_TSTREAMID contains the key of the time stream to process, the IT_TIMESTREAM import table specifies the time stream as a sequence of work period records. The time stream article describes how the fields of the work periods must be filled.

When deleting a time stream, only the parameter IV_TSTREAMID should be provided.

IV_METHOD selects the processing method:

Value Constant   Meaning
N gc_new   Create new time stream
C gc_change   Replace the existing time stream with the one specified in IT_TIMESTREAM
D gc_delete   Delete time stream
A gc_add   Append work periods to time stream, see below
S gc_shift   Shift time stream, see below
I gc_insert   Insert work periods into time stream, see below

Add and Shift Method

Using method gc_add or gc_shift you can append the work periods in IT_TIMESTREAM to the end of an existing time stream.

The gc_shift method additionally erases all work periods within the first IV_TIMEDIFF seconds of the existing time stream, counting from the start time of the first work period.

Insert Method

With method gc_insert you can insert the work periods in IT_TIMESTREAM into an existing time stream. The values of a work period rec ord replace the values of the existing time stream between its start and end time. If the new work period overlaps with work periods in the existing time stream, the end time of the preceeding and the start time of the succeeding work period are adjusted.

You can insert several sets of work periods in a single liveCache call. To mark the start of a new set you have to multiply the total working time (total_kum) of the work period with -1, i.e. specify the negative value. This value is inverted again when the total working time is stored in liveCache.

Although it would not be necessary to mark the first work period of the first set, liveCache expects that its total working time is negative, too, and raises Error 615 if this is not the case. Like for the first work period of the whole time stream, the total working time for the first work period in a set must equal its real working time.

The main purpose of the insert method is to add down times to an existing time stream.

Changed Orders

The export table ET_CHANGED_ORDER contains the keys of the top orders for which activities were changed by the time stream change.

Notes

Error Handling and Troubleshooting

A selection of the possible return codes:

  • 34 = om_invalid_method:
    Invalid method; only the methods listed above are valid.
  • 48 = om_invalid_timestream
    A time stream with the specified key does not exist in liveCache.
  • 613 = om_timestream_already_exists
    A time stream with the specified key already exists in liveCache.
  • 17603 = om_invalid_workslices
    Work periods overlap




Parameters

ET_CHANGED_ORDERS
ET_RC
IS_GEN_PARAMS
IT_TIMESTREAM
IV_METHOD
IV_RESID
IV_SIMSESSION
IV_TIMEDIFF
IV_TSTREAMID

Exceptions

LC_APPL_ERROR
LC_COM_ERROR
LC_CONNECT_FAILED

Function Group

APO/SAPLOM_RESOURCE

General Data in Customer Master   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 5580 Date: 20240425 Time: 145239     sap01-206 ( 71 ms )