1746:
1747: /*---------------------------------------------------------------+
1748: | Update sold to customer name
1749: +---------------------------------------------------------------*/
1750: -- Changed to use hz_cust_accounts and hz_parties instead of ra_customers
1751: -- as part of Uptake for R12
1752:
1753: l_stmt_id := 160;
1754:
1754:
1755: UPDATE CST_BIS_MARGIN_SUMMARY temp
1756: SET sold_to_customer_name =
1757: (SELECT hp.party_name -- references ra_customers.customer_name
1758: FROM hz_cust_accounts hca, hz_parties hp -- Object ra_customers obsoleted in R12
1759: WHERE hca.party_id = hp.party_id
1760: AND hca.cust_account_id = temp.customer_id)
1761: WHERE
1762: customer_id is not null
1765:
1766: /*---------------------------------------------------------------+
1767: | Update bill to customer name
1768: +---------------------------------------------------------------*/
1769: -- Changed to use hz_cust_accounts, hz_parties, hz_cust_site_uses_all,
1770: -- hz_cust_acct_sites_all as part of Uptake for R12
1771:
1772: l_stmt_id := 170;
1773:
1774: UPDATE CST_BIS_MARGIN_SUMMARY temp
1775: SET bill_to_customer_name =
1776: (SELECT hp.party_name
1777: FROM hz_cust_accounts hca
1778: , hz_parties hp
1779: , hz_cust_site_uses_all hsu
1780: , hz_cust_acct_sites_all ha
1781: WHERE
1782: NVL(ha.org_id, -999) = NVL(l_ou_id,NVL(ha.org_id, -999))
1810:
1811: /*---------------------------------------------------------------+
1812: | Update ship to customer name
1813: +---------------------------------------------------------------*/
1814: -- Changed to use hz_cust_accounts, hz_parties, hz_cust_site_uses_all,
1815: -- hz_cust_acct_sites_all as part of Uptake for R12
1816:
1817: l_stmt_id := 180;
1818:
1819: UPDATE CST_BIS_MARGIN_SUMMARY temp
1820: SET ship_to_customer_name =
1821: (SELECT hp.party_name
1822: FROM hz_cust_accounts hca
1823: , hz_parties hp
1824: , hz_cust_site_uses_all hsu
1825: , hz_cust_acct_sites_all ha
1826: WHERE
1827: NVL(ha.org_id, -999) = NVL(l_ou_id,NVL(ha.org_id, -999))
1932:
1933: /*---------------------------------------------------------------+
1934: | Update Country level of Geography dimension
1935: +---------------------------------------------------------------*/
1936: -- Changed to use hz_cust_accounts, hz_parties, hz_cust_site_uses_all,
1937: -- hz_cust_acct_sites_all as part of Uptake for R12
1938:
1939: l_stmt_id := 184;
1940: