DBA Data[Home] [Help]

APPS.CSM_SYSTEM_ITEM_EVENT_PKG dependencies on MTL_SYSTEM_ITEMS

Line 14: g_table_name1 CONSTANT VARCHAR2(30) := 'MTL_SYSTEM_ITEMS_B';

10: -- Person Date Comments
11: -- --------- ------ ------------------------------------------
12: -- Enter procedure, function bodies as shown below
13:
14: g_table_name1 CONSTANT VARCHAR2(30) := 'MTL_SYSTEM_ITEMS_B';
15: g_acc_table_name1 CONSTANT VARCHAR2(30) := 'CSM_SYSTEM_ITEMS_ACC';
16: g_acc_sequence_name1 CONSTANT VARCHAR2(30) := 'CSM_SYSTEM_ITEMS_ACC_S';
17: g_publication_item_name1 CONSTANT CSM_ACC_PKG.t_publication_item_list :=
18: CSM_ACC_PKG.t_publication_item_list('CSF_M_SYSTEM_ITEMS');

Line 31: -- below procedure is called from csm_mtl_system_items where there is an org change

27: CSM_ACC_PKG.t_publication_item_list('CSF_M_ITEM_INSTANCES');
28: g_pk1_name2 CONSTANT VARCHAR2(30) := 'INSTANCE_ID';
29: g_pub_item2 CONSTANT VARCHAR2(30) := 'CSF_M_ITEM_INSTANCES';
30:
31: -- below procedure is called from csm_mtl_system_items where there is an org change
32: PROCEDURE delete_system_items(p_user_id IN NUMBER,
33: p_organization_id IN NUMBER)
34: IS
35: l_sqlerrno VARCHAR2(20);

Line 119: l_old_organization_id mtl_system_items.organization_id%TYPE;

115:
116: l_dummy BOOLEAN;
117: l_user_id_lst asg_download.user_list;
118: l_acc_id_lst asg_download.access_list;
119: l_old_organization_id mtl_system_items.organization_id%TYPE;
120: l_organization_id mtl_system_items.organization_id%TYPE;
121: l_userid NUMBER;
122:
123: BEGIN

Line 120: l_organization_id mtl_system_items.organization_id%TYPE;

