Thursday, 1 May 2014

Link between Supplier And Banks and TCA table


The link between PO_VENDORS and HZ_PARTIES is PO_VENDORS.party_id. The link between PO_VENDOR_SITES_ALL and HZ_PARTY_SITES is PO_VENDOR_SITES_ALL.party_site_id.

When a Supplier is created Record will be Inserted in HZ_PARTIES. When the Supplier Site is created Record will be Inserted in HZ_PARTY_SITES. When Address is created it will be stored in HZ_LOCATIONS

When a bank Is Created, the banking information will be stored in IBY_EXT_BANK_ACCOUNTS IBY_EXT_BANK_ACCOUNTS.BANK_id = hz_paties.party_id

When the Bank is assigned to Vendors then it will be updated in HZ_CODE_ASSIGNMENTS.

HZ_CODE_ASSIGNMENTS.owner_table_id = IBY_EXT_BANK_ACCOUNTS.branch_id.

The PARTY_SITE_ID column is the link between the tables IBY_EXTERNAL_PAYEES_ALL & PO_VENDOR_SITES_ALL

/* Formatted on 5/1/2014 1:20:59 PM (QP5 v5.114.809.3010) */
  SELECT   HZP.PARTY_NAME "VENDOR NAME",
           APS.SEGMENT1 "VENDOR NUMBER",
           ASS.VENDOR_SITE_CODE "SITE CODE",
           IEB.BANK_ACCOUNT_NUM "ACCOUNT NUMBER",
           IEB.BANK_ACCOUNT_NAME "ACCOUNT NAME",
           HZPBANK.PARTY_NAME "BANK NAME",
           HOPBRANCH.BANK_OR_BRANCH_NUMBER "BANK NUMBER",
           HZPBRANCH.PARTY_NAME "BRANCH NAME",
           HOPBRANCH.BANK_OR_BRANCH_NUMBER "BRANCH NUMBER"
    FROM   HZ_PARTIES HZP,
           AP_SUPPLIERS APS,
           HZ_PARTY_SITES SITE_SUPP,
           AP_SUPPLIER_SITES_ALL ASS,
           IBY_EXTERNAL_PAYEES_ALL IEP,
           IBY_PMT_INSTR_USES_ALL IPI,
           IBY_EXT_BANK_ACCOUNTS IEB,
           HZ_PARTIES HZPBANK,
           HZ_PARTIES HZPBRANCH,
           HZ_ORGANIZATION_PROFILES HOPBANK,
           HZ_ORGANIZATION_PROFILES HOPBRANCH
   WHERE       HZP.PARTY_ID = APS.PARTY_ID
           AND HZP.PARTY_ID = SITE_SUPP.PARTY_ID
           AND SITE_SUPP.PARTY_SITE_ID = ASS.PARTY_SITE_ID
           AND ASS.VENDOR_ID = APS.VENDOR_ID
           AND IEP.PAYEE_PARTY_ID = HZP.PARTY_ID
           AND IEP.PARTY_SITE_ID = SITE_SUPP.PARTY_SITE_ID
           AND IEP.SUPPLIER_SITE_ID = ASS.VENDOR_SITE_ID
           AND IEP.EXT_PAYEE_ID = IPI.EXT_PMT_PARTY_ID
           AND IPI.INSTRUMENT_ID = IEB.EXT_BANK_ACCOUNT_ID
           AND IEB.BANK_ID = HZPBANK.PARTY_ID
           AND IEB.BANK_ID = HZPBRANCH.PARTY_ID
           AND HZPBRANCH.PARTY_ID = HOPBRANCH.PARTY_ID
           AND HZPBANK.PARTY_ID = HOPBANK.PARTY_ID
ORDER BY   1, 3

2 comments:

  1. I have been in search of this information and finally located this comments. It merely required a few moments to see your post so have a preliminary understanding which I know a lot of people overlook. Not having this particular data I could hardly come to a decision. solve your supplier’s production problems

    ReplyDelete
  2. Great job here on _______ I read a lot of blog posts, but I never heard a topic like this. I Love this topic you made about the blogger's bucket list. Very resourceful. dark0de market url

    ReplyDelete