Tuesday, 13 January 2015

Query to find Customer items :

SELECT   hp.party_name customer,
           ci.customer_item_number,
           ci.customer_item_desc,
           msi.segment1 item,
           msi.description item_desc,
           ci.customer_category_code,
           ci.item_definition_level,
           ci.commodity_code_id,
           ci.address_id
    FROM   hz_parties hp,
           hz_cust_accounts hca,
           mtl_system_items msi,
           mtl_customer_items ci,
           mtl_customer_item_xrefs ix
   WHERE       ci.customer_item_id = ix.customer_item_id
           AND ix.inventory_item_id = msi.inventory_item_id
           AND ix.master_organization_id = msi.organization_id
           AND ci.customer_id = hca.cust_account_id
           AND hca.party_id = hp.party_id
ORDER BY   1, 2
/

No comments:

Post a Comment