o2c Queries 09 Sep-10

  • View
    17

  • Download
    1

Embed Size (px)

DESCRIPTION

Order to Cash Queries

Citation preview

  • 5/28/2018 o2c Queries 09 Sep-10

    1/64

    OM Flow Status MeaningsSales Order Line Status Flow and Meaning

    Below are some of the different statuses of Sales Order Line with brief expl

    OM = Order Management Sales order form

    SE = Shipping Transactions or execution form

    1 Entered (OM)! Order is sa"ed but not boo#ed

    $ Booked (OM)! Order is Boo#ed%

    & Awaiting Shipping (OM)! Order is boo#ed but lines are not 'et pic#ed%

    (a"igating to Shipping Execution) the deli"er' line status flow is!

    * Not Ready to Release (SE)! + deli"er' line ma' be in this status when it is int

    Shipping) is not scheduled and has no reser"ations% ,hen lines are im

    Management this status is not used

    - Released to Warehouse (SE)! .ic# /elease has started but not 'et completed% On

    allocation ha"e not been pic# confirmed% The .ic# /elease process cre

    Line in 2n"entor'% This is a common status for users that perform a two

    indicates that in"entor' allocation has occurred howe"er pic# con

    http://sindraapps.blogspot.com/2010/08/om-flow-status-meanings.htmlhttps://mail.portal.keane.com/owa/redir.aspx?C=99004b4967964987b6b6623a69ce00f2&URL=http%3A%2F%2Fsureshvaishya.blogspot.com%2F2009%2F11%2Fbelow-are-some-of-different-status-of.htmlhttps://mail.portal.keane.com/owa/redir.aspx?C=99004b4967964987b6b6623a69ce00f2&URL=http%3A%2F%2Fsureshvaishya.blogspot.com%2F2009%2F11%2Fbelow-are-some-of-different-status-of.htmlhttp://sindraapps.blogspot.com/2010/08/om-flow-status-meanings.html
  • 5/28/2018 o2c Queries 09 Sep-10

    2/64

    4 Ready to Release (SE)! Order Line is boo#ed and passed to shipping executio

    pic# /elease%

    5 Backordered(SE)! The status of Bac#orderd is assigned to a line under the

    The .ic# /elease process attempted to allocate in"entor' to the line an

    not a"ailable% 2n this case the s'stem automaticall' bac#orders the dis

    +t Ship confirm the user enters a shipped 6uantit' for an item that is less t

    The user manuall' Bac#orders the entire deli"er'%

    7 Shipped (SE)! The deli"er' line is shipped confirmed%

    8 Con ir!ed (SE)! The deli"er' line is shipped or bac#ordered and the trip st

    19 "icked (OM)! .ic# release is complete) both allocations and pic# con

    11"icked "artial (OM)! This status occurs when a deli"er' line is not alloc

    /elease and Ship :onfirm has not occurred

    1$#nter aced (SE)! The deli"er' line is shipped and 2n"entor' interface co

    1&Awaiting $ul ill!ent (OM)! ,hen fulfillment set is used) (ot all shippable li

    configuration are fulfilled

    1*$ul illed (OM)! +ll lines in a fulfillment set are fulfilled%

    1-#nter aced to Recei%a&les (OM)! The order is lin#ed with /ecei"ables and the i

    14"artially #nter aced to Recei%a&les (OM)! This status is used in a .TO flow and in

    particular .TO item is re6uired for re"enue%

    15Closed (OM)! :losed indicates that the line is closed%

    17Canceled (OM)! 2ndicates that the line has been completel' canceled% (o

    this line%

  • 5/28/2018 o2c Queries 09 Sep-10

    3/64

  • 5/28/2018 o2c Queries 09 Sep-10

    4/64

  • 5/28/2018 o2c Queries 09 Sep-10

    5/64

  • 5/28/2018 o2c Queries 09 Sep-10

    6/64

  • 5/28/2018 o2c Queries 09 Sep-10

    7/64

  • 5/28/2018 o2c Queries 09 Sep-10

    8/64

  • 5/28/2018 o2c Queries 09 Sep-10

    9/64

  • 5/28/2018 o2c Queries 09 Sep-10

    10/64

  • 5/28/2018 o2c Queries 09 Sep-10

    11/64

  • 5/28/2018 o2c Queries 09 Sep-10

    12/64

  • 5/28/2018 o2c Queries 09 Sep-10

    13/64

  • 5/28/2018 o2c Queries 09 Sep-10

    14/64

  • 5/28/2018 o2c Queries 09 Sep-10

    15/64

  • 5/28/2018 o2c Queries 09 Sep-10

    16/64

    Query to find out order and line hold information

    select distinct ohd.name

    ,ooh.hold_until_date

    ,ooh.hold_comment

    ,h.order_number

    ,l.item_identifier_type

    ,l.inventory_item_id

    ,l.ordered_item

    ,oh.header_id

    ,oh.line_id

    ,oh.order_hold_id

    from oe_hold_definitions ohd,

    oe_hold_sources_all ooh,

    oe_order_headers_all h,

    oe_order_lines_all l,

    oe_order_holds_all ohwhere ohd.hold_id = ooh.hold_id

    and oh.hold_source_id = ooh.hold_source_id

    and oh.header_id = h.header_id

    and h.header_id=l.header_id

    and l.open_flag='Y'

    and h.open_flag='Y'

    order by ohd.name,h.order_number

  • 5/28/2018 o2c Queries 09 Sep-10

    17/64

    Query to find the Shipper detial Information.

    select distinct wnd.delivery_id

    ,wnd.name

    ,wnd.customer_id,wnd.volume

    ,wnd.status_code

    ,wnd.ship_method_code

    ,wnd.initial_pickup_date

    ,wdd.cust_po_number

    ,wdd.requested_quantity_uom

    ,wdd.shipped_quantity

    ,wdd.requested_quantity

    ,wdd.subinventory

    ,wdd.shipment_priority_code

    ,wdd.released_status

    ,wdd.serial_number

    ,wdd.lot_number

    --,msib.segment

    -- ,msib.description

    -- ,msib.revision_qty_control_code

    from wsh_new_deliveries wnd,

    wsh_delivery_assignments wda,

    wsh_delivery_details wdd,

    -- mtl_system_items_b msib,

    oe_order_lines_all l,

    oe_order_headers_all h

    where wnd.delivery_id = wda.delivery_id

    !"# wdd.delivery_detail_id = wda.delivery_detail_id

    !"# wdd.source_line_id = l.line_id--and wdd.organi$ation_id=msib.organi$ation_id

    !"# wdd.source_header_id = l.header_id

    !"# l.header_id = h.header_id

    and wnd.delivery_id=%& (

    Query to find out Move order line details

    select mhl.request_number

    ,l.line_number

    ,h.order_number

    ,mrl.line_number

    ,mrl.line_id

    ,mrl.from_subinventory_code

    ,mrl.lot_number

    ,mrl.serial_number_start

    ,mrl.serial_number_end

    ,mrl.uom_code

    ,mrl.quantity

  • 5/28/2018 o2c Queries 09 Sep-10

    18/64

    ,mrl.quantity_delivered

    ,mrl.quantity_detailed

    ,wdd.source_header_number

    ,wdd.source_header_id

    ,wdd.source_line_id

    ,wdd.shipping_instructions

    ,wdd.inventory_item_id,wdd.requested_quantity_uom

    ,wdd.ship_method_code

    ,wdd.subinventory

    ,wdd.shipment_priority_code

    ,wdd.organi$ation_id

    ,wdd.released_status

    ,wdd.source_code

    ,wnd.delivery_id

    ,wnd.name

    ,wnd.initial_pickup_location_id

    ,wnd.creation_date

    ,msib.segment

    ,msib.description

    ,msib.revision_qty_control_code

    from mtl_t)n_request_lines mrl,

    mtl_t)n_request_headers mhl,

    wsh_delivery_details wdd,

    wsh_new_deliveries wnd,

    wsh_delivery_assignments wda,

    oe_orde*_lines_all l,

    oe_order_headers_all h

    mtl_system_items_b msib

    where mhl.header_id=mrl.header_id

    and mrl.line_id=wdd.move_order_line_id

    and wda.delivery_id=wnd.delivery_id+and wdd.delivery_detail_id = wda.delivery_detail_id

    and wdd.source_header_id=l.header_id

    and wdd.source_line_id=l.line_id

    and h.header_id=l.header_

    and wdd.organi$ation_id=msib.organi$ation_id+

    and wdd.inventory_item_id=msib.inventory_item_id+

    and mhl.request_number=' / '

    --order by wdd.creation_date desc

    --and wnd.delivery_id= 0&%1

    Query to find price discounts and surcharges on order

    select h.order_number

    ,l.line_number

    ,l.unit_list_price

    ,l.ordered_quantity

    ,pa.list_line_type_code

    ,pa.arithmetic_operator

    ,pa.operand

    ,pa.modifier_level_code

    ,pa.ad2usted_amount

  • 5/28/2018 o2c Queries 09 Sep-10

    19/64

    ,decode+pa.modifier_level_code,'3*#4*',

    l.unit_list_price5l.ordered_quantity5pa.operand5sign+pa.ad2uste

    +pa.ad2usted_amount5nvl+l.ordered_quantity, #iscount_!mou

    from oe_order_headers_all h,

    oe_order_lines_all l,

    oe_price_ad2ustments pa

    where h.header_id = l.header_idand h.org_id = l.org_id

    and h.header_id = pa.header_id

    and l.line_id = pa.line_id+

    and h.order_number=(70108

    Shipping

    #elivery 9ab, choose :hip ;onfirm and ana

    update the

    status of the order lines.

    @ig /.( :hipping

    9he items on the delivery gets shipped to the customer at this stage.

    9he :ales order line information line level status becomes :hipped.

    oe_order_lines_all+flow_status_code AshippedB

    wsh_delivery_details +released_status A;B A:hippedB

    mtl_material_TRANSA TI!NS+linked through 9ransaction source header id?tem deducted from >9C_3"D!"#_EF!"9?9?4:

    "e)t :tep we need to run the G3*H @C3G I!;H

  • 5/28/2018 o2c Queries 09 Sep-10

    20/64

    ,wts.departure_net_weight

    ,wts.weight_uom_code

    ,wdl.delivery_leg_id

    ,wdl.delivery_id

    ,wdl.sequence_number

    ,wdl.pick_up_stop_id

    ,wdl.drop_off_stop_id,wdl.shipper_title

    ,wdl.shipper_phone

    ,wdl.delivered_quantity

    ,wdl.loaded_quantity

    ,wdl.received_quantity

    from wsh_trips wt,

    wsh_trip_stops wts,

    wsh_delivery_legs wdl

    where wt.trip_id=wts.trip_id

    and wts.stop_id=wdl.pick_up_stop_id

    and wdl.delivery_id= &%0/

    R'N A'T!IN(!I " )R! "SS.

    !fter shipping the order the order lines gets eligible to get transfered to

    RA_INT"R#A "_%IN"S_A%%.Gorkflow background engine picks those recor

    RA_INT"R#A "_%IN"S_A%%. 9his is also called *eceivables interface, that mea

    moved

    to accounting area for invoicing details. ?nvoicing workflow acti

    information

    to 3racle *eceivables. !t the same time records also goes in the table

    RA_INT"R#A "_SA%"S R"*ITS_A%%which hold details of sales credit for the pa

    ra_interface_lines_all+interface table into which the data is transferred fro

    9hen!utoinvoice program imports data from this table which get affected into

    base

    table. !t the same time records goes in.

    ra_customer_tr+_all+cust_tr)_id is primary key to link it to tr)_lines table a

    invoice

    number

    ra_customer_tr+_lines_all+line_attribute_ and line_attribute_1 are linke

    line_id

    of the orders

    Ge need to logon !ccount *eceivables >odule to run the !uto ?nvoice J

    *eceivables,Kision 3perations

    ontrol ,-Re uest,- Run

    ;hoose the auto invoice master program and pass the mandatory paramete

    ;lick ok button and :ubmit Iutton.

    9he Ielow :creen shot view the concurrent request id %1&7 7 to view the au

    program to check the transaction imported successfully or not.

    anagement *esponsibility

    !rders/returns,-sales orders

    Euery the information using the order number and click the C?"4: tab,

    click on the actions button lov,choose the !dditional Cine inform

    ;lick on the ?nvoice6;redit >emos tab here we have to seen the transactio

  • 5/28/2018 o2c Queries 09 Sep-10

    21/64

  • 5/28/2018 o2c Queries 09 Sep-10

    22/64

    ,ar_lookups al

    ,ra_terms rt

    ,ap_bank_accounts ab

    ,ap_bank_branches abb

    --,ra_cust_tr)_types_all rct

    where ra.customer_tr)_id=ral.customer_tr)_id

    and ra.fob_point=al.lookup_code+and rt.term_id+ =ra.term_id

    and ra.;F:93>4*_I!"H_!;;3F"9_?#=ab.I!"H_!;;3F"9_?#+

    and ab.bank_branch_id=abb.bank_branch_id+ --and rct.cust_tr)_ty

    and ra.tr)_number=' /1 '

    and ral.line_type='C?"4

    Euery to find the ;ustomer , :hip 9o and Iill 9o location ?nformation

    select distinct h.order_number

    ,hp.party_name N;ustomer "ameN

    ,ol.meaning N@reight 9ermsN

    ,ol .meaning N@3IN

    ,bill_loc.address MM','MMbill_loc.city NIill 9oN

    ,ship_loc.address MM','MMship_loc.city N:hip 9oN

    from oe_order_headers_all h

    ,h$_parties hp

    ,oe_lookups ol

    ,oe_lookups ol

    ,h$_cust_accounts hca

    ,h$_cust_acct_sites_all hcasa

    ,h$_cust_site_uses_all h$sua

    ,h$_party_sites hps

    ,h$_locations bill_loc

    ,h$_locations ship_loc

    where hp.party_id=hca.party_id

    and hca.;F:9_!;;3F"9_?#=h.sold_to_org_id

    and h.freight_terms_code = ol.lookup_code+and ol .lookup_code+ =h.fob_point_code

    and ol .lookup_type+ ='@3I'

    and ol.lookup_type+ = '@*4?:'

    and hcasa.cust_acct_site_id= h$sua.cust_acct_site_id

    and hcasa.cust_account_id=hca.cust_account_id

    and hcasa.party_site_id= hps.party_site_id

    and hps.location_id=bill_loc.location_id

    and hps.location_id=ship_loc.location_id

    and h.ship_to_org_id=hcasa.org_id

    and h.order_number

    and h.org_id= /8

    Validation for Duplicate Pay Method

    SELECT COUNT(*)

    FROM ra_customers rc,

  • 5/28/2018 o2c Queries 09 Sep-10

    23/64

    ra_addresses ra,

    ra_cust_receipt_methods rcrm,

    ar_receipt_methods arm

    W ERE rcrm!customer_id " rc!customer_id

    #N$ rcrm!receipt_method_id " arm!receipt_method_id

    #N$ c!customer_id " ra!customer_id

    #N$ c!ori%_s&stem_re'ere ce" TR M(p_customer_re')

    #N$ a!ori%_s&stem_re'ere ce"

    TR M(N L(p_address_re',ra!ori%_s&stem_re'ere ce))

    #N$ rm! ame " TR M(p_pa&_method)+

    Validation to check whether the given bank already exists

    SELECT COUNT(*)

    FROM (SELECT a a! a -_accou t_ ame,

    a a! a -_accou t_ um,

    a a!curre c&_code,

    a ! a -_ ame,

    a ! a -_ ra ch_ ame,

    a ! a -_ um,

    ..a ! a -_ um er

    a !cou tr&

    FROM ap_ a -_accou ts a a,

    ap_ a -_ ra ches a

    W ERE a ! a -_ ra ch_id " a a! a -_ ra ch

    /#N0

    W ERE a -_accou t_ um "N L(cur_cust_ -! a -_accou t_ um, a -_accou t_ um)

    #N$ a -_accou t_ ame "

    N L(cur_cust_ -! a -_accou t_ ame, a -_accou t_ ame)

    #N$ a -_ ame " N L(cur_cust_ -! a -_ ame, a -_

    #N$ a -_ um " N L(cur_cust_ -! a -_ um, a -_ um

    ..#N$ N L( a -_ um er,1)"

    N L(N L(cur_cust_ -! a -_ um er, a -_ um er),1)

    #N$ a -_ ra ch_ ame "

    N L(cur_cust_ -! a -_ ra ch_ ame, a -_ ra ch_ ame)

    #N$ curre c&_code "

    N L(cur_cust_ -! a -_accou t_curre c&_code,curre c&_co

    #N$ cou tr& " N L(cur_cust_ -! a -_ ra ch_c

  • 5/28/2018 o2c Queries 09 Sep-10

    24/64

    Query to Link between Order Management and Account Receivable

    SELECT ooha.order_number

    , oola.line_number so_line_number

    , oola.ordered_item

    , oola.ordered_quantity * oola.unit_selling_price so_extend

    , rcta.trx_number invoice_number

    , rcta.trx_date

    , rctla.line_number inv_line_number

    , rctla.unit_selling_price inv_unit_selling_price

    !"# oe_order_headers_all ooha

    , oe_order_lines_all oola

    , ra_customer_trx_all rcta

    , ra_customer_trx_lines_all rctla

    $%E!E ooha.header_id & oola.header_id

    '() rcta.customer_trx_id & rctla.customer_trx_id

    '() rctla.inter ace_line_attribute+ & T"_C%'! oola.line_id-

    '() rctla.inter ace_line_attribute & T"_C%'! ooha.order_n

    '() order_number & /p_order_number

    Query to get Customer Related information for a Sales Order

    The query 0ill list S%12 T" and 31LL T" 'ddress or a customer.

    SELECT ooh.order_number

    , hp_bill.party_name

    , hl_ship.address 44)ecode hl_ship.address5,(6LL,77,chr 8--

    44hl_ship.address544)ecode hl_ship.address9,(6LL,77,chr 8--

    44hl_ship.address944)ecode hl_ship.address:,(6LL,77,chr 8--

    44hl_ship.address:44)ecode hl_ship.city,(6LL,77,chr 8--

    44hl_ship.city 44)ecode hl_ship.state,(6LL,77,7,7-

    44hl_ship.state 44)ecode hl_ship.postal_code,77,7,7-

    44hl_ship.postal_code ship_to_address

    , hl_bill.address 44)ecode hl_bill.address5,(6LL,77,chr 8--

    44hl_bill.address544)ecode hl_bill.address9,(6LL,77,chr 8--

    44hl_bill.address944)ecode hl_bill.address:,(6LL,77,chr 8--

    44hl_bill.address:44)ecode hl_bill.city,(6LL,77,chr 8--

    44hl_bill.city 44)ecode hl_bill.state,(6LL,77,7,7-

    44hl_bill.state 44)ecode hl_bill.postal_code,77,7,7-

    44hl_bill.postal_code bill_to_address

    , ooh.transactional_curr_code currency_code

    , mp.organi;ation_code

    , ooh. ob_point_code

    , ooh. reight_terms_code

    , ooh.cust_po_number

    !"# oe_order_headers_all ooh

    , h;_cust_site_uses_all hcs_ship

    , h;_cust_acct_sites_all hca_ship

    , h;_party_sites hps_ship

    , h;_parties hp_ship

  • 5/28/2018 o2c Queries 09 Sep-10

    25/64

    , h;_locations hl_ship

    , h;_cust_site_uses_all hcs_bill

    , h;_cust_acct_sites_all hca_bill

    , h;_party_sites hps_bill

    , h;_parties hp_bill

    , h;_locations hl_bill

    , mtl_parameters mp

    $%E!E &

    '() header_id & /p_header_id

    '() ooh.ship_to_org_id & hcs_ship.site_use_id

    '() hcs_ship.cust_acct_site_id & hca_ship.cust_acct_site_id

    '() hca_ship.party_site_id & hps_ship.party_site_id

    '() hps_ship.party_id & hp_ship.party_id

    '() hps_ship.location_id & hl_ship.location_id

    '() ooh.invoice_to_org_id & hcs_bill.site_use_id

    '() hcs_bill.cust_acct_site_id & hca_bill.cust_acct_site_id

    '() hca_bill.party_site_id & hps_bill.party_site_id

    '() hps_bill.party_id & hp_bill.party_id

    '() hps_bill.location_id & hl_bill.location_id

    '() mp.organi;ation_id

  • 5/28/2018 o2c Queries 09 Sep-10

    26/64

    '() hcsa.party_site_id & hps.party_site_id

    '() hcsu.cust_acct_site_id & hcsa.cust_acct_site_id

    '() hca.cust_account_id & hcsa.cust_account_id

    '() hca.account_number & /customer_number

    Customer Queries

    Customer Accounts that have Non Primary Phone Contact P

    SELECT /*+ use_nl ( phone ca) */

    account_number

    FROM hz_cust_accounts ca

    (SELECT o!ner_table_"#

    FROM ( SELECT o!ner_table_"#

    S$M(%ECO%E(pr"mar&_'la ,)) pr"mar&_count

    S$M(%ECO%E(pr"mar&_'la , )) non_pr"mar&_cou FROM hz_contact_po"nts

    -.ERE status 0

    01% contact_po"nt_t&pe 2.O1E

    3RO$2 4 o!ner_table_"#

    )

    -.ERE pr"mar&_count , 01% non_pr"mar&_count 5 ,

    ) phone

    -.ERE ca6part&_"# phone

    SELECT account_number

    FROM hz_cust_accounts hca

    -.ERE 1OT E78STS ( SELECT

    FROM hz_contact_po"nts hcp

    -.ERE contact_po"nt_t&pe 2.O1E

    01% o!ner_table_name .9_20RT8ES

    01% o!ner_table_"# hca6part&_"#

    01% pr"mar&_'la )

    01% E78STS ( SELECT

    FROM hz_contact_po"nts hcp

    -.ERE contact_po"nt_t&pe 2.O1E

    01% o!ner_table_name .9_20RT8ES

    01% o!ner_table_"# hca6part&_"#

    http://sindraapps.blogspot.com/2010/08/customer-queries.htmlhttp://sindraapps.blogspot.com/2010/08/customer-queries.html
  • 5/28/2018 o2c Queries 09 Sep-10

    27/64

    01% 1:L(pr"mar&_'la 1 ) 1

    )

    L"st o' Customer 0ccounts that ha;e < or more 8#ent"'&"n 0##res

    SELECT /*+ use_nl(ps ca) */

    ca6account_number

    cnt

    ca6creat"on_#ate

    ca6last_up#ate_#ate

    FROM ( SELECT ps6part&_"#

    CO$1T(ps6part&_"#) cnt

    FROM hz_part&_s"tes ps

    -.ERE "#ent"'&"n _a##ress_'la

    3RO$2 4 ps6part&_"#

    .0:813 CO$1T(ps6part&_"#) 5

    ) ps

    hz_cust_accounts ca

    -.ERE ps6part&_"# ca6part&_"#

    2art"es that ha;e onl& non pr"mar& Contact 2o"nts

    SELECT o!ner_table_"#

    FROM ( SELECT o!ner_table_"#

    S$M(%ECO%E(pr"mar&_'la ,)) pr"mar&_count

    S$M(%ECO%E(pr"mar&_'la , )) non_pr"mar&_count

    FROM hz_contact_po"nts

    -.ERE status 0

    01% contact_po"nt_t&pe 2.O1E

    3RO$2 4 o!ner_table_"#

    )

    -.ERE pr"mar&_count , 01% non_pr"mar&_count 5 ,

    List of Phones used by more than one accounts

    SELECT hcp_out6phone_area_co#e

    hcp_out6phone_number

    hca_out6account_number

  • 5/28/2018 o2c Queries 09 Sep-10

    28/64

    part&_name

    FROM hz_contact_po"nts hcp_out

    hz_cust_accounts hca_out

    hz_part"es part&

    ( SELECT hcp6phone_area_co#e

    hcp6phone_number

    == CO$1T(%8ST81CT hca6account_number)

    FROM hz_contact_po"nts hcp

    hz_cust_accounts hca

    (SELECT hcp_"n6phone_area_co#e

    hcp_"n6phone_number

    FROM hz_contact_po"nts hcp_"n

    -.ERE hcp_"n6creat"on_#ate 5 TO_%0TE( =M0R)

    01% hcp_"n6creat"on_#ate ? TO_%0TE( =02R=, air cargo, ship cargo, or railca

    as 1tems in 1nventory 0ith an item type o ?vehicle@.

    Each trip has a minimum o t0o stops, 2ic>A6p and )ropA" .

    ' trip can be created automatically or manually rom the Shipping

    automatically created rom the Ship Con irm orm.

    Companies that use public carriers let the system automatically c

    Con irm process. This eliminates unnecessary transactions.

    !at is "ri# Sto#s in Oracle A##s$

    ' Stop is a point along the route that a trip ma>es to it=s inal de

    The Ship Con irm process initiates the ?2ic>A6p@ stop and puttin

    #anually record all stops made by the Trip using the Shipping Tran

    Ship Con irm process automatically close a Trip, 0hich creates and cl

    changes the )elivery status to ?Shipped@.

    Companies that use public carries let the system automatically cl

    Con irm.

    !at is %elivery legs in Oracle A##s$

  • 5/28/2018 o2c Queries 09 Sep-10

    60/64

    ' )elivery Leg consists o t0o stops 0here the delivery is pic>ed u

    respectively on the same trip. The delivery might travel through several l

    ' )elivery leg is synonymous to the 3ill o Lading.

    ' bill o lading is a receipt, listing all the goods that 0ere sign

    The Ship Con irm orm has the option to generate a bill o ladin

    part o the )elivery )ocument Set.

    !at is %eliveries in Oracle A##s$

    ' )elivery is required to per orm Ship Con irm. 1t represents al

    rom the same 0arehouse, going to the same Customer location.

    The grouping o delivery lines into deliveries is restricted b

    established on the Shipping 2arameters A )elivery Brouping Tab.

    ' )elivery can be created automatically or manually rom the Ship

    time a ter the order lines have become ?'0aiting Shipment@ or can be au

    !elease Sales "rder process.

    !at is %elivery Lines in Oracle A##s$

    )elivery Lines are Sales "rder Lines 0hich have completed all their

    prerequisites to Shipping such as Schedule Line or Create Supply.

    )elivery lines are visible rom the Shipping Transaction or

    Sales "rder Line=s 'dditional 1n ormation )eliveries tab.

    !at is L&N's in Oracle A##s$

  • 5/28/2018 o2c Queries 09 Sep-10

    61/64

    L2(, License 2late (umber- are also >no0n as Containers.

    ' container can be loaded inside o another container, o

    and then pac> that box onto a pallet.

    Containers must be setup as inventory items.

    Containers can be made mandatory using your Shipping 2aramet

    !at is S!i# (rom in Oracle A##s$

    The Ship rom location represents the 0arehouse that is per or

    ' 0arehouse is an 1nventory "rgani;ation. Each address that you can

    must be setup as an 1nventory location.

    !at is S!i# to in Oracle A##s$

    The Ship To location represents a ?ShipATo@ address that has bee

    record

    OM. N

    SELECT a!order_ um er, !2i e_ um er , '!2ot_ um er, c!oe_i ter'ace_'2a%

    FROM apps!oe_order_headers_a22 a

    , apps!oe_order_2i es_a22

    , apps!5sh_de2i6er&_detai2s c

    , apps!mt2_materia2_tra sactio s d

    , apps!mt2_tra sactio _t&pes e

    , apps!mt2_tra sactio _2ot_ um ers '

    W ERE a!header_id " !header_id

    #N$ d!tr8_source_2i e_id " c!source_2i e_id

    #N$ !2i e_id " d!tr8_source_2i e_id#N$ '!tra sactio _id " d!tra sactio _id

    #N$ d!tra sactio _t&pe_id " e!tra sactio _t&pe_id

    #N$ d!tra sactio _t&pe_id " DD

    #N$ a!order_ um er " B1J KDB

    SELECT a!order_ um er, !2i e_ um er , '!2ot_ um er, c!oe_i ter'ace_'2a%

    FROM apps!oe_order_headers_a22 a

    , apps!oe_order_2i es_a22

    , apps!5sh_de2i6er&_detai2s c

  • 5/28/2018 o2c Queries 09 Sep-10

    62/64

    , apps!mt2_materia2_tra sactio s d

    , apps!mt2_tra sactio _t&pes e

    , apps!mt2_tra sactio _2ot_ um ers '

    W ERE a!header_id " !header_id

    #N$ d!tr8_source_2i e_id " c!source_2i e_id

    a d c!tra sactio _ d " d!tra sactio _ d .. additio a2 2i e

    #N$ !2i e_id " d!tr8_source_2i e_id

    #N$ '!tra sactio _id " d!tra sactio _id

    #N$ d!tra sactio _t&pe_id " e!tra sactio _t&pe_id

    #N$ a!order_ um er " B1J KDB

    SELECT mp .organization_code,rctta .NAME,hca .account_number,

    rctla .description,hca .account_name,

    rcta .bill_to_site_use_id bill_to,

    SUBSTR (hcasa.global_attribute14,

    1 ,

    INSTR (hcasa.global_attribute14, '_') -1

    )leg_code,

    DECODE (apsa.CLASS,

    'CM', NVL (rcta.interface_header_attribute2,ct_reference),

    NVL (rcta.interface_header_attribute1,ct_reference)

    )refer_new,

    rcta .trx_number, TO_CHAR (rcta.trx_date, 'DD-MON-YYYY' )trx_date ,

    rctla .extended_amount amt

    FROMra_customer_trx_all rcta,

    ar_payment_schedules_all apsa ,

    ra_cust_trx_types_all rctta ,

    ra_customer_trx_lines_all rctla,

    hz_cust_site_uses_all hcsua, hz_cust_accounts hca,

    hz_cust_acct_sites_all hcasa,

    mtl_parameters mp

    WHERErcta .customer_trx_id=apsa .customer_trx_id

    ANDrcta .customer_trx_id=rctla .customer_trx_id

    ANDrcta .cust_trx_type_id =rctta .cust_trx_type_id

    ANDhcsua .site_use_id =rcta .bill_to_site_use_id

    ANDhcasa .cust_account_id=hca .cust_account_id

    ANDhcsua .cust_acct_site_id =hcasa .cust_acct_site_id

    ANDmp .organization_id=hcsua .warehouse_id

    ANDhca .status = 'A'

    ANDrctta .NAME LIKE ('%JE')

    AND TRUNC (apsa.gl_date) >= '01-JAN-2013'

    AND TRUNC (apsa.gl_date)

  • 5/28/2018 o2c Queries 09 Sep-10

    63/64

    SELECT ood.organi;ation_name, msi.concatenated_segments i

    mtt.transaction_type_id, mtt.transaction_type_name, mmt.tr

    mmt.subinventory_code,

    trans er_subinventory,mmt.transaction_type_id,mmt.pic>ing

    mmt.rcv_transaction_id

    !"# mtl_material_transactions mmt,

    mtl_transaction_types mtt,

    mtl_system_items_> v msi,

    org_organi;ation_de initions ood

    $%E!E mmt.transaction_type_id & mtt.transaction_type_id

    '() mmt.organi;ation_id & msi.organi;ation_id

    '() mmt.inventory_item_id & msi.inventory_item_id

    '() mmt.organi;ation_id & ood.organi;ation_id

    '() mtt.transaction_type_id ("T 1( +, D, 5, 888F-

  • 5/28/2018 o2c Queries 09 Sep-10

    64/64

    '() mmt.transaction_date 3ET$EE( (GL /p_trx_date_ rom,

    mmt.transaction_date

    -

    '() (GL /p_trx_date_to,

    mmt.transaction_date

    -

    '() msi.segment & (GL /p_segment , msi.segment -

    '() msi.segment5 & (GL /p_segment5, msi.segment5-

    '() msi.segment9 & (GL /p_segment9, msi.segment9-

    '() ood.operating_unit & /p_org_id

    '() ood.organi;ation_id & (GL /p_0h, ood.organi;ation_id-