Monday, 26 January 2015

Query Sales Order Number Against AR Receipt No.

Pupose:
Receipt -->
       Against which Invoice Applied -->
                   Then That Invoice Mapped to Sales Order.

Query:
Select Arc.Receipt_Number, Trx_Number Invoice_Num, Ct_Reference Sales_Order
  From Ar_Receivable_Applications_All App,
       Ra_Customer_Trx_All            Rac,
       Ar_Cash_Receipts_All           Arc
 Where App.Applied_Customer_Trx_Id = Rac.Customer_Trx_Id
   And App.Cash_Receipt_Id = Arc.Cash_Receipt_Id

1 comment:

  1. Refer below , RMA sales order and Receipt :

    SELECT ooha.ORDER_NUMBER "SALES ORDER"
    ,ORDER_CATEGORY_CODE
    ,ORDERED_ITEM
    ,CONTEXT
    ,SUBINVENTORY
    ,SHIPMENT_NUM
    ,RECEIPT_NUM
    ,ATTRIBUTE_CATEGORY
    ,CUSTOMER_ID
    ,UNIT_OF_MEASURE
    ,ITEM_DESCRIPTION
    ,SHIPMENT_LINE_STATUS_CODE
    ,SOURCE_DOCUMENT_CODE
    FROM OE_ORDER_HEADERS_ALL ooha
    ,OE_ORDER_LINES_ALL oola
    ,RCV_SHIPMENT_HEADERS rsh
    ,RCV_SHIPMENT_LINES rsl
    WHERE 1=1
    AND ooha.header_id=oola.header_id
    AND ooha.header_id=rsl.OE_ORDER_HEADER_ID
    AND rsh.shipment_header_id=rsl.shipment_header_id
    AND rsl.OE_ORDER_LINE_ID=oola.line_id
    AND ooha.ORDER_NUMBER='1102261'
    AND SOURCE_DOCUMENT_CODE ='RMA'

    ReplyDelete

Query to Find Receipt Class and its GL Combinition Query

SELECT ARC.NAME ReceiptClass,        ARC.CREATION_METHOD_CODE Creation_Mehthod,        DECODE (ARC.REMIT_METHOD_CODE,             ...