116: l_dummy BOOLEAN;
117: l_user_id_lst asg_download.user_list;
118: l_acc_id_lst asg_download.access_list;
119: l_old_organization_id mtl_system_items.organization_id%TYPE;
120: l_organization_id mtl_system_items.organization_id%TYPE;
121: l_userid NUMBER;
122:
123: BEGIN
124: CSM_UTIL_PKG.LOG('Entering CSM_SYSTEM_ITEM_EVENT_PKG.PURGE_SYSTEM_ITEMS ',

Line 203: --SELECT /*+ INDEX (msi MTL_SYSTEM_ITEMS_B_U1) CSM_SYSTEM_ITEMS_ACC_S.NEXTVAL,

199: l_sqlerrmsg varchar2(2000);
200:
201: CURSOR l_systemitems_ins_csr(p_new_organization_id IN number, p_user_id IN number)
202: IS
203: --SELECT /*+ INDEX (msi MTL_SYSTEM_ITEMS_B_U1) CSM_SYSTEM_ITEMS_ACC_S.NEXTVAL,
204: au.user_id,
205: msi.inventory_item_id,
206: msi.organization_id
207: FROM asg_user au,

Line 209: mtl_system_items_b msi,

205: msi.inventory_item_id,
206: msi.organization_id
207: FROM asg_user au,
208: asg_user_pub_resps aupr,
209: mtl_system_items_b msi,
210: CS_BILLING_TYPE_CATEGORIES cbtc
211: WHERE au.user_id = p_user_id
212: AND au.user_name = aupr.user_name
213: AND aupr.pub_name = 'SERVICEP'

Line 237: l_old_organization_id mtl_system_items.organization_id%TYPE;

233: l_user_id_lst asg_download.user_list;
234: l_acc_id_lst asg_download.access_list;
235:
236: l_dummy BOOLEAN;
237: l_old_organization_id mtl_system_items.organization_id%TYPE;
238: l_organization_id mtl_system_items.organization_id%TYPE;
239: l_user_id NUMBER;
240:
241: BEGIN

Line 238: l_organization_id mtl_system_items.organization_id%TYPE;

234: l_acc_id_lst asg_download.access_list;
235:
236: l_dummy BOOLEAN;
237: l_old_organization_id mtl_system_items.organization_id%TYPE;
238: l_organization_id mtl_system_items.organization_id%TYPE;
239: l_user_id NUMBER;
240:
241: BEGIN
242: CSM_UTIL_PKG.LOG('Entering CSM_SYSTEM_ITEM_EVENT_PKG.GET_NEW_SYSTEM_ITEMS ',

Line 355: SELECT MAX(last_update_date) FROM mtl_system_items_b;

351: AND procedure_name = 'REFRESH_ACC';
352:
353: CURSOR c_max_last_upd_date_b
354: IS
355: SELECT MAX(last_update_date) FROM mtl_system_items_b;
356:
357: CURSOR c_max_last_upd_date_tl
358: IS
359: SELECT MAX(last_update_date) FROM mtl_system_items_tl;

Line 359: SELECT MAX(last_update_date) FROM mtl_system_items_tl;

355: SELECT MAX(last_update_date) FROM mtl_system_items_b;
356:
357: CURSOR c_max_last_upd_date_tl
358: IS
359: SELECT MAX(last_update_date) FROM mtl_system_items_tl;
360:
361: -- insert
362: CURSOR l_systemitems_ins_csr
363: IS

Line 370: mtl_system_items_b msi,

366: msi.inventory_item_id,
367: msi.organization_id
368: FROM asg_user au,
369: csm_user_inventory_org user_org,
370: mtl_system_items_b msi,
371: CS_BILLING_TYPE_CATEGORIES cbtc
372: WHERE user_org.user_id = au.user_id
373: AND au.user_id = au.owner_id
374: AND msi.organization_id = user_org.organization_id

Line 391: FROM mtl_system_items_b msi,

387: p_user_organization_id NUMBER)
388: IS
389: SELECT msi.inventory_item_id,
390: msi.organization_id
391: FROM mtl_system_items_b msi,
392: CS_BILLING_TYPE_CATEGORIES cbtc
393: WHERE msi.organization_id = p_user_organization_id
394: AND msi.enabled_flag = 'Y'
395: AND SYSDATE BETWEEN nvl(msi.start_date_active, SYSDATE) AND nvl(msi.end_date_active, SYSDATE)

Line 412: mtl_system_items_b msi

408: acc.user_id,
409: msi.inventory_item_id,
410: msi.organization_id
411: FROM csm_system_items_acc acc,
412: mtl_system_items_b msi
413: WHERE acc.inventory_item_id = msi.inventory_item_id
414: AND acc.organization_id = msi.organization_id
415: AND msi.last_update_date >= p_last_run_date
416: ;

Line 426: mtl_system_items_tl msi_tl

422: msi_tl.inventory_item_id,
423: msi_tl.organization_id
424: FROM csm_system_items_acc acc,
425: asg_user au,
426: mtl_system_items_tl msi_tl
427: WHERE acc.user_id = au.user_id
428: AND acc.inventory_item_id = msi_tl.inventory_item_id
429: AND acc.organization_id = msi_tl.organization_id
430: AND au.LANGUAGE = msi_tl.LANGUAGE

Line 443: FROM mtl_system_items_b msi,

439: acc.organization_id
440: FROM csm_system_items_acc acc
441: WHERE NOT EXISTS
442: (SELECT 1
443: FROM mtl_system_items_b msi,
444: CS_BILLING_TYPE_CATEGORIES cbtc
445: WHERE msi.inventory_item_id = acc.inventory_item_id
446: AND msi.organization_id = acc.organization_id
447: AND msi.material_billable_flag = cbtc.billing_type

Line 517: /* This portion of code assumes indexes on last_update_date on MTL_SYSTEM_ITEMS_B */

513: IF l_org_id.COUNT > 0 THEN
514: l_org_id.DELETE;
515: END IF;
516:
517: /* This portion of code assumes indexes on last_update_date on MTL_SYSTEM_ITEMS_B */
518: /* , MTL_SYSTEM_ITEMS_TL which were custom created */
519:
520: -- get max last_upd_date from msi
521: OPEN c_max_last_upd_date_b;

Line 518: /* , MTL_SYSTEM_ITEMS_TL which were custom created */

514: l_org_id.DELETE;
515: END IF;
516:
517: /* This portion of code assumes indexes on last_update_date on MTL_SYSTEM_ITEMS_B */
518: /* , MTL_SYSTEM_ITEMS_TL which were custom created */
519:
520: -- get max last_upd_date from msi
521: OPEN c_max_last_upd_date_b;
522: FETCH c_max_last_upd_date_b INTO l_max_last_update_date_b;

Line 774: SELECT distinct /*+ index (msi MTL_SYSTEM_ITEMS_B_U1) index (ohqmv MTL_ONHAND_QUANTITIES_N5) */ au.user_id

770:
771: -- get the onhand details for mobile subinventories that are not present
772: -- for some or all the mobile users
773: CURSOR l_onhand_insert_csr IS
774: SELECT distinct /*+ index (msi MTL_SYSTEM_ITEMS_B_U1) index (ohqmv MTL_ONHAND_QUANTITIES_N5) */ au.user_id
775: , ohqmv.INVENTORY_ITEM_ID
776: , ohqmv.ORGANIZATION_ID
777: , ohqmv.SUBINVENTORY_CODE
778: , ohqmv.LOCATOR_ID

Line 792: mtl_system_items_b msi,

788: nvl(ohqmv.LOT_NUMBER,-9999)=nvl(ohqmv2.LOT_NUMBER,-9999))
789: FROM asg_user au,
790: asg_user_pub_resps aupr,
791: mtl_onhand_quantities_detail ohqmv,
792: mtl_system_items_b msi,
793: CS_BILLING_TYPE_CATEGORIES cbtc
794: WHERE au.user_name = aupr.user_name
795: AND aupr.pub_name = 'SERVICEP'
796: AND au.user_id = au.owner_id

Line 1131: SELECT /*+ INDEX (msi MTL_SYSTEM_ITEMS_B_U1) */ CSM_SYSTEM_ITEMS_ACC_S.NEXTVAL,

1127:
1128: -- Insert cursor
1129: CURSOR l_systemitems_ins_csr(p_organization_id IN NUMBER, p_user_id IN NUMBER)
1130: IS
1131: SELECT /*+ INDEX (msi MTL_SYSTEM_ITEMS_B_U1) */ CSM_SYSTEM_ITEMS_ACC_S.NEXTVAL,
1132: au.user_id,
1133: msi.inventory_item_id,
1134: msi.organization_id
1135: FROM asg_user au,

Line 1137: mtl_system_items_b msi,

1133: msi.inventory_item_id,
1134: msi.organization_id
1135: FROM asg_user au,
1136: asg_user_pub_resps aupr,
1137: mtl_system_items_b msi,
1138: CS_BILLING_TYPE_CATEGORIES cbtc
1139: WHERE au.user_id = p_user_id
1140: AND au.user_name = aupr.user_name
1141: AND aupr.pub_name = 'SERVICEP'

Line 1189: l_organization_id mtl_system_items.organization_id%TYPE;

1185: l_acc_id_lst asg_download.access_list;
1186: l_user_id NUMBER;
1187:
1188: l_dummy BOOLEAN;
1189: l_organization_id mtl_system_items.organization_id%TYPE;
1190: l_count NUMBER;
1191:
1192: BEGIN
1193: CSM_UTIL_PKG.LOG('Entering CSM_SYSTEM_ITEM_EVENT_PKG.get_new_user_system_items ',

Line 1409: SELECT distinct /*+ index (msi MTL_SYSTEM_ITEMS_B_U1) index (ohqmv MTL_ONHAND_QUANTITIES_N5) */ au.user_id

1405: GROUP BY ohqacc.user_id, ohqmv.inventory_item_id, ohqmv.organization_id, ohqmv.subinventory_code,
1406: ohqmv.locator_id, ohqmv.revision, ohqmv.lot_number, ohqacc.quantity;
1407:
1408: CURSOR l_onhand_insert_csr IS
1409: SELECT distinct /*+ index (msi MTL_SYSTEM_ITEMS_B_U1) index (ohqmv MTL_ONHAND_QUANTITIES_N5) */ au.user_id
1410: , ohqmv.INVENTORY_ITEM_ID
1411: , ohqmv.ORGANIZATION_ID
1412: , ohqmv.SUBINVENTORY_CODE
1413: , ohqmv.LOCATOR_ID