Category Archives: OM API’s

Adding a New SO Line using API

Adding new line to an Existing Sales Order Using OE_ORDER_PUB API:

Tables Effected: OE_ORDER_LINES_ALL

Sample code for adding a new line to existing Sales Order:

 Result: 

Line Id: 388459
Process Order Success to add a Line

Sample Script to Verify the API:

 

Related posts:

Release Holds Using OE_ORDER_PUB

Release Holds using OE_ORDER_PUB.PROCESS_ORDER

Tables Effected: oe_order_holds_all, oe_order_releases, oe_hold_sources_all

Basic Information on Release Hold:
Following are the details of the requests used to release hold from the sales Order Header or Line depending on the parameters passed to the Process_Order .
request_type –> OE_GLOBALS.G_RELEASE_HOLD
Entity_code –> OE_GLOBALS.G_ENTITY_HEADER for order or OE_GLOBALS.G_ENTITY_LINE for line.
Entity_id –> ID of the order or line to be released from hold
Param1 –> Hold ID to specify the type of hold that is to be removed.
Param2 –> Hold entity code on the hold source associated with the hold to be released

Hold Source codes:
C: Customer hold source
S: Bill To or Ship To hold source
I: Item hold source
O: Order hold source
W: Warehouse Hold Source
param3 –> Hold entity ID:
C or S: for Org ID
O: Header ID
I: Inventory Item ID
param4 –> Release Reason Code
param5 –> Release Comment

Major Fields to Release Hold in Process Order API:
— This is to release a hold on the order
l_request_rec.entity_id := &Order Header ID;
l_request_rec.entity_code := OE_GLOBALS.G_ENTITY_HEADER;
l_request_rec.request_type := OE_GLOBALS.G_RELEASE_HOLD;
— hold_id must be passed
l_request_rec.param1 := &Hold ID;
— indicator that it is an order hold
l_request_rec.param2 := ‘O’ ;
— Header ID of the order
l_request_rec.param3 := &Order Header ID;
l_request_rec.param4 :=’OM_APPROVE’;
l_action_request_tbl(l_line_tbl_index) := l_request_rec;

Sample Code for Releasing Existing Hold on Sales Order Header:

 Result:

entity_id: 190411
param: 3190411
message is:
message index is:
l_return_status is: S
Process Order Success

Scripts to Test the API:

 

Related posts:

Applying Holds Using OE_ORDER_PUB

Applying Holds on Sales Order Using Oe_order_pub.process_order

Find the existing Hold in oe_hold_definitions.

Tables Effected: oe_order_holds_all, oe_hold_sources_all

 Basic Information:

Following are the details of the requests used to apply hold to the sales Order Header or Line depending on the parameters passed to the Process_Order .
request_type –> OE_GLOBALS.G_APPLY_HOLD
Entity_code –> OE_GLOBALS.G_ENTITY_ORDER for order or OE_GLOBALS.G_ENTITY_LINE for line.
Entity_id –> ID of the order or line to be held
Param1 –> Hold ID to identify the type of hold that should be applied. (HOLD_ID from OE_HOLD_DEFINITIONS)
Param2 –> Hold entity code for the hold source to be created.

Hold Entity Code with Description:
C: Customer hold source
S: Bill To or Ship To hold source
I: Item hold source
O: Order hold source
W: Warehouse Hold Source
Param3 –> Hold entity ID
C, B, or S: for Org ID
O: Header ID
I: Inventory Item ID
param4 –> Hold comment
date_param1 –> Hold Until Date
parm6-param20 –> Attribute1-15 of the descriptive flex field associated with the hold source record.

–This is to create a hold on an order header
l_request_rec.entity_id := &Order Header ID;
l_request_rec.entity_code := OE_GLOBALS.G_ENTITY_HEADER;
l_request_rec.request_type := OE_GLOBALS.G_APPLY_HOLD;
— hold_id must be passed
l_request_rec.param1 := &Hold ID;
— indicator that it is an order hold
l_request_rec.param2 := ‘O’ ;
— Header ID of the order
l_request_rec.param3 := &Order Header ID;
l_action_request_tbl(l_line_tbl_index) := l_request_rec;

Sample API to Create Holds:

Result:

entity_id: 190411
param3: 190411
message is:
message index is:
l_return_status is: S
Process Order Success

Sample Script to test the API:

 

Related posts:

Importing Sales Order in Booked Status

Importing Sales Orders in Booked Status

Tables Effected: OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL, WSH_DELIVERY_DETAILS, MTL_DEMAND, MTL_RESERVATION

Sample Code for Creating Sales Orders in Booked status:

 Result:

START OF NEW DEBUG
Header_ID : 190406
message is: Order has been booked.
message index is: 1
Process Order Sucess

Scripts to verify the data from Backend:

 

Related posts:

Sales Order API with Credit Card Payment

Sales Order API with Credit Card Information

Tables Effected:

OE_ORDER_HEADERS_ALL,
OE_ORDER_LINES_ALL,
OE_PAYMENTS

Import Sales Order with importing Credit Card type payment. One Sales Order Header can have multiple prepayments.

Sample Script used to Create a Sales Order with credit card Payment:

 Result:

START OF NEW DEBUG
OM Debug file: /dbfiles/applcsf/log/l4038887.dbg
Header_ID : 204656
Process Order Sucess

Scripts to Verify the data:

 

Related posts: