OracleAppsDNA

Order to Cash Technical Flow

Here in this article I will be writing technical details of Order to Cash Cycle.

Order Entry

Sales Order entry consists of two parts, Order header and Order lines.

Order Header

As order header information is entered and saved a record is created in OE_ORDER_HEADERS_ALL only and this record will be linked to many other tables and we shall discuss about those dependent tables now.

Transaction Type:

Transaction type is used to select the workflow path/process and it also defaults many other fields on the sales order. This transaction type is associated with a sequence which is responsible for providing the sales order number for the sales order.

--Transaction Type
 SELECT oha.order_number ,
  oha.order_type_id      ,
  ott.name               ,
  ott.description
   FROM oe_order_headers_all oha,
  oe_transaction_types_tl ott
  WHERE 1            = 1
AND oha.order_number = '&ur_order#'
AND oha.order_type_id=ott.transaction_type_id
AND ott.language     = 'US';

Actually order transaction type details are stored in OE_TRANSACTION_TYPES_ALL but in the above query we have used _TL table (multilingual table) as we want to display transaction name.

Price List:

Price list information is stored in QP_LIST_HEADERS_B table but we need to refer to its multilingual table QP_LIST_HEADERS_TL

--Price List
 SELECT oha.order_number ,
  oha.price_list_id      ,
  qlht.name              ,
  qlht.description
   FROM oe_order_headers_all oha,
  qp_list_headers_tl qlht
  WHERE 1            = 1
AND oha.order_number = '&ur_order#'
AND oha.price_list_id=qlht.list_header_id
AND qlht.language    = 'US';

Sales Person:

--Sales Person
 SELECT oha.order_number ,
  jrre.source_name       ,
  jrre.source_email
   FROM oe_order_headers_all oha,
  jtf_rs_salesreps jrs          ,
  jtf_rs_resource_extns jrre
  WHERE 1            = 1
AND oha.order_number = '&ur_order#'
AND oha.salesrep_id  =jrs.salesrep_id
AND jrs.resource_id  = jrre.resource_id;

Order Header Status:

--Header Status
 SELECT oha.order_number,
  flv.lookup_type       ,
  flv.lookup_code       ,
  flv.meaning           ,
  flv.description
   FROM fnd_lookup_values flv,
  oe_order_headers_all oha
  WHERE 1                = 1
AND oha.order_number     = '&ur_order#'
AND oha.flow_status_code = flv.lookup_code
AND lookup_type          = 'FLOW_STATUS'
AND language             = 'US';

Payment Terms:

--Payment terms
 SELECT oha.order_number,
  name                  ,
  description
   FROM oe_order_headers_all oha,
  ra_terms rt
  WHERE 1            = 1
AND oha.order_number = '&ur_order#'
AND rt.term_id       = oha.payment_term_id ;

Shipping Method:

--Shipping Method
  SELECT oha.order_number,
  wcsm.service_level
   FROM oe_order_headers_all oha,
  wsh_carrier_ship_methods wcsm
  WHERE 1                   = 1
AND oha.order_number        = '&ur_order#'
AND oha.shipping_method_code= wcsm.ship_method_code
AND wcsm.organization_id    = oha.ship_from_org_id;

 

Order Lines

Order lines consists of item ordered as part of the sales order.
On Hand Quantity of Item:

--On Hand Quantity
 SELECT oha.order_number,
  ool.line_number       ,
  ool.ordered_item      ,
  SUM(moq.transaction_quantity)
   FROM oe_order_headers_all oha,
  oe_order_lines_all ool        ,
  mtl_onhand_quantities moq
  WHERE 1                = 1
AND oha.order_number     = '&ur_order#'
AND oha.header_id        = ool.header_id
AND ool.ship_from_org_id = moq.organization_id
GROUP BY oha.order_number,
  ool.line_number        ,
  ool.ordered_item;

Though this is not an exact procedure to find out the on hand quantity, this is just for example.

Things to notice after entering the order
You can notice that the values of the following column in line and headers table as follows

 flow_status_code = ENTERED, booked_flag = N, open_flag = Y

Order Booking

Once the order is booked from the application, following are the changes occurred in the backed

Reservations

This step is required for doing reservations SCHEDULE ORDER PROGRAM runs in the background(if scheduled) and quantities are reserved. Once this program get successfully get completed, the MTL_DEMAND and MTL_RESERVATIONS tables are updated.  OE_ORDER_LINES_ALL.line_id = MTL_RESERVATIONS.demand_source_line_id

Pick Release

Pick Release is the process of putting reservation on on-hand quantity available in the inventory and pick them for particular sales order.

Pick release can be done from ‘Release Sales Order’ form or ‘Pick Selection List Generation – SRS‘ program can be scheduled in background. In both of these cases all lines of the order gets pick released depending on the Picking rule used. If specific line/s needs to be pick release it can be done from ‘Shipping Transaction form. For this case Pick Release is done from ‘Release Sales Order’ form with Pick Confirm=NO.
Once Pick Release is done these are the tables get affected:

In shipping transaction form order status remains “Released to Warehouse” and all the material still remains in source sub-inventory. We need to do Move Order Transaction for this order. Till this no material transaction has been posted to MTL_MATERIAL_TRANSACTIONS

Pick Confirm

Pick Confirm is to transact the move order created in Pick Release process. In move order transaction items are transferred from source sub-inventory to staging Sub-inventory. Here material transaction occurs.

Order line status becomes ‘Picked’ on Sales Order and ‘Staged/Pick Confirmed’ on Shipping Transaction Form.

Note: Pick Confirm step can be eliminated if ‘Auto Pick Confirm’ is selected as ‘YES’ while performed manual pick release. If Pick release is done through shipping transactions form and if you want to perform auto pick confirm then picking rules setup has to be done.

Ship Confirm

Shipping execution of the order starts here. The goods are picked from staging area and given to shipping. “Interface Trip Stop” program runs in the backend.

Generating Invoice

After shipping the order the order lines gets eligible to get transfered to RA_INTERFACE_LINES_ALL. Workflow background engine picks those records and post it to RA_INTERFACE_LINES_ALL. This is also called Receivables interface, that mean information moved to accounting area for invoicing details. Invoicing workflow activity transfers shipped item information to Oracle Receivables. At the same time records also goes in the table RA_INTERFACE_SALESCREDITS_ALL which hold details of sales credit for the particular order.

OE_ORDER_LINES_ALL.invoice_interface_status_code = ‘YES’

ra_interface_lines_all (interface table into which the data is transferred from order management) Then Auto invoice program imports data from this table which get affected into this stage are receivables base table (especially ra_customer_trx_all and ra_customer_trx_lines_all).

RA_CUSTOMER_TRX_LINES_ALL.line_attribute_1 = OE_ORDER_HEADERS_ALL.order_number
RA_CUSTOMER_TRX_LINES_ALL.line_attribute_6 = OE_ORDER_LINES_ALL.line_id

Close Order

Last step of the process is to close the order which happens automatically once the goods are shipped

OE_ORDER_LINES_ALL.flow_status_code =’CLOSED’
OE_ORDER_LINES_ALL.open_flag = ‘N’

Header is closed in the month end which is a general oracle standard process.

Exit mobile version