Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

/SAPAPO/OM_ORDER_CHANGE - Create, Change, and Delete Orders in liveCache

/SAPAPO/OM_ORDER_CHANGE - Create, Change, and Delete Orders in liveCache

BAL Application Log Documentation   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Further information

@0P@liveCache Scheduler

liveCache Data Model

Functionality

This function module creates, changes, or deletes orders with all their subobjects, known as order networks in liveCache. It uses the scheduler to make all required planning-related changes to the resources.

This function module is complex and is subject to several technical restrictions. For this reason, you should not use ORDER_CHANGE for extended periods of time.

The recommended alternatives are:

OM_ORDER_CREATE for creating orders
OM_ORDER_DELETE for deleting orders
OM_ORDER_MODIFY for changing existing order components

It is still necessary to use ORDER_CHANGE for order changes that cannot be performed by ORDER_MODIFY, for example because they require rescheduling by the scheduler.

ORDER_MODIFY operates incrementally, which means that it does not modify any order components that are not affected by the required changes; ORDER_CHANGE, on the other hand, deletes the entire order, creates it again using the data specified in the import tables, and reschedules it.

The information in the corresponding sections of the documentation for OM_ORDER_CREATE applies to the data tables, scheduling, and the order network requirements.

ORDER_CHANGE can also delete objects, however. In the export tables ET_CHANGED* the objects are therefore flagged either as deleted (gc_deleted) or changed (gc_changed) in the CHANGE_FLAG field.

The Method Table

The ORDER_CHANGE is controlled using the method table IT_ORDER_METHOD. This table contains the key (GUID) of the order, the dates for the scheduler, and the method that is to be used to process the order. The following methods are permitted:

Value Constant   Meaning
N gc_new   Create and schedule a new order
C gc_change   Delete, recreate, and schedule an order
O gc_change_or_new   Change an order (if it exists) or create a new order
D gc_delete   Descheduler and delete an order

ORDER_CHANGE first processes all deletion methods, and only then the remaining methods. It keeps to the order of methods specified in the method table.

Each order is processed with all subobjects that belong to it, in particular its suborders. Therefore, if you want to create, change, or delete a top order with a suborder, do not enter both orders in the method table.

Technical Restrictions

External constraints are particularly affected by ORDER_CHANGE's technical restrictions.

  • External constraints force "all-or-nothing" behavior:
    If you want to create external constraints (if you want to fill the table IT_EXTERN_CONSTRAINTS), the control parameter MUST_SCHED_ALL is overwritten (internally and automatically) with gc_true.
  • Mixed methods force individual scheduling:
    If the method table contains both change and recreate methods, the scheduler cannot schedule the orders at the same time; instead they have to be scheduled individually, after being processed. This has a negative affect on the final planning results and on the performance of ORDER_CHANGE. Also any external constraints cannot be included in the planning in this case.

For this reason, we recommend that you spread "mixed methods" across multiple liveCache calls using uniform methods, if possible. For example, a single ORDER_CHANGE call for deleting, creating, and changing orders should be split into an ORDER_DELETE deletion call, an ORDER_CREATE create call, and an ORDER_CHANGE change call.

You can avoid this "all-or-nothing" logic for external constraints by creating or changing the orders without external constraints, then using OM_CONSTRAINT_MODIFY to add the external constraints, and then rescheduling the activities associated with the constraints by using OM_ACT_SCHEDULE.

Notes

Error Handling and Troubleshooting

See the corresponding sections for the module OM_ORDER_CREATE. In addition, the following error can occur for change and deletion methods:

  • 40 = om_invalid_order

This occurs if the order in question does not exist in liveCache.





Parameters

ET_CHANGED_CAP_REQS
ET_CHANGED_IO_NODES
ET_CHANGED_IO_PP_NODES
ET_CHANGED_ORDERS
ET_CHANGED_PEGIDS
ET_DELETED_FIX_PEGGING
ET_OVERFLOWS
ET_RC
ET_SCHED_FAILURES
ET_SCHED_LOG
IS_ATP_INFO
IS_CONTROLPARAMETERS
IS_EXCLUDE_FIELDS
IS_GEN_PARAMS
IS_GET_CHANGED_OPTIONS
IT_ACTIVITIES
IT_BUCKETVECTOR_CHARACTS
IT_CAP_REQS
IT_CHARACT_REQ_INPNODE
IT_CHARACT_VAL_ACTS
IT_CHARACT_VAL_OUTNODE
IT_EXTERN_CONSTRAINTS
IT_INPUTS
IT_INTERN_CONSTRAINTS
IT_MODE
IT_ORDERS
IT_ORDER_METHOD
IT_ORDKEYS
IT_ORDMAPS
IT_OUTPUTS
IT_POSITIONS
IT_PRODFLOW
IT_RES_PLAN_INTERVALLS
IT_SCHED_PARAMS
IV_GET_ALL_OBJECTS
IV_SIMSESSION
IV_USE_IO_SHLF_LIFE

Exceptions

LC_APPL_ERROR
LC_COM_ERROR
LC_CONNECT_FAILED

Function Group

APO/SAPLOM_PLANNING

rdisp/max_wprun_time - Maximum work process run time   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 10301 Date: 20211205 Time: 144729     sap01-206 ( 104 ms )