Reporting and Analytics for SCM

Get Involved. Join the Conversation.

Topic

    Nidhi Chhajed
    How to find order number when we have RMA in fusion
    Topic posted June 13, 2019 by Nidhi ChhajedBlue Ribbon: 750+ Points, tagged Order Management 
    61 Views, 1 Comment
    Title:
    How to find order number when we have RMA in fusion
    Content:

    Hi,


    In DOO_HEADERS_ALL , we have both RMA and corresponding SO number. But how can I find sales order number for a particular RMA


    Regards


    Nidhi

    Comment

     

    • Nidhi Chhajed

      Hi,

      I was able to find table to join RMA and SO , and below is SQL if someone else also come across same requirement:

       

      SELECT

      dha.order_number "Original Sales Order"

      ,dla.line_number "Original Order Line"

      , dhr.order_number "RMA Order"

      FROM

      doo_headers_all dha

      , doo_lines_all dla

      , doo_document_references ddr

      , doo_headers_all dhr

      WHERE ddr.doc_id = dha.header_id

      --AND dha.order_number = 'XXXX'  -- Enter your Sales Order Here

      AND dhr.order_number ='XXXX' --Enter your RMA Here

      AND dhr.header_id = ddr.header_id

      AND doc_ref_type = 'ORIGINAL_SALES_ORDER'

      AND dla.header_id = ddr.doc_id

      AND dla.line_id = ddr.doc_line_id