DBA Data[Home] [Help]

APPS.MSC_CL_SCE_COLLECTION dependencies on MSC_TRADING_PARTNER_MAPS

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

133:
134: IF (p_is_complete_refresh) THEN
135:
136: -- ======================================================================================
137: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
138: -- These records will be found using msc_company_site_id_lid as reference.
139: -- ======================================================================================
140: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
141: ' where exists(select 1 '||

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

136: -- ======================================================================================
137: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
138: -- These records will be found using msc_company_site_id_lid as reference.
139: -- ======================================================================================
140: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
141: ' where exists(select 1 '||
142: ' from msc_company_site_id_lid mcsil '||
143: ' where mcsil.company_site_id = mtpm.company_key '||
144: ' and mcsil.partner_type = 3'||

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

155: END IF;
156:
157:
158: -- ======================================================================================
159: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
160: -- This step is required because APS always deletes the Planning Org records and collect
161: -- it fresh.
162: -- ======================================================================================
163:

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

160: -- This step is required because APS always deletes the Planning Org records and collect
161: -- it fresh.
162: -- ======================================================================================
163:
164: lv_sql_stmt:= ' delete msc_trading_partner_maps mtpm '||
165: ' where exists (select 1 '||
166: ' from msc_trading_partners mtp '||
167: ' where mtp.partner_type = 3'||
168: ' and mtp.sr_instance_id = :v_sr_instance_id'||

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

180: OR
181: (p_customer_enabled = MSC_CL_COLLECTION.SYS_YES)) THEN
182:
183: -- ======================================================================================
184: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
185: -- These records will be found using msc_company_site_id_lid as reference.
186: -- ======================================================================================
187: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
188: ' where exists(select 1 '||

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

183: -- ======================================================================================
184: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
185: -- These records will be found using msc_company_site_id_lid as reference.
186: -- ======================================================================================
187: lv_sql_stmt1 := ' delete msc_trading_partner_maps mtpm '||
188: ' where exists(select 1 '||
189: ' from msc_company_site_id_lid mcsil '||
190: ' where mcsil.company_site_id = mtpm.company_key '||
191: ' and mcsil.partner_type = 3'||

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

200: DELETE MSC_COMPANY_SITE_ID_LID WHERE SR_INSTANCE_ID= p_instance_id;
201: END IF;
202:
203: -- ======================================================================================
204: -- Delete Records from msc_trading_partner_maps which are of typr "Planning organization".
205: -- This step is required because APS always deletes the Planning Org records and collect
206: -- it fresh.
207: -- ======================================================================================
208:

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

205: -- This step is required because APS always deletes the Planning Org records and collect
206: -- it fresh.
207: -- ======================================================================================
208:
209: lv_sql_stmt:= ' delete msc_trading_partner_maps mtpm '||
210: ' where exists (select 1 '||
211: ' from msc_trading_partners mtp '||
212: ' where mtp.partner_type = 3'||
213: ' and mtp.sr_instance_id = :v_sr_instance_id'||

Line 1613: from msc_trading_partner_maps mtpm

1609: and mtp.partner_type IN (G_SUPPLIER, G_CUSTOMER)
1610: /* Perf changes */
1611: /* Removed Minus and added following code lines for performance fix */
1612: and not exists ( select 1
1613: from msc_trading_partner_maps mtpm
1614: where mtpm.tp_key = mtp.partner_id
1615: and mtpm.company_key = mcr.relationship_id
1616: and mtpm.map_type = 1);
1617: /* MINUS

Line 1620: from msc_trading_partner_maps

1616: and mtpm.map_type = 1);
1617: /* MINUS
1618: select tp_key,
1619: company_key
1620: from msc_trading_partner_maps
1621: where map_type = 1; */
1622:
1623: a_tp_id number_arr;
1624: a_company_id number_arr;

Line 1647: from msc_trading_partner_maps mtpm

1643: /* and mcs.company_id = nvl(mtp.company_id, MSC_CL_COLLECTION.G_MY_COMPANY_ID) */
1644: and mcs.company_id = MSC_CL_COLLECTION.G_MY_COMPANY_ID
1645: and mtp.company_id IS NULL
1646: and not exists ( select 1
1647: from msc_trading_partner_maps mtpm
1648: where mtpm.tp_key = mtp.partner_id
1649: and mtpm.company_key
1650: = mcs.company_site_id
1651: and mtpm.map_type = 2);

Line 1656: from msc_trading_partner_maps

1652: /*
1653: MINUS
1654: select tp_key,
1655: company_key
1656: from msc_trading_partner_maps
1657: where map_type = 2; */
1658:
1659: a_partner_id number_arr;
1660: a_company_site_id number_arr;

Line 1676: from msc_trading_partner_maps mtpm

1672: and mcsil.partner_type = mtsil.partner_type
1673: and mtsil.sr_company_id = -1
1674: and mcsil.sr_company_site_id = mtsil.sr_tp_site_id
1675: and not exists (select 1
1676: from msc_trading_partner_maps mtpm
1677: where mtpm.tp_key = mtsil.tp_site_id
1678: and mtpm.company_key = mcs.company_site_id
1679: and mtpm.map_type = 3);
1680:

Line 1685: from msc_trading_partner_maps

1681:
1682: /* MINUS
1683: select tp_key,
1684: company_key
1685: from msc_trading_partner_maps
1686: where map_type = 3; */
1687:
1688: a_tp_site_id number_arr;
1689: a1_company_site_id number_arr;

Line 1710: insert into msc_trading_partner_maps

1706:
1707: IF a_tp_id.COUNT > 0 THEN
1708: BEGIN
1709: FORALL i IN 1..a_tp_id.COUNT
1710: insert into msc_trading_partner_maps
1711: ( map_id,
1712: map_type,
1713: tp_key,
1714: COMPANY_KEY ,

Line 1756: insert into msc_trading_partner_maps

1752:
1753: IF a_partner_id.COUNT > 0 THEN
1754: BEGIN
1755: FORALL i IN 1..a_partner_id.COUNT
1756: insert into msc_trading_partner_maps
1757: ( map_id,
1758: map_type,
1759: tp_key,
1760: COMPANY_KEY ,

Line 1808: insert into msc_trading_partner_maps

1804:
1805: IF a_tp_site_id.COUNT > 0 THEN
1806: BEGIN
1807: FORALL i IN 1..a_tp_site_id.COUNT
1808: insert into msc_trading_partner_maps
1809: ( map_id,
1810: map_type,
1811: tp_key,
1812: COMPANY_KEY ,

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

1837: RETURN;
1838: END;
1839: END IF;
1840: --Bug 5155944: Analysing the table to improve performance
1841: msc_analyse_tables_pk.analyse_table( 'MSC_TRADING_PARTNER_MAPS');
1842:
1843: END POPULATE_TP_MAP_TABLE;
1844:
1845: