Monday, October 23, 2017

Query to get AR Incomplet Transactions

SELECT DISTINCT ract.org_id,
                  hou.name operating_unit,
                  rabs.name source,
                  ract.trx_number,
                  ract.trx_date,
                  ract.set_of_books_id,
                  rac_bill.account_number bill_to_cusomer_number,
                  hp_bill.party_name  bill_to_cusomer,
                  rac_ship.account_number ship_to_customer_number,
                  hp_ship.party_name  ship_to_cusomer
    FROM hr_operating_units hou,
         ra_customer_trx_all ract,
         ra_batch_sources_all rabs,
         hz_cust_accounts_all rac_bill,
         hz_parties hp_bill,
         hz_cust_accounts_all rac_ship,
         hz_parties hp_ship
   WHERE hou.organization_id = ract.org_id
     AND ract.complete_flag = 'N'
     AND ract.batch_source_id = rabs.batch_source_id
     AND ract.bill_to_customer_id = rac_bill.cust_account_id(+)
     AND ract.ship_to_customer_id = rac_ship.cust_account_id(+)
     AND TRUNC (ract.trx_date) BETWEEN '01-OCT-16' AND '31-OCT-17'
     AND rac_bill.party_id = hp_bill.party_id
     AND rac_ship.party_id = hp_ship.party_id
ORDER BY ract.org_id

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)