/SAPAPO/OM_ORDER_MODIFY - Change Order Attributes

TXBHW - Original Tax Base Amount in Local Currency   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Functionality

This function module enables changes to be made to orders that already exist in liveCache. Changes can be made only if they do not require the liveCache Scheduler to reschedule the order network.

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

The tasks of ORDER_MODIFY can be split into three categories:

  • Backflushing activities
  • Changing order properties
  • Adding or deleting I/O nodes

1. Backflushing Activities

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

2. Changing Order Properties

You can use the tables IT_ORDER, IT_MODE, IT_CAPREQ, IT_INPUT, IT_OUTPUT, and IT_ORDKEY to change theattributes of an order in liveCache. This is usually only possible for those order attributes that donot influence the APO application logic (scheduler, pegging) programmed in liveCache (that is, fields that are only saved in liveCache and are to be extracted again without being modified).

The change tables mentioned above (the "attribute tables") have the row type _ATTR, where is the structure of a liveCache object that has been, for example, created with OM_ORDER_CHANGE. Forexample, IT_ORDER (row type OM_ORDER_ATTR) changes attributes of the order object (OM_ORDER). The attribute tables are structured as follows:

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

(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_.
  • 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, usingSQL. Caution: The ORDKEY data records are changed only for those orders that have a data record in thechange table IT_ORDER. If you want to change only one ORDKEY data record for an order, an entry withthe 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 "deleterecord" 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.

The I/O nodes of delivery schedule lines 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 or when I/O node sets are changed

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

ORDER_MODIFY processes all required changes after the top order of the affected object. If an erroroccurs, 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 orderthat is already confirmed. To change the attributes, you must specify gc_change_actual, gc_add_actual,or gc_delete_actual as the method. (Caution: Changing the attributes of confirmed orders can have unexpected consequences; these changes must only be made by experienced, authorized users.)

342 = om_spp_not_allowed: SPP orders cannot be changed by ORDER_MODIFY.

Further information


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

Exceptions

LC_APPL_ERROR
LC_COM_ERROR
LC_CONNECT_FAILED

Function Group

APO/SAPLOM_PLANNING

ABAP Short Reference   General Material Data  
This documentation is copyright by SAP AG.


Length: 7122 Date: 20120525 Time: 044208     triton ( 239 ms )