Category Archives: OM API’s

Release Holds on a Sales Order

Release Holds on a Sales Order:

Sample code to release a Sales Order Hold:


Creating Referenced RMA’s using OE_ORDER_PUB

Creating referenced RMA’s using OE_ORDER_PUB:


Creating RMA is very similar to creating an Order. We need to make sure we are passing the correct order_type, line_type which will be setup as ‘RETURN’ (or ‘MIXED’) category in transaction type definition.

For the API to automatically create a reference on your RMA lines to the original Order lines, we need to pass the following :

Sample code to create Referenced RMA’s:

Once the RMA gets created, query the order and navigate to Lines>Returns tab. We can see the original order number and line number.

Importing Sales Orders or Returns


     Order Import is an open interface owned by Oracle Order Management. Order Import consists of interface tables and a set of APIs. You can import new, change and completed sales orders or returns from legacy applications, EDI Transactions processed through the Gateway, or internal orders created from Oracle Purchasing’s internal requisitions, or returns. In addition, Order Import provides forms that allow you to query orders from the interface tables, make corrections or changes to the date, and re-initiate the import process. Messages are provided to give you the details why the order did not import.
Continue reading

Delete an Order or an Order Line

Delete an Order Using OE_ORDER_PUB:

DELETE Operation

In order to delete the entity record, its necessary to pass the operation like OE_GLOBALS.G_OPR_DELETE. The only attribute which needs to be passed is either the header id or the line id depending on the whether deletion is done for the order or the line. Deletes are cascaded down to the child entities. For example to delete a header record all the child entities i.e. lines, header sales credits, header adjustments are deleted.
Deleting the lines results in the deletion of line adjustments, line sales credits and line lot serial numbers as well.
Deletes would also result in the deletion of any holds and attachments associated with the deleted entity and its child entities. The workflow status information for this entity is also purged.

Delete Order:
–This is to delete an order
l_header_rec.header_id := &Order Header ID;
— Indicate to process order that the order is to be deleted
l_header_rec.operation := OE_GLOBALS.G_OPR_DELETE;

Delete Line:
— This is to delete an order line
l_line_tbl_index := 1;
–This is to delete an existing order line.
l_line_tbl(l_line_tbl_index) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(l_line_tbl_index).header_id :=&Order Header ID;
l_line_tbl(l_line_tbl_index).line_id := &Order Line ID;
l_line_tbl(l_line_tbl_index).operation := OE_GLOBALS.G_OPR_DELETE;

Script to delete an existing sales order:

 Script to Delete an existing Sales Order Line:


Cancel Order or Order Line

 Cancel an existing Order using OE_ORDER_PUB:


Sample Script to Cancel Order:

  Cancel an existing Order Line using OE_ORDER_PUB:

Tables Effected: OE_ORDER_LINES

Sample Script to Cancel the Order Lines: