DBA Data[Home] [Help]

APPS.MSC_CL_SCE_COLLECTION dependencies on MSC_TRADING_PARTNER_MAPS

Line 158: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".

154:
155: IF (p_is_complete_refresh) THEN
156:
157: -- ======================================================================================
158: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
159: -- These records will be found using msc_company_site_id_lid as reference.
160: -- ======================================================================================
161: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
162: ' where exists(select 1 '||

Line 161: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||

157: -- ======================================================================================
158: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
159: -- These records will be found using msc_company_site_id_lid as reference.
160: -- ======================================================================================
161: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
162: ' where exists(select 1 '||
163: ' from msc_company_site_id_lid mcsil '||
164: ' where mcsil.company_site_id = mtpm.company_key '||
165: ' and mcsil.partner_type = 3'||

Line 180: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".

176: END IF;
177:
178:
179: -- ======================================================================================
180: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
181: -- This step is required because APS always deletes the Planning Org records and collect
182: -- it fresh.
183: -- ======================================================================================
184:

Line 185: lv_sql_stmt:= ' delete msc_trading_partner_maps mtpm '||

181: -- This step is required because APS always deletes the Planning Org records and collect
182: -- it fresh.
183: -- ======================================================================================
184:
185: lv_sql_stmt:= ' delete msc_trading_partner_maps mtpm '||
186: ' where exists (select 1 '||
187: ' from msc_trading_partners mtp '||
188: ' where mtp.partner_type = 3'||
189: ' and mtp.sr_instance_id = :v_sr_instance_id'||

Line 205: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".

201: OR
202: (p_customer_enabled = MSC_CL_COLLECTION.SYS_YES)) THEN
203:
204: -- ======================================================================================
205: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
206: -- These records will be found using msc_company_site_id_lid as reference.
207: -- ======================================================================================
208: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
209: ' where exists(select 1 '||

Line 208: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||

204: -- ======================================================================================
205: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
206: -- These records will be found using msc_company_site_id_lid as reference.
207: -- ======================================================================================
208: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
209: ' where exists(select 1 '||
210: ' from msc_company_site_id_lid mcsil '||
211: ' where mcsil.company_site_id = mtpm.company_key '||
212: ' and mcsil.partner_type = 3'||

Line 225: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".

221: DELETE MSC_COMPANY_SITE_ID_LID WHERE SR_INSTANCE_ID= p_instance_id;
222: END IF;
223:
224: -- ======================================================================================
225: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
226: -- This step is required because APS always deletes the Planning Org records and collect
227: -- it fresh.
228: -- ======================================================================================
229:

Line 230: lv_sql_stmt:= ' delete msc_trading_partner_maps mtpm '||

226: -- This step is required because APS always deletes the Planning Org records and collect
227: -- it fresh.
228: -- ======================================================================================
229:
230: lv_sql_stmt:= ' delete msc_trading_partner_maps mtpm '||
231: ' where exists (select 1 '||
232: ' from msc_trading_partners mtp '||
233: ' where mtp.partner_type = 3'||
234: ' and mtp.sr_instance_id = :v_sr_instance_id'||

Line 1696: from msc_trading_partner_maps mtpm

1692: and mtp.partner_type IN (G_SUPPLIER, G_CUSTOMER)
1693: /* Perf changes */
1694: /* Removed Minus and added following code lines for performance fix */
1695: and not exists ( select 1
1696: from msc_trading_partner_maps mtpm
1697: where mtpm.tp_key = mtp.partner_id
1698: and mtpm.company_key = mcr.relationship_id
1699: and mtpm.map_type = 1);
1700: /* MINUS

Line 1703: from msc_trading_partner_maps

1699: and mtpm.map_type = 1);
1700: /* MINUS
1701: select tp_key,
1702: company_key
1703: from msc_trading_partner_maps
1704: where map_type = 1; */
1705:
1706: a_tp_id number_arr;
1707: a_company_id number_arr;

Line 1730: from msc_trading_partner_maps mtpm

1726: /* and mcs.company_id = nvl(mtp.company_id, MSC_CL_COLLECTION.G_MY_COMPANY_ID) */
1727: and mcs.company_id = MSC_CL_COLLECTION.G_MY_COMPANY_ID
1728: and mtp.company_id IS NULL
1729: and not exists ( select 1
1730: from msc_trading_partner_maps mtpm
1731: where mtpm.tp_key = mtp.partner_id
1732: and mtpm.company_key
1733: = mcs.company_site_id
1734: and mtpm.map_type = 2);

Line 1739: from msc_trading_partner_maps

1735: /*
1736: MINUS
1737: select tp_key,
1738: company_key
1739: from msc_trading_partner_maps
1740: where map_type = 2; */
1741:
1742: a_partner_id number_arr;
1743: a_company_site_id number_arr;

Line 1759: from msc_trading_partner_maps mtpm

1755: and mcsil.partner_type = mtsil.partner_type
1756: and mtsil.sr_company_id = -1
1757: and mcsil.sr_company_site_id = mtsil.sr_tp_site_id
1758: and not exists (select 1
1759: from msc_trading_partner_maps mtpm
1760: where mtpm.tp_key = mtsil.tp_site_id
1761: and mtpm.company_key = mcs.company_site_id
1762: and mtpm.map_type = 3);
1763:

Line 1768: from msc_trading_partner_maps

1764:
1765: /* MINUS
1766: select tp_key,
1767: company_key
1768: from msc_trading_partner_maps
1769: where map_type = 3; */
1770:
1771: a_tp_site_id number_arr;
1772: a1_company_site_id number_arr;

Line 1793: insert into msc_trading_partner_maps

1789:
1790: IF a_tp_id.COUNT > 0 THEN
1791: BEGIN
1792: FORALL i IN 1..a_tp_id.COUNT
1793: insert into msc_trading_partner_maps
1794: ( map_id,
1795: map_type,
1796: tp_key,
1797: COMPANY_KEY ,

Line 1839: insert into msc_trading_partner_maps

1835:
1836: IF a_partner_id.COUNT > 0 THEN
1837: BEGIN
1838: FORALL i IN 1..a_partner_id.COUNT
1839: insert into msc_trading_partner_maps
1840: ( map_id,
1841: map_type,
1842: tp_key,
1843: COMPANY_KEY ,

Line 1891: insert into msc_trading_partner_maps

1887:
1888: IF a_tp_site_id.COUNT > 0 THEN
1889: BEGIN
1890: FORALL i IN 1..a_tp_site_id.COUNT
1891: insert into msc_trading_partner_maps
1892: ( map_id,
1893: map_type,
1894: tp_key,
1895: COMPANY_KEY ,

Line 1924: msc_analyse_tables_pk.analyse_table( 'MSC_TRADING_PARTNER_MAPS');

1920: RETURN;
1921: END;
1922: END IF;
1923: --Bug 5155944: Analysing the table to improve performance
1924: msc_analyse_tables_pk.analyse_table( 'MSC_TRADING_PARTNER_MAPS');
1925:
1926: END POPULATE_TP_MAP_TABLE;
1927:
1928: