DBA Data[Home] [Help]

APPS.MSC_X_NETTING_PKG dependencies on MSC_SUP_DEM_ENTRIES

Line 195: from msc_sup_dem_entries

191: ---------------------------------------------------------------------
192: begin
193: select nvl(max(last_refresh_number),0)
194: into l_max_refresh_number
195: from msc_sup_dem_entries
196: where last_refresh_number > G_ZERO;
197: exception
198: when no_data_found then
199: l_max_refresh_number := 0;

Line 205: --in msc_sup_dem_entries because later on this transaction

201:
202: --dbms_output.put_line('Max refresh number ' || l_max_refresh_number);
203: -------------------------------------------------------------
204: --Make sure delete all the exceptions where the quantity = 0
205: --in msc_sup_dem_entries because later on this transaction
206: --will be purged.
207: -------------------------------------------------------------
208:
209: Delete_Exec_Order_Dependency(l_max_refresh_number);

Line 220: before purging the transaction in msc_sup_dem_entries where

216: DELETE_EXCEP (); --added for bug#6729356
217:
218: /*-----------------------------------------------------------
219: CHANGED_ORDER group need to be called first if it set to Y
220: before purging the transaction in msc_sup_dem_entries where
221: quantity = 0.
222: Cancelled Order (exception_34) will base on a cancelled PO
223: where quantity = 0 to generate.
224: Other exceptions which are depending on Execution Entities

Line 229: that need to be deleted are not removed from the table (msc_sup_dem_entries).

225: will not capture any transactions where quantity = 0 to generate.
226:
227: The reason behind is
228: when we use the 'D' sync indicator during the data upload the records
229: that need to be deleted are not removed from the table (msc_sup_dem_entries).
230: Instead the quantity is set to zero and the transaction id is updated
231: to ensure that the exceptions for the items deleted are recomputed
232: The current netting engine will only consider this (quantity = 0)
233: for non-execution entities exceptions.

Line 1015: --Delete all transactions from msc_sup_dem_entries with quantity = 0 for

1011:
1012:
1013: --------------------------------------------------------------------------
1014: --Here is deleting only Planning Entities.
1015: --Delete all transactions from msc_sup_dem_entries with quantity = 0 for
1016: --the planning entities (means not the execution entites -- SO, PO, asn).
1017: --When we use the 'D' sync indicator during the data upload the records
1018: --that need to be deleted are not removed from the table. Instead the
1019: --quantity is set to zero and the transaction id is updated to ensure that

Line 1024: delete /*+ PARALLEL(sd) */ from msc_sup_dem_entries sd

1020: --the exceptions for the items deleted are recomputed. After exceptions
1021: --are computed we purge these records from the table.
1022: ---------------------------------------------------------------------------
1023: --dbms_output.put_line('Delete zero qty for Planning Entities');
1024: delete /*+ PARALLEL(sd) */ from msc_sup_dem_entries sd
1025: where sd.plan_id = G_PLAN_ID
1026: and sd.quantity = 0
1027: and nvl(sd.last_update_login,-1) = -99
1028: and sd.last_refresh_number <= l_max_refresh_number ;

Line 1036: serial_txn_id not in (select transaction_id from msc_sup_dem_entries);

1032: --Deleting the disable serial number record
1033: --------------------------------------------------------------------------
1034: DELETE from msc_serial_numbers msn
1035: WHERE NVL(msn.disable_date,sysdate+1)<=sysdate OR
1036: serial_txn_id not in (select transaction_id from msc_sup_dem_entries);
1037:
1038: --=================================================================
1039: -- A profile option to set the workflow notification on/off
1040: -- By default it is set to "Y" and let it launch the workflow

Line 1451: from msc_sup_dem_entries sd

1447: if p_type in (SUPPLY_PLANNING,DEMAND_PLANNING) then
1448: if (p_role = SELLER) then
1449: select nvl(max(sd.last_refresh_number),-1)
1450: into l_max_rf_num
1451: from msc_sup_dem_entries sd
1452: where sd.plan_id = G_PLAN_ID
1453: and sd.publisher_id = p_company_id
1454: and sd.publisher_site_id = p_company_site_id
1455: and sd.inventory_item_id = p_item_id

Line 1460: from msc_sup_dem_entries sd

1456: and trunc(sd.key_date) >= trunc(sysdate);
1457: elsif (p_role = BUYER) then
1458: select nvl(max(sd.last_refresh_number),-1)
1459: into l_max_rf_num
1460: from msc_sup_dem_entries sd
1461: where sd.plan_id = G_PLAN_ID
1462: and sd.publisher_id = p_company_id
1463: and sd.publisher_site_id = p_company_site_id
1464: and sd.inventory_item_id = p_item_id

Line 1472: from msc_sup_dem_entries sd

1468: elsif p_type in (VMI) then
1469: if (p_role = SELLER) then
1470: select nvl(max(sd.last_refresh_number),-1)
1471: into l_max_rf_num
1472: from msc_sup_dem_entries sd
1473: where sd.plan_id = G_PLAN_ID
1474: and sd.publisher_id = p_company_id
1475: and sd.publisher_site_id = p_company_site_id
1476: and sd.inventory_item_id = p_item_id

Line 1482: from msc_sup_dem_entries sd

1478: /* Bug# 4303597 -- added OR condition so that refresh_number of updated ASN is selected */
1479: elsif (p_role = BUYER) then
1480: select nvl(max(sd.last_refresh_number),-1)
1481: into l_max_rf_num
1482: from msc_sup_dem_entries sd
1483: where sd.plan_id = G_PLAN_ID
1484: and sd.publisher_id = p_company_id
1485: and sd.publisher_site_id = p_company_site_id
1486: and sd.inventory_item_id = p_item_id;

Line 2004: FROM msc_sup_dem_entries sd

2000: --to compare the po quantity and so quantity, need to
2001: --get the tp_quantity of the so.
2002: SELECT sum(sd.tp_quantity)
2003: INTO l_total_qty
2004: FROM msc_sup_dem_entries sd
2005: WHERE sd.plan_id = G_PLAN_ID
2006: AND sd.publisher_id = p_company_id
2007: AND sd.publisher_site_id = p_company_site_id
2008: AND sd.inventory_item_id = p_item_id

Line 2047: FROM msc_sup_dem_entries sd

