296: PROCEDURE validate_adt_item
297: (
298: x_return_status OUT NOCOPY VARCHAR2,
299: x_msg_data OUT NOCOPY VARCHAR2,
300: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
301: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
302: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
303: )
304: IS
297: (
298: x_return_status OUT NOCOPY VARCHAR2,
299: x_msg_data OUT NOCOPY VARCHAR2,
300: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
301: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
302: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
303: )
304: IS
305:
298: x_return_status OUT NOCOPY VARCHAR2,
299: x_msg_data OUT NOCOPY VARCHAR2,
300: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
301: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
302: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
303: )
304: IS
305:
306: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
302: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
303: )
304: IS
305:
306: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
307: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
308: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
309:
310: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
303: )
304: IS
305:
306: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
307: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
308: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
309:
310: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
311: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
304: IS
305:
306: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
307: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
308: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
309:
310: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
311: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
312: IS
306: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
307: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
308: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
309:
310: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
311: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
312: IS
313: --AMSRINIV. Bug 4913429. Doing away with the use of 'upper' to tune below query.
314: SELECT
307: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
308: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
309:
310: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
311: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
312: IS
313: --AMSRINIV. Bug 4913429. Doing away with the use of 'upper' to tune below query.
314: SELECT
315: mtl.INVENTORY_ITEM_ID ,
326: /*
327: SELECT DISTINCT MI.inventory_item_id,
328: MI.organization_id,
329: NVL(MI.inventory_item_flag,'X')
330: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
331: WHERE MP.organization_id = MI.organization_id
332: AND MI.concatenated_segments = c_item_number
333: AND MI.organization_id = c_inventory_org_id
334: AND MI.enabled_flag = 'Y'
340: mtl.INVENTORY_ITEM_ID ,
341: mtl.organization_id ,
342: NVL(mtl.inventory_item_flag,'X')
343: from
344: MTL_SYSTEM_ITEMS_KFV MTL
345: , fnd_lookup_values_vl IT
346: , MTL_PARAMETERS MP
347: where
348: DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',mp.eam_enabled_flag )='Y'
356: and upper(mtl.concatenated_segments) like upper(c_item_number)
357: and mtl.organization_id = c_inventory_org_id
358: order by 1;
359: */
360: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
361: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
362: IS
363: SELECT
364: mtl.INVENTORY_ITEM_ID ,
357: and mtl.organization_id = c_inventory_org_id
358: order by 1;
359: */
360: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
361: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
362: IS
363: SELECT
364: mtl.INVENTORY_ITEM_ID ,
365: mtl.organization_id ,
374: /*
375: SELECT DISTINCT MI.inventory_item_id,
376: MI.organization_id,
377: NVL(MI.inventory_item_flag,'X')
378: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
379: WHERE DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',MP.eam_enabled_flag )='Y'
380: AND MP.organization_id = MI.organization_id
381: AND MI.inventory_item_id = c_inventory_item_id
382: AND MI.organization_id = c_inventory_org_id
387: SELECT DISTINCT
388: mtl.INVENTORY_ITEM_ID ,
389: mtl.organization_id ,
390: NVL(mtl.inventory_item_flag,'X')
391: from MTL_SYSTEM_ITEMS_KFV MTL
392: , MTL_PARAMETERS MP
393: , fnd_lookup_values_vl IT
394: where
395: DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',mp.eam_enabled_flag )='Y'
499: PROCEDURE validate_item
500: (
501: x_return_status OUT NOCOPY VARCHAR2,
502: x_msg_data OUT NOCOPY VARCHAR2,
503: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
504: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
505: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
506: )
507: IS
500: (
501: x_return_status OUT NOCOPY VARCHAR2,
502: x_msg_data OUT NOCOPY VARCHAR2,
503: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
504: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
505: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
506: )
507: IS
508:
501: x_return_status OUT NOCOPY VARCHAR2,
502: x_msg_data OUT NOCOPY VARCHAR2,
503: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
504: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
505: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
506: )
507: IS
508:
509: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
505: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
506: )
507: IS
508:
509: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
510: l_wip_supply_type MTL_SYSTEM_ITEMS.wip_supply_type%TYPE;
511: l_stock_enabled_flag MTL_SYSTEM_ITEMS.stock_enabled_flag%TYPE;
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
506: )
507: IS
508:
509: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
510: l_wip_supply_type MTL_SYSTEM_ITEMS.wip_supply_type%TYPE;
511: l_stock_enabled_flag MTL_SYSTEM_ITEMS.stock_enabled_flag%TYPE;
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
507: IS
508:
509: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
510: l_wip_supply_type MTL_SYSTEM_ITEMS.wip_supply_type%TYPE;
511: l_stock_enabled_flag MTL_SYSTEM_ITEMS.stock_enabled_flag%TYPE;
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
515:
508:
509: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
510: l_wip_supply_type MTL_SYSTEM_ITEMS.wip_supply_type%TYPE;
511: l_stock_enabled_flag MTL_SYSTEM_ITEMS.stock_enabled_flag%TYPE;
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
515:
516: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
509: l_inventory_item_flag MTL_SYSTEM_ITEMS.inventory_item_flag%TYPE;
510: l_wip_supply_type MTL_SYSTEM_ITEMS.wip_supply_type%TYPE;
511: l_stock_enabled_flag MTL_SYSTEM_ITEMS.stock_enabled_flag%TYPE;
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
515:
516: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
517: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
510: l_wip_supply_type MTL_SYSTEM_ITEMS.wip_supply_type%TYPE;
511: l_stock_enabled_flag MTL_SYSTEM_ITEMS.stock_enabled_flag%TYPE;
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
515:
516: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
517: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
518: IS
512: l_mtl_txns_enabled_flag MTL_SYSTEM_ITEMS.mtl_transactions_enabled_flag%TYPE;
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
515:
516: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
517: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
518: IS
519: SELECT MTL.inventory_item_id,
520: MTL.organization_id,
513: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
514: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
515:
516: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE ,
517: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE)
518: IS
519: SELECT MTL.inventory_item_id,
520: MTL.organization_id,
521: MTL.inventory_item_flag,
534: NVL(MI.inventory_item_flag,'X'),
535: NVL(MI.mtl_transactions_enabled_flag,'X'),
536: NVL(MI.stock_enabled_flag,'X'),
537: NVL(MI.wip_supply_type,0)
538: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
539: WHERE DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',MP.eam_enabled_flag )='Y'
540: AND MP.master_organization_id = MI.organization_id
541: AND MI.concatenated_segments = c_item_number
542: --AND MI.organization_id = c_inventory_org_id
563: and mtl.inventory_org_id = c_inventory_org_id
564: order by 1;
565: */
566: --
567: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
568: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
569: IS
570: SELECT MTL.inventory_item_id,
571: MTL.organization_id,
564: order by 1;
565: */
566: --
567: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
568: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
569: IS
570: SELECT MTL.inventory_item_id,
571: MTL.organization_id,
572: MTL.inventory_item_flag,
585: NVL(MI.inventory_item_flag,'X'),
586: NVL(MI.mtl_transactions_enabled_flag,'X'),
587: NVL(MI.stock_enabled_flag,'X'),
588: NVL(MI.wip_supply_type,0)
589: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
590: WHERE DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',MP.eam_enabled_flag )='Y'
591: AND MP.master_organization_id = MI.organization_id
592: AND MI.inventory_item_id = c_inventory_item_id
593: --AND MI.organization_id = c_inventory_org_id
722: PROCEDURE validate_service_item
723: (
724: x_return_status OUT NOCOPY VARCHAR2,
725: x_msg_data OUT NOCOPY VARCHAR2,
726: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
727: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
728: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
729: )
730: IS
723: (
724: x_return_status OUT NOCOPY VARCHAR2,
725: x_msg_data OUT NOCOPY VARCHAR2,
726: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
727: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
728: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
729: )
730: IS
731:
724: x_return_status OUT NOCOPY VARCHAR2,
725: x_msg_data OUT NOCOPY VARCHAR2,
726: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
727: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
728: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
729: )
730: IS
731:
732: l_outside_operation_flag MTL_SYSTEM_ITEMS.outside_operation_flag%TYPE;
728: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
729: )
730: IS
731:
732: l_outside_operation_flag MTL_SYSTEM_ITEMS.outside_operation_flag%TYPE;
733: l_purchasing_enabled_flag MTL_SYSTEM_ITEMS.purchasing_enabled_flag%TYPE;
734: l_purchasing_item_flag MTL_SYSTEM_ITEMS.purchasing_item_flag%TYPE;
735: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
736: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
729: )
730: IS
731:
732: l_outside_operation_flag MTL_SYSTEM_ITEMS.outside_operation_flag%TYPE;
733: l_purchasing_enabled_flag MTL_SYSTEM_ITEMS.purchasing_enabled_flag%TYPE;
734: l_purchasing_item_flag MTL_SYSTEM_ITEMS.purchasing_item_flag%TYPE;
735: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
736: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
737:
730: IS
731:
732: l_outside_operation_flag MTL_SYSTEM_ITEMS.outside_operation_flag%TYPE;
733: l_purchasing_enabled_flag MTL_SYSTEM_ITEMS.purchasing_enabled_flag%TYPE;
734: l_purchasing_item_flag MTL_SYSTEM_ITEMS.purchasing_item_flag%TYPE;
735: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
736: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
737:
738: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE )
731:
732: l_outside_operation_flag MTL_SYSTEM_ITEMS.outside_operation_flag%TYPE;
733: l_purchasing_enabled_flag MTL_SYSTEM_ITEMS.purchasing_enabled_flag%TYPE;
734: l_purchasing_item_flag MTL_SYSTEM_ITEMS.purchasing_item_flag%TYPE;
735: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
736: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
737:
738: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE )
739: IS
732: l_outside_operation_flag MTL_SYSTEM_ITEMS.outside_operation_flag%TYPE;
733: l_purchasing_enabled_flag MTL_SYSTEM_ITEMS.purchasing_enabled_flag%TYPE;
734: l_purchasing_item_flag MTL_SYSTEM_ITEMS.purchasing_item_flag%TYPE;
735: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
736: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
737:
738: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE )
739: IS
740: SELECT DISTINCT MI.inventory_item_id,
734: l_purchasing_item_flag MTL_SYSTEM_ITEMS.purchasing_item_flag%TYPE;
735: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
736: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
737:
738: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE )
739: IS
740: SELECT DISTINCT MI.inventory_item_id,
741: MI.organization_id,
742: MI.outside_operation_flag,
741: MI.organization_id,
742: MI.outside_operation_flag,
743: MI.purchasing_item_flag,
744: MI.purchasing_enabled_flag
745: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
746: WHERE DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',MP.eam_enabled_flag )='Y'
747: AND MP.organization_id = MI.organization_id
748: AND MI.concatenated_segments = c_item_number
749: AND MI.enabled_flag = 'Y'
749: AND MI.enabled_flag = 'Y'
750: AND SYSDATE BETWEEN NVL( MI.start_date_active, SYSDATE )
751: AND NVL( MI.end_date_active, SYSDATE );
752:
753: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
754: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
755: IS
756: SELECT DISTINCT MI.inventory_item_id,
757: MI.organization_id,
750: AND SYSDATE BETWEEN NVL( MI.start_date_active, SYSDATE )
751: AND NVL( MI.end_date_active, SYSDATE );
752:
753: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
754: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
755: IS
756: SELECT DISTINCT MI.inventory_item_id,
757: MI.organization_id,
758: MI.outside_operation_flag,
757: MI.organization_id,
758: MI.outside_operation_flag,
759: MI.purchasing_item_flag,
760: MI.purchasing_enabled_flag
761: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
762: WHERE DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',MP.eam_enabled_flag )='Y'
763: AND MP.organization_id = MI.organization_id
764: AND MI.inventory_item_id = c_inventory_item_id
765: AND MI.organization_id = c_inventory_org_id
869: PROCEDURE validate_effectivity_item
870: (
871: x_return_status OUT NOCOPY VARCHAR2,
872: x_msg_data OUT NOCOPY VARCHAR2,
873: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
874: p_org_code IN MTL_PARAMETERS.ORGANIZATION_CODE%TYPE,
875: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
876: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
877: )
871: x_return_status OUT NOCOPY VARCHAR2,
872: x_msg_data OUT NOCOPY VARCHAR2,
873: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
874: p_org_code IN MTL_PARAMETERS.ORGANIZATION_CODE%TYPE,
875: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
876: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
877: )
878: IS
879:
872: x_msg_data OUT NOCOPY VARCHAR2,
873: p_item_number IN MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
874: p_org_code IN MTL_PARAMETERS.ORGANIZATION_CODE%TYPE,
875: p_x_inventory_item_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
876: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
877: )
878: IS
879:
880: l_comms_nl_trackable_flag MTL_SYSTEM_ITEMS.COMMS_NL_TRACKABLE_FLAG%TYPE;
876: p_x_inventory_org_id IN OUT NOCOPY MTL_SYSTEM_ITEMS.organization_id%TYPE
877: )
878: IS
879:
880: l_comms_nl_trackable_flag MTL_SYSTEM_ITEMS.COMMS_NL_TRACKABLE_FLAG%TYPE;
881: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
882: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
883:
884: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
877: )
878: IS
879:
880: l_comms_nl_trackable_flag MTL_SYSTEM_ITEMS.COMMS_NL_TRACKABLE_FLAG%TYPE;
881: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
882: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
883:
884: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
885: c_org_code MTL_PARAMETERS.ORGANIZATION_CODE%TYPE)
878: IS
879:
880: l_comms_nl_trackable_flag MTL_SYSTEM_ITEMS.COMMS_NL_TRACKABLE_FLAG%TYPE;
881: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
882: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
883:
884: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
885: c_org_code MTL_PARAMETERS.ORGANIZATION_CODE%TYPE)
886: IS
880: l_comms_nl_trackable_flag MTL_SYSTEM_ITEMS.COMMS_NL_TRACKABLE_FLAG%TYPE;
881: l_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
882: l_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE;
883:
884: CURSOR get_rec_from_value ( c_item_number MTL_SYSTEM_ITEMS_KFV.concatenated_segments%TYPE,
885: c_org_code MTL_PARAMETERS.ORGANIZATION_CODE%TYPE)
886: IS
887: SELECT
888: MTL.INVENTORY_ITEM_ID ,
898: /*
899: SELECT DISTINCT MI.inventory_item_id,
900: MP.master_organization_id,
901: MI.comms_nl_trackable_flag
902: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
903: WHERE MP.master_organization_id = MI.organization_id
904: AND upper(MI.concatenated_segments) = upper(c_item_number)
905: AND MI.enabled_flag = 'Y'
906: AND upper(MP.ORGANIZATION_CODE)=upper(c_org_code)
912: SELECT DISTINCT
913: mtl.INVENTORY_ITEM_ID ,
914: mtl.organization_id ,
915: mtl.comms_nl_trackable_flag
916: from MTL_SYSTEM_ITEMS_KFV MTL
917: , MTL_PARAMETERS MP
918: , MTL_PARAMETERS MP1
919: , fnd_lookup_values_vl IT
920: where
930: and upper(mp1.organization_code) like upper(c_org_code)
931: order by 1;
932: */
933:
934: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
935: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
936: IS
937: SELECT
938: mtl.INVENTORY_ITEM_ID ,
931: order by 1;
932: */
933:
934: CURSOR get_rec_from_id ( c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
935: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
936: IS
937: SELECT
938: mtl.INVENTORY_ITEM_ID ,
939: mtl.organization_id ,
948: /*
949: SELECT DISTINCT MI.inventory_item_id,
950: MP.master_organization_id,
951: MI.comms_nl_trackable_flag
952: FROM MTL_PARAMETERS MP, MTL_SYSTEM_ITEMS_KFV MI
953: WHERE MP.master_organization_id = MI.organization_id
954: AND MI.inventory_item_id = c_inventory_item_id
955: AND MI.organization_id = c_inventory_org_id
956: AND MI.enabled_flag = 'Y'
961: /*SELECT DISTINCT
962: mtl.INVENTORY_ITEM_ID ,
963: mtl.organization_id ,
964: mtl.comms_nl_trackable_flag
965: from MTL_SYSTEM_ITEMS_KFV MTL
966: , MTL_PARAMETERS MP
967: , fnd_lookup_values_vl IT
968: where
969: DECODE(AHL_UTIL_PKG.IS_PM_INSTALLED,'Y','Y',mp.eam_enabled_flag )='Y'
2036: (
2037: x_return_status OUT NOCOPY VARCHAR2,
2038: x_msg_data OUT NOCOPY VARCHAR2,
2039: p_item_group_id IN AHL_ITEM_GROUPS_VL.item_group_id%TYPE,
2040: p_inventory_item_id IN MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
2041: p_inventory_org_id IN MTL_SYSTEM_ITEMS.organization_id%TYPE,
2042: p_uom_code IN MTL_UNITS_OF_MEASURE_VL.uom_code%TYPE
2043: )
2044: IS
2037: x_return_status OUT NOCOPY VARCHAR2,
2038: x_msg_data OUT NOCOPY VARCHAR2,
2039: p_item_group_id IN AHL_ITEM_GROUPS_VL.item_group_id%TYPE,
2040: p_inventory_item_id IN MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
2041: p_inventory_org_id IN MTL_SYSTEM_ITEMS.organization_id%TYPE,
2042: p_uom_code IN MTL_UNITS_OF_MEASURE_VL.uom_code%TYPE
2043: )
2044: IS
2045:
2045:
2046: l_dummy VARCHAR2(1);
2047:
2048: CURSOR get_uom_for_item ( c_uom_code MTL_UNITS_OF_MEASURE_VL.uom_code%TYPE,
2049: c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
2050: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
2051: IS
2052: SELECT 'X'
2053: FROM AHL_ITEM_CLASS_UOM_V
2046: l_dummy VARCHAR2(1);
2047:
2048: CURSOR get_uom_for_item ( c_uom_code MTL_UNITS_OF_MEASURE_VL.uom_code%TYPE,
2049: c_inventory_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE,
2050: c_inventory_org_id MTL_SYSTEM_ITEMS.organization_id%TYPE )
2051: IS
2052: SELECT 'X'
2053: FROM AHL_ITEM_CLASS_UOM_V
2054: WHERE uom_code = c_uom_code
3714: from (select kfv.inventory_item_id,
3715: mp.master_organization_id inventory_org_id,
3716: mp.organization_code,
3717: kfv.concatenated_segments
3718: from mtl_system_items_kfv kfv,
3719: mtl_parameters mp
3720: where kfv.organization_id = mp.organization_id
3721: and exists (select 'X'
3722: from mtl_parameters mp1