Ansicht
Dokumentation

/SAPAPO/OM_ORDER_CREATE - Create Orders in liveCache

/SAPAPO/OM_ORDER_CREATE - Create Orders in liveCache

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

Further information

@0P@liveCache Scheduler

liveCache Data Model

Functionality

This function module creates orders with all child objects, known asw order networks, in liveCache and plans their activities using the scheduler on the available resources. It can either create entirely new top orders or add a suborder to an existing top order.

The Method Table

The creation of an order is controlled using the method table IT_ORDER_METHOD. This table contains the key (GUID) of the new order, the dates for the scheduler, and the method that is to be used to process the order. 'N' = gc_new must always be specified as the method for ORDER_CREATE.

The method table also determines the order in which the orders are created. Each order is created with all subobjects that belong to it, in particular its suborders. If you enter both the key of a top order and the key of one of its suborders in the method table, the error 54 = om_duplicate_order occurs when you try to process the suborder. This error indicates that the suborder already exists.

The Data Tables

Apart from the tables described under Scheduling Information below, the rest of the import tables contain the object data of the order network. Data for objects that do not belong to an order specified in the method table is ignored in processing.

Scheduling

You can use the following import parameters to influence the behavior of the liveCache Scheduler:

Parameter Name Meaning
IS_CONTROLPARAMETERS Control Parameters (Scheduler Control)
IT_SCHED_PARAMS Scheduling Profile (Scheduling Parameters)
IT_RES_PLAN_INTERVALLS Planning Intervals

Orders not scheduled on the available resources by the scheduler are not created by ORDER_CREATE. When a scheduling action fails, some other orders or all of the orders might not be created, depending on the setting of the control parameter MUST_SCHED_ALL.

Orders that cannot be scheduled create a data record with return code 59 = om_scheduling_error in the return code table ET_RC. The scheduler uses the export table ET_SCHED_FAILURE (scheduling result) to communicate details of its attempted scheduling actions.

The objects changed by the scheduling action are entered in the lists of changed objects if required.

Order Network Requirements

When an order is created, there are certain conditions between the objects in the order network to be respected.

Dependencies between orders and activities:

  • A top order must have either activities or suborders. It cannot have both.
  • A suborder must have the same order type as its top order.
  • The validity interval of a suborder must lie within the validity interval of the top order.
  • Specifications for the start or end time of an activity must lie within the validity interval of its order.

Setup Activity Requirements

An activity is a setup activity if its field IS_SETUP_ACT has the value gc_true.

  • A setup activity has at least one mode.
  • A setup activity cannot have any constraint predecessors that use a resource.

Restrictions Within Operation

An operation consists of all activities in an order that have the same operation number (OPRCOUNTER).

  • All activities of an operation with modes must have the same setup key.
  • Only one setup activity is allowed for each operation.

Activity Mode Requirements

  • A resource can exist only once within a mode, which means that multiple capacity requirements with the same key ACTID, MODE_NO, and RESID cannot exist.
  • A mode must have precisely one primary resource.
  • A mode must have precisely one time stream-relevant resource.

Notes

Error Handling and Troubleshooting

Various errors can occur, due to the complex nature of creating an order in liveCache. The most common error causes are:

  • 59 = om_scheduling_error:
    The order could not be scheduled (see above); the scheduling result (ET_SCHED_FAILURES) contains more detailed information.
  • 54 = om_duplicate_order:
    An order with this key (GUID) already exists in liveCache.
  • 85 = om_order_not_found:
    No header data was found in the data table IT_ORDERS for an order specified in the method table.
  • 34 = om_invalid_method:
    The specified method is invalid. It must currently always be 'N' = gc_new.
  • 184 = om_other_failed (follow-on error):
    The creation of another order failed and in this case the MUST_SCHED_ALL flag (see above) also forces this order to fail.




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

ABAP Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 10531 Date: 20240419 Time: 021736     sap01-206 ( 115 ms )