2043: SELECT 1
2044: INTO l_return_code
2045: FROM dual
2046: WHERE EXISTS (SELECT sd.order_number
2047: FROM msc_sup_dem_entries sd
2048: WHERE sd.plan_id = G_PLAN_ID
2049: AND sd.publisher_id = p_company_id
2050: AND sd.publisher_site_id = p_company_site_id
2051: AND sd.publisher_order_type = SALES_ORDER

Line 2086: FROM msc_sup_dem_entries sd

2082: SELECT 1
2083: INTO l_return_code
2084: FROM dual
2085: WHERE EXISTS (SELECT sd.order_number
2086: FROM msc_sup_dem_entries sd
2087: WHERE sd.plan_id = G_PLAN_ID
2088: AND sd.publisher_id = p_company_id
2089: AND sd.publisher_site_id = p_company_site_id
2090: AND sd.publisher_order_type = PURCHASE_ORDER

Line 2125: FROM msc_sup_dem_entries sd

2121: SELECT 1
2122: INTO l_return_code
2123: FROM dual
2124: WHERE EXISTS (SELECT sd.order_number
2125: FROM msc_sup_dem_entries sd
2126: WHERE sd.plan_id = G_PLAN_ID
2127: AND sd.publisher_id = p_company_id
2128: AND sd.publisher_site_id = p_company_site_id
2129: AND sd.publisher_order_type = SHIPMENT_RECEIPT

Line 2228: --in msc_sup_dem_entries. We use the 'D' or 'P' sync indicator

2224: -------------------------------------------------------------
2225: --This is procedure is call when ods netting is run and also when loading
2226: --data.
2227: --delete all dependent exceptions when deleting or purging any entry
2228: --in msc_sup_dem_entries. We use the 'D' or 'P' sync indicator
2229: -- during the data upload that the record needs to removed. Currently,
2230: --the entry in msc_sup_dem_entries is set with the quantity = 0
2231:
2232: PROCEDURE DELETE_EXEC_ORDER_DEPENDENCY (p_refresh_number IN Number) IS

Line 2230: --the entry in msc_sup_dem_entries is set with the quantity = 0

2226: --data.
2227: --delete all dependent exceptions when deleting or purging any entry
2228: --in msc_sup_dem_entries. We use the 'D' or 'P' sync indicator
2229: -- during the data upload that the record needs to removed. Currently,
2230: --the entry in msc_sup_dem_entries is set with the quantity = 0
2231:
2232: PROCEDURE DELETE_EXEC_ORDER_DEPENDENCY (p_refresh_number IN Number) IS
2233: CURSOR delete_entry_c IS
2234: SELECT distinct sd.transaction_id,

Line 2245: FROM msc_sup_dem_entries sd, msc_x_exception_details med

2241: med.supplier_site_id,
2242: med.exception_group,
2243: med.exception_type,
2244: med.exception_detail_id
2245: FROM msc_sup_dem_entries sd, msc_x_exception_details med
2246: WHERE sd.plan_id = G_PLAN_ID
2247: AND sd.quantity = 0
2248: AND nvl(sd.last_update_login,-1) = -99
2249: AND sd.last_refresh_number >= p_refresh_number

Line 2264: FROM msc_sup_dem_entries sd, msc_x_exception_details med

2260: med.supplier_site_id,
2261: med.exception_group,
2262: med.exception_type,
2263: med.exception_detail_id
2264: FROM msc_sup_dem_entries sd, msc_x_exception_details med
2265: WHERE sd.plan_id = G_PLAN_ID
2266: AND sd.quantity = 0
2267: AND nvl(sd.last_update_login, -1) = -99
2268: AND sd.last_refresh_number >= p_refresh_number

Line 2468: DELETE /*+ PARALLEL(sd) */ from msc_sup_dem_entries sd

2464: PROCEDURE PURGE_ZQTY_EXEC_ORDER (p_refresh_number IN Number) IS
2465:
2466: BEGIN
2467:
2468: DELETE /*+ PARALLEL(sd) */ from msc_sup_dem_entries sd
2469: WHERE sd.plan_id = G_PLAN_ID
2470: AND sd.quantity = 0
2471: AND sd.publisher_order_type in
2472: (PURCHASE_ORDER,SALES_ORDER,ASN,SHIPMENT_RECEIPT)

Line 3556: from msc_sup_dem_entries sd

3552: item_name,
3553: item_description,
3554: customer_item_name,
3555: supplier_item_name
3556: from msc_sup_dem_entries sd
3557: where plan_id = -1
3558: and publisher_order_type in (3,14)
3559: and last_refresh_number > p_refresh_number
3560: and exists (select 1

Line 3579: from msc_sup_dem_entries sd

3575: item_name,
3576: item_description,
3577: customer_item_name,
3578: supplier_item_name
3579: from msc_sup_dem_entries sd
3580: where plan_id = -1
3581: and publisher_order_type = 2
3582: and last_refresh_number > p_refresh_number
3583: and exists (select 1

Line 3603: from msc_sup_dem_entries sd

3599: item_name,
3600: item_description,
3601: customer_item_name,
3602: supplier_item_name
3603: from msc_sup_dem_entries sd
3604: where plan_id = -1
3605: and publisher_order_type = 2
3606: and last_refresh_number > p_refresh_number
3607: and exists (select 1

Line 3626: from msc_sup_dem_entries sd

3622: item_name,
3623: item_description,
3624: customer_item_name,
3625: supplier_item_name
3626: from msc_sup_dem_entries sd
3627: where plan_id = -1
3628: and publisher_order_type in (3,14)
3629: and last_refresh_number > p_refresh_number
3630: and exists (select 1