DBA Data[Home] [Help]

APPS.AHL_UMP_PROCESSUNIT_PVT dependencies on AHL_UNIT_CONFIG_HEADERS

Line 1443: FROM ahl_unit_config_headers

1439: -- To get unit config id.
1440: CURSOR ahl_unit_config_header_csr (p_item_instance_id IN NUMBER) IS
1441: SELECT name, active_start_date, active_end_date, master_config_id, unit_config_header_id,
1442: unit_config_status_code
1443: FROM ahl_unit_config_headers
1444: WHERE csi_item_instance_id = p_item_instance_id
1445: --AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate) AND
1446: -- trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
1447: AND parent_uc_header_id IS NULL;

Line 1449: l_name ahl_unit_config_headers.name%TYPE;

1445: --AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate) AND
1446: -- trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
1447: AND parent_uc_header_id IS NULL;
1448:
1449: l_name ahl_unit_config_headers.name%TYPE;
1450: l_active_start_date DATE;
1451: l_active_end_date DATE;
1452: l_master_config_id NUMBER;
1453: l_unit_config_header_id NUMBER;

Line 11136: FROM ahl_unit_config_headers

11132:
11133: -- get all valid uc headers
11134: CURSOR ahl_unit_config_header_csr IS
11135: SELECT csi_item_instance_id
11136: FROM ahl_unit_config_headers
11137: WHERE trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11138: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11139: AND unit_config_status_code <> 'DRAFT'
11140: AND parent_uc_header_id IS NULL;

Line 11145: FROM ahl_unit_config_headers uc

11141:
11142: -- get all valid uc headers that match item category.
11143: CURSOR ahl_unit_itemcat_csr(p_mtl_category_id IN NUMBER) IS
11144: SELECT csi_item_instance_id
11145: FROM ahl_unit_config_headers uc
11146: WHERE trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11147: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11148: AND unit_config_status_code <> 'DRAFT'
11149: AND parent_uc_header_id IS NULL

Line 11208: WHERE /*(p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers

11204: AND trunc(nvl(cii.active_start_date, sysdate)) <= trunc(sysdate)
11205: AND trunc(sysdate) < trunc(nvl(cii.active_end_date, sysdate+1))
11206: )
11207: ) valid_inst
11208: WHERE /*(p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers
11209: where csi_item_instance_id = valid_inst.instance_id
11210: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11211: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11212: AND unit_config_status_code <> 'DRAFT'

Line 11218: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers

11214: ) -- get UCs only.
11215: )
11216: OR */ -- this cursor is not used when p_opt_uc = 1
11217: -- get components.
11218: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers
11219: where csi_item_instance_id = valid_inst.instance_id
11220: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11221: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11222: -- instance is a UC if in status draft.

Line 11229: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers

11225: )
11226: )
11227: OR
11228: -- get all but ignore UCs as they have alredy been selected.
11229: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers
11230: where csi_item_instance_id = valid_inst.instance_id
11231: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11232: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11233: -- instance is a UC if in status draft.

Line 11290: AND ((p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers

11286: AND itc.organization_id = cii2.inv_master_organization_id
11287: AND itc.inventory_item_id = cii2.inventory_item_id
11288: ) -- get root nodes matching item category.
11289:
11290: AND ((p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers
11291: where csi_item_instance_id = valid_inst.instance_id
11292: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11293: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11294: AND unit_config_status_code <> 'DRAFT'

Line 11300: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers

11296: ) -- get UCs only.
11297: )
11298: OR
11299: -- get components.
11300: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers
11301: where csi_item_instance_id = valid_inst.instance_id
11302: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11303: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11304: -- instance is a UC if in status draft.

Line 11312: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers

11308: )
11309: OR
11310: -- when process option is ALL.
11311: -- get components in this case too as UC's have already been selected.
11312: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers
11313: where csi_item_instance_id = valid_inst.instance_id
11314: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11315: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11316: -- instance is a UC if in status draft.

Line 11832: WHERE (p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers

11828: trunc(sysdate) < trunc(nvl(cii.active_end_date, sysdate+1))
11829: AND mr.item_instance_id = cii.instance_id
11830: )
11831: ) valid_inst
11832: WHERE (p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers
11833: where csi_item_instance_id = valid_inst.instance_id
11834: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11835: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11836: AND unit_config_status_code <> 'DRAFT'

Line 11842: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers

11838: ) -- get UCs only.
11839: )
11840: OR
11841: -- get components.
11842: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers
11843: where csi_item_instance_id = valid_inst.instance_id
11844: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11845: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11846: -- instance is a UC if in status draft.

Line 11853: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers

11849: )
11850: )
11851: OR
11852: -- get all but do not select draft UCs as Process Unit will raise error.
11853: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers
11854: where csi_item_instance_id = valid_inst.instance_id
11855: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11856: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11857: AND unit_config_status_code = 'DRAFT'

Line 11904: AND ((p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers

11900: AND itc.organization_id = cii2.inv_master_organization_id
11901: AND itc.inventory_item_id = cii2.inventory_item_id
11902: ) -- get root nodes matching item category.
11903: -- either UC or components.
11904: AND ((p_opt_uc = 1 AND exists (select 'x' from ahl_unit_config_headers
11905: where csi_item_instance_id = valid_inst.instance_id
11906: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11907: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11908: AND unit_config_status_code <> 'DRAFT'

Line 11914: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers

11910: ) -- get UCs only.
11911: )
11912: OR
11913: -- get components.
11914: (p_opt_uc = 2 AND not exists (select 'x' from ahl_unit_config_headers
11915: where csi_item_instance_id = valid_inst.instance_id
11916: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11917: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11918: -- instance is a UC if in status draft.

Line 11925: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers

11921: )
11922: )
11923: OR
11924: -- when process option is ALL. Ignore Draft UC's
11925: (p_opt_uc = 0 AND not exists (select 'x' from ahl_unit_config_headers
11926: where csi_item_instance_id = valid_inst.instance_id
11927: AND trunc(nvl(active_start_date,sysdate)) <= trunc(sysdate)
11928: AND trunc(sysdate) < trunc(nvl(active_end_date,sysdate+1))
11929: AND unit_config_status_code = 'DRAFT'