Ansicht
Dokumentation

/SAPAPO/OM_ORDER_GET_ALL - Gets Keys (GUIDs) of All Orders in liveCache

/SAPAPO/OM_ORDER_GET_ALL - Gets Keys (GUIDs) of All Orders in liveCache

BAL_S_LOG - Application Log: Log header data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

Further information

Working with liveCache

Functionality

Returns the keys (GUIDs) of all orders in the liveCache. You can filter the orders by certain order types.

This module can have a serious effect on the performance of liveCache; it is not needed in everyday application scenarios and should not be used there.

All orders are iterated in liveCache every time this module is called, even if only the orders for one order type are selected. You should therefore make all desired selections with only one call of this module, as far as possible.

(In the case of customer systems with an unusually high number of orders in liveCache, it is possible that the APO application server will not be able to handle the number of returned order keys. In this case, it is necessary to divide the orders by different order types and call the module a number of times.)

You can also use the following import parameters to filter the selected orders:

  • IV_TOP_ORDERS_ONLY: If gc_true, only the keys of top orders are returned.
  • IV_GET_TEST_GUIDS (default: gc_false): If gc_true, orders created with liveCache test programs (such as LCCHECK) are also taken into account.

Standard Mode

This regular behavior of ORDER_GET_ALL should be sufficient for all regular application cases. The export table ET_ORDERS returns the keys of all orders whose order type is included in IT_ORDER_TYPE_TAB. If this import table is empty, all orders in the liveCache are returned.

Expert Mode

There are a few order types with a special format that cannot be created with the usual liveCache modules (such as balances and SPP orders). For cross-application tasks (plan version copy, upgrade), it is therefore useful to be able to collect the orders in the liveCache in different export tables, separated by types, and to be able to process them separately later.

The numbered additional order type tables IT_ORDER_TYPE_TABn (n = 1,...,5) and the corresponding export tables ET_ORDERSn (n = 1,...,5) fulfill this purpose. For example, the orders whose order type is contained in IT_ORDER_TYPE_TAB4 are returned in ET_ORDERS4.

Important: Each order is only collected once. Therefore, if the same order type is contained in multiple import tables, the matching order keys are only returned in the first corresponding export table.

The Catch-All Logic in Expert Mode

In expert mode, the standard tables IT_ORDER_TYPE_TAB and the associated ET_ORDERS have a special position.

By filling IT_ORDER_TYPE_TAB with order types, you can use the tables in the same way as the numbered additional tables. However, if you leave IT_ORDER_TYPE_TAB empty, ET_ORDERS acts as a catch-all table, containing the keys of the orders for which the order type does not appear in one of the other tables.

If you do not wish to use the catch-all logic, do not start the selection of order types in IT_ORDER_TYPE_TAB1, but rather directly in IT_ORDER_TYPE_TAB (see examples).

Example

All examples assume that there are a total of 100 orders in the liveCache, of which

  • 20 are of order type 1F
  • 10 are of order type 15
  • 5 are of order type 34

In the following tables, the left column always shows how the IT_ORDER_TYPE_TAB (OTT) import tables are filled. Multiple table entries are separated by commas. The column on the right contains the number of order keys returned to the individual export tables by the function module.

Standard Mode

With the traditional use of ORDER_GET_ALL, only the import table IT_ORDER_TYPE_TAB (OTT) is filled, and all returns are made to the export table ET_ORDERS. If OTT is empty, all orders in the liveCache are returned. Otherwise, all orders with an order type specified in OTT are returned.

There are six examples of an ORDER_GET_ALL call with differently filled import tables below:

Input   Number of Return Values
OTT: empty => ET_ORDERS: 100
OTT: 1F => ET_ORDERS: 20
OTT: 15 => ET_ORDERS: 10
OTT: 34 => ET_ORDERS: 5
OTT: 1F, 15 => ET_ORDERS: 30
OTT: 1F, 15, 34 => ET_ORDERS: 35

Expert Mode

In expert mode, the additional (numbered) import tables are also filled. The liveCache returns the matching orders to the appropriate export table in each case.

The first example demonstrates the catch-all logic of the expert mode. If you leave the standard import table (OTT) empty, ET_ORDERS returns all orders that do not fit in any other export tables, because they do not have the specified order types.

Input   Number of Return Values
OTT: empty => ET_ORDERS: 65
OTT1: 1F => ET_ORDERS1: 20
OTT2: 15 => ET_ORDERS2: 10
OTT3: 34 => ET_ORDERS3: 5

You can also combine multiple order types in one export table in expert mode:

Input   Number of Return Values
OTT: empty => ET_ORDERS: 65
OTT1: 1F => ET_ORDERS1: 20
OTT2: 15, 34 => ET_ORDERS2: 15

If you do not want to use the catch-all logic, use the standard import table (OTT) instead of one of the numbered additional tables. The catch-all logic is prevented by the fact that the OTT is filled:

Input   Number of Return Values
OTT: 1F => ET_ORDERS: 20
OTT2: 15, 34 => ET_ORDERS2: 15

Each order is only returned once (in the first matching export table), even if you specify an order type more than once. In the example below, the orders of type 34 are returned in ET_ORDERS1, meaning that ET_ORDERS3 remains empty:

Input   Number of Return Values
OTT: empty => ET_ORDERS: 65
OTT1: 1F, 34 => ET_ORDERS1: 25
OTT2: 15 => ET_ORDERS2: 10
OTT3: 34 => ET_ORDERS3: 0

Notes

Error Handling and Troubleshooting

The only error you can expect is 10 = Invalid order type: At least one invalid value was entered in at least one of the order type tables. This error triggers the exception LC_COM_ERROR.





Parameters

ET_ORDERS
ET_ORDERS1
ET_ORDERS2
ET_ORDERS3
ET_ORDERS4
ET_ORDERS5
ET_RC
IS_GEN_PARAMS
IT_ORDER_TYPE_TAB
IT_ORDER_TYPE_TAB1
IT_ORDER_TYPE_TAB2
IT_ORDER_TYPE_TAB3
IT_ORDER_TYPE_TAB4
IT_ORDER_TYPE_TAB5
IV_GET_TESTGUIDS
IV_SIMSESSION
IV_TOP_ORDERS_ONLY

Exceptions

LC_APPL_ERROR
LC_COM_ERROR
LC_CONNECT_FAILED

Function Group

APO/SAPLOM_PLANNING

General Material Data   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 10695 Date: 20240604 Time: 041233     sap01-206 ( 130 ms )