Tuesday, October 8, 2013

Sales order imp columns

------------------------------------------------------------
OE ORDER HEADERS ALL 
------------------------------------------------------------



order_category_code  

Identify if it's a return

ORDER
RETURN


order_source_id

Identify if its a Normal Sales order or Internal

SELECT *
FROM   OE_ORDER_SOURCES
WHERE  order_source_id

SELECT org_id, order_source_id
FROM   po_system_parameters_all


sales_channel_code

lookup_type = 'SALES_CHANNEL' 

freight_terms_code

lookup_type = 'FREIGHT_TERMS' 
fob_point_code

lookup_type = 'FOB'

payment_term_id

ra_terms

shipping_method_code

wsh_carrier_services

price_list_id

qp_list_headers



------------------------------------------------------------
OE ORDER LINES ALL 
------------------------------------------------------------


item_type_code

lookup_type = 'ITEM_TYPE'


source_type_code 

INTERNAL   : non-dropship orders  
EXTERNAL  : Dropship
---------------------------------------------------------------------

PROGRAMS

---------------------------------------------------------------------

DEMAND INTERFACE PROGRAMS - 
Creates Demand in mtl_demand table.
After Order is booked

SCHEDULE ORDER PROGRAM - 
Creates soft reservation for the sales order

SELECT ooh.order_number
              ,ool.line_id
              ,ool.ordered_quantity
              ,ool.shipped_quantity
              ,ool.invoiced_quantity
              ,wdd.delivery_detail_id
              ,wnd.delivery_id
              ,rctl.interface_line_attribute1
              ,rctl.interface_line_attribute3
              ,rctl.interface_line_attribute6
              ,rct.org_id
              ,rct.creation_date
              ,trx_number
              ,rctl.quantity_ordered
              ,rct.interface_header_context
  FROM oe_order_headers_all ooh
             ,oe_order_lines_all ool
             ,wsh_delivery_details wdd
             ,wsh_new_deliveries wnd
             ,wsh_delivery_assignments wda
             ,ra_customer_trx_all rct
             ,ra_customer_trx_lines_all rctl
 WHERE ooh.header_Id=ool.header_id
      AND wdd.source_header_id=ooh.header_id
      AND wdd.delivery_detail_Id=wda.delivery_detail_id
      AND wda.delivery_id=wnd.delivery_id
      AND rctl.interface_line_attribute1=to_char(ooh.order_number)
      AND rctl.interface_line_attribute6=to_char(ool.line_id)
      AND rctl.interface_line_attribute3=to_char(wnd.delivery_id)
      AND rctl.customer_trx_id=rct.customer_trx_id
      AND rct.interface_header_context='ORDER ENTRY'








No comments:

Post a Comment