Importing Orders in Various statuses in Order Management


Orders can be imported as ENTERED, BOOKED or CLOSED.

ENTERED:
If an order is imported with an entry status of ENTERED (OE_HEADERS_IFACE_ALL.BOOKED_FLAG=N or NULL) then the result after import is that the line is BOOK_ORDER eligible.

BOOKED:
Order can be imported in booked condition using one of the following methods:
Ø  By populating the column BOOK_FLAG of the table OE_HEADERS_IFACE_ALL as ‘Y’.
Ø  By passing the action request to the OE_ACTIONS_IFACE_ALL table, i.e. in the OE_HEADERS_IFACE_ALL do not pass the BOOK_FLAG and in the OE_ACTIONS_IFACE_ALL table put operation code as BOOK_ORDER.

Importing Closed Orders using Order Import
Closed Orders are treated differently from open orders 1. To Import Closed Orders oe_headers_iface_all table should have the closed_flag as "Y" and the operation_code as ‘INSERT’ 2. There is a difference between closing an existing order and importing orders in "CLOSED" status the first time itself. 3. As orders were already closed in the old system, there will not be any changes performed to the records, which means no defaulting. 4. All the book required columns need to be passed for importing a Closed Order, as it goes through the booking cycle where validation for all the booking required columns are done.

Cancellation of Order using Order Import
If the entire order is to be cancelled, then the lines information should not be loaded into the interface table and the header interface table should have the cancelled_flag set to 'Y' and the CHANGE_REASON as a valid lookup code from CANCEL_CODE lookup type. If only the line is to be cancelled, then both the lines and the header tables should be populated in the interface table but should set the cancelled_flag to 'Y' only for the lines with the qty updated to zero. Also the operation code to be used for cancellation should be ‘UPDATE’ .

If the both the order and the line cancelled_flag is set to 'Y' then in such cases the program cancels the header along with the lines because the header cancelled_flag is 'Y'. Then since the line cancelled_flag is also 'Y' it tries to cancel the already cancelled line and errors out. So depending on whether the order or the line is to be cancelled, the cancelled flag and the header information or the line information should to be loaded.