Ansicht
Dokumentation

/SAPAPO/OM_ORDER_MODIFY - Modify Parts of Order in liveCache

/SAPAPO/OM_ORDER_MODIFY - Modify Parts of Order in liveCache

TXBHW - Original Tax Base Amount in Local Currency   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Further information

@0P@liveCache Data Model

Functionality

This function module makes changes to orders that already exist in liveCache.

It does not respect any constraints between orders. Changes of this type require liveCache Scheduler, which means they must be made using OM_ORDER_CHANGE.

ORDER_MODIFY does not process stock orders or SPP (Spare Parts Planning) orders.

The tasks of ORDER_MODIFY can be split into three categories:

  • Change order properties

1. Confirming Activities

The activities listed in the import table IT_ACT are confirmed with the specified times in liveCache.

2. Changing Order Properties

You can use the attribute tables IT_ORDER, IT_MODE, IT_CAPREQ, IT_INPUT, IT_OUTPUT, and IT_ORDKEY to change the attributes of an order in liveCache.

These attribute tables have the row type <object>_ATTR, where <object> is the structure of a liveCache object that has been, for example, created using OM_ORDER_CREATE. For example, IT_ORDER (row type OM_ORDER_ATTR) changes attributes of the order object.

The attribute tables are structured as follows:

  • Key fields of the object
  • New field values (components NEW_<field>, where <field> is the name of a component of the liveCache object)
  • Corresponding change methods (components CHANGE_<field>)

(see example below)

The valid change methods for ORDER_MODIFY are:

  • gc_do_nothing (initial): Do not change the attribute.
  • gc_change: Change the attribute to the value specified in the corresponding component NEW_<field>.
  • gc_add (for I/O node quantity fields only): Add the specified quantity to the existing quantity.

The ORDKEY data records specified by IT_ORDKEY are changed to the specified values in liveCache, using SQL. The ORDKEY data records are changed only for those orders that have a data record in the change table IT_ORDER. If you want to change only one ORDKEY data record for an order, an entry with the GUID of the order must be created in IT_ORDER, and in this entry all change methods and new field values must remain initialized.

3. Adding or Deleting I/O Nodes

The I/O nodes in the tables IT_NEW_INPUTS and IT_NEW_OUTPUTS are added to an order; the tables IT_CHARACT_REQS and IT_CHARACT_VALS can be used to specify any corresponding characteristics.

From APO 4.1, you can use ORDER_MODIFY to delete existing I/O nodes as well. To enable this, a "delete record" must be created in the attribute table IT_INPUTS or IT_OUTPUTS, in which the key of the input node or output node is specified, along with the method gc_delete.

I/O nodes of scheduling agreements) cannot be deleted.

Export Tables

  • ET_CHANGED_ORDERS:
    GUIDs of orders changed by ORDER_MODIFY
  • ET_DELETED_FIX_PEGGING:
    Fixed pegging edges deleted when I/O nodes are deleted, when I/O node sets are changed, or when the pegging area of an I/O node is deleted.

Example

To change the PRIORITY attribute of an order, the following change record must be written to IT_ORDER:

  • ORDERID = GUID of the order that you want to change
  • NEW_PRIORITY = New value of the PRIORITY attribute
  • CHANGE_PRIORITY = gc_change (change PRIORITY)

Notes

Error Handling and Troubleshooting

ORDER_MODIFY processes all required changes after the top order of the affected object. If an error occurs, all changes for objects of the affected top order are rolled back, and processing continues with the next top order. The most common errors are as follows:

  • 34 = om_invalid_method: Invalid method; only the methods listed above are valid
  • 40 = om_invalid_order: liveCache does not contain an order with the specified GUID.
  • 129: Stock orders cannot be changed by ORDER_MODIFY.
  • 200 = om_not_yet_implemented: Attribute changes are not yet implemented in liveCache.
  • 266 = om_order_is_already_confirmed: The object whose attributes will be changed belongs to an order that is already confirmed. To change its attributes anyway, the method must be defined as gc_change_actual, gc_add_actual, or gc_delete_actual Changing the attributes of confirmed orders can have unexpected consequences. Only experienced users should make these changes.
  • 342 = om_spp_not_allowed: SPP orders cannot be changed by ORDER_MODIFY.




Parameters

ET_CHANGED_ORDERS
ET_DELETED_FIX_PEGGING
ET_RC
IS_ATP_INFO
IS_GEN_PARAMS
IT_ACT
IT_CAPREQ
IT_CHARACT_REQS
IT_CHARACT_VALS
IT_INPUTS
IT_MODE
IT_NEW_INPUTS
IT_NEW_OUTPUTS
IT_ORDERS
IT_ORDKEY
IT_OUTPUTS
IT_POSITIONS
IV_SIMSESSION
IV_USE_IO_SHLF_LIFE

Exceptions

LC_APPL_ERROR
LC_COM_ERROR
LC_CONNECT_FAILED

Function Group

APO/SAPLOM_PLANNING

CL_GUI_FRONTEND_SERVICES - Frontend Services   General Material Data  
This documentation is copyright by SAP AG.

Length: 7687 Date: 20240427 Time: 024438     sap01-206 ( 93 ms )