The following lines contain the word 'select', 'insert', 'update' or 'delete':
select INSTR(value,',',1,2),INSTR(value,',',1,3)
into v_st_position,v_end_position
from v$parameter
where upper(name) = 'UTL_FILE_DIR';
select substr(value,v_st_position+1,v_w_position)
into v_log_name
from v$parameter
where upper(name) = 'UTL_FILE_DIR';
select
pull_sequence_id , organization_id , inventory_item_id ,
subinventory_name , locator_id , source_type , supplier_id,
supplier_site_id, source_organization_id, source_subinventory,
source_locator_id, wip_line_id, kanban_size, number_of_cards,
release_kanban_flag
from
MTL_KANBAN_PULL_SEQUENCES
where
kanban_plan_id = -1 AND
source_type in (1,2,3,4) AND
--release_kanban_flag = 1 AND
organization_id = X_org_id
for update of organization_id NOWAIT;
FND_MESSAGE.set_name('INV', 'INV_NO_PULLSEQ_SELECTED');
select
pull_sequence_id , organization_id , inventory_item_id ,
subinventory_name , locator_id , source_type , supplier_id,
supplier_site_id, source_organization_id, source_subinventory,
source_locator_id, wip_line_id, kanban_size, number_of_cards,
release_kanban_flag
from
MTL_KANBAN_PULL_SEQUENCES
where
pull_sequence_id = X_pull_seq_id AND
source_type in (1,2,3,4) AND
--release_kanban_flag = 1 AND
x_report_id IS NULL
OR (source_type in (1,2,3,4) AND
--release_kanban_flag = 1 AND
x_report_id IS NOT NULL and
pull_sequence_id in (select pull_sequence_id
from mtl_kanban_card_print_temp
where x_report_id = report_id))
for update of organization_id NOWAIT;
FND_MESSAGE.set_name('INV', 'INV_NO_PULLSEQ_SELECTED');
'select mkps.pull_sequence_id ,mkps.organization_id ,mkps.inventory_item_id ,' ||
' mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,' ||
' mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,' ||
' mkps.source_locator_id, mkps.wip_line_id, mkps.kanban_size, mkps.number_of_cards, ' ||
' mkps.release_kanban_flag from mtl_kanban_pull_sequences mkps '||
' WHERE '||
' mkps.organization_id = :org_id AND mkps.source_type in (1,2,3,4) AND ' ||
' nvl(mkps.subinventory_name,''9999'') = ' ||
' nvl(:subinv, nvl(mkps.subinventory_name,''9999'')) AND ' ||
' nvl(mkps.source_type,-9999) = nvl(:source_type,nvl(mkps.source_type,-9999)) AND '||
' ( :supplier_id is null or (:supplier_id is not null and ' ||
' exists ( select 1 from mtl_pull_seq_suppliers mpss ' ||
' where mpss.organization_id = mkps.organization_id ' ||
' and mpss.pull_sequence_id = mkps.pull_sequence_id ' ||
' and mpss.supplier_id = :supplier_id ' ||
' and rownum = 1 ' ||
' ) ' ||
' ) ' ||
' ) AND ' ||
' ( :supplier_site_id is null or (:supplier_site_id is not null and ' ||
' exists( select 1 from mtl_pull_seq_suppliers mpss ' ||
' where mpss.organization_id = mkps.organization_id ' ||
' and mpss.pull_sequence_id = mkps.pull_sequence_id ' ||
' and mpss.supplier_id = :supplier_id ' ||
' and mpss.supplier_site_id = :supplier_site_id ' ||
' and rownum = 1 ' ||
' ) ' ||
' ) ' ||
' ) AND ' ||
' nvl(mkps.source_organization_id,-9999) = ' ||
' nvl(:sourcing_org_id, nvl(mkps.source_organization_id,-9999)) AND ' ||
' nvl(mkps.source_subinventory, ''9999'') = ' ||
' nvl(:sourcing_subinv, nvl(mkps.source_subinventory,''9999'')) AND ' ||
' nvl(mkps.source_locator_id, -9999) = '||
' nvl(:sourcing_loc_id,nvl(mkps.source_locator_id,-9999)) AND ' ||
' nvl(mkps.wip_line_id, -9999) = '||
' nvl(:line_id,nvl(mkps.wip_line_id,-9999)) AND ' ||
' mkps.kanban_plan_id = -1 AND ' ||
--' mkps.release_kanban_flag = 1 AND ' ||
' mkps.locator_id in ( select inventory_location_id from mtl_item_locations ' ||
' where ' || p_where_loc ||
' and organization_id = :org_id) '||
' for update of mkps.organization_id NOWAIT ' ;
'select pull_sequence_id ,organization_id ,inventory_item_id ,' ||
' subinventory_name , locator_id , source_type , supplier_id,' ||
' supplier_site_id, source_organization_id, source_subinventory,' ||
' source_locator_id, wip_line_id, kanban_size, number_of_cards, ' ||
' release_kanban_flag from MTL_KANBAN_PULL_SEQUENCES where '||
' organization_id = :org_id AND source_type in (1,2,3,4) AND ' ||
' nvl(subinventory_name,''9999'') = ' ||
' nvl(:subinv, nvl(subinventory_name,''9999'')) AND ' ||
' nvl(source_type,-9999) = nvl(:source_type,nvl(source_type,-9999)) AND '||
' nvl(supplier_id,-9999) = nvl(:supplier_id,nvl(supplier_id,-9999)) AND '||
' nvl(supplier_site_id,-9999) = ' ||
' nvl(:supplier_site_id,nvl(supplier_site_id,-9999)) AND ' ||
' nvl(source_organization_id,-9999) = ' ||
' nvl(:sourcing_org_id, nvl(source_organization_id,-9999)) AND ' ||
' nvl(source_subinventory, ''9999'') = ' ||
' nvl(:sourcing_subinv, nvl(source_subinventory,''9999'')) AND ' ||
' nvl(source_locator_id, -9999) = '||
' nvl(:sourcing_loc_id,nvl(source_locator_id,-9999)) AND ' ||
' nvl(wip_line_id, -9999) = '||
' nvl(:line_id,nvl(wip_line_id,-9999)) AND ' ||
' kanban_plan_id = -1 AND ' ||
--' release_kanban_flag = 1 AND ' ||
' locator_id in ( select inventory_location_id from mtl_item_locations ' ||
' where ' || p_where_loc ||
' and organization_id = :org_id) '||
' for update of organization_id NOWAIT ';
FND_MESSAGE.set_name('INV', 'INV_NO_PULLSEQ_SELECTED');
d_sql_stmt := 'select mkps.pull_sequence_id ,mkps.organization_id ,mkps.inventory_item_id ,' ||
' mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,' ||
' mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,' ||
' mkps.source_locator_id, mkps.wip_line_id, mkps.kanban_size, mkps.number_of_cards, ' ||
' mkps.release_kanban_flag from mtl_kanban_pull_sequences mkps '||
' WHERE '||
' mkps.organization_id = :org_id AND mkps.source_type in (1,2,3,4) AND ' ||
' nvl(mkps.subinventory_name,''9999'') = ' ||
' nvl(:subinv, nvl(mkps.subinventory_name,''9999'')) AND ' ||
' nvl(mkps.source_type,-9999) = nvl(:source_type,nvl(mkps.source_type,-9999)) AND '||
' ( :supplier_id is null or (:supplier_id is not null and ' ||
' exists ( select 1 from mtl_pull_seq_suppliers mpss ' ||
' where mpss.organization_id = mkps.organization_id ' ||
' and mpss.pull_sequence_id = mkps.pull_sequence_id ' ||
' and mpss.supplier_id = :supplier_id ' ||
' and rownum = 1 ' ||
' ) ' ||
' ) ' ||
' ) AND ' ||
' ( :supplier_site_id is null or (:supplier_site_id is not null and ' ||
' exists( select 1 from mtl_pull_seq_suppliers mpss ' ||
' where mpss.organization_id = mkps.organization_id ' ||
' and mpss.pull_sequence_id = mkps.pull_sequence_id ' ||
' and mpss.supplier_id = :supplier_id ' ||
' and mpss.supplier_site_id = :supplier_site_id ' ||
' and rownum = 1 ' ||
' ) ' ||
' ) ' ||
' ) AND ' ||
' nvl(mkps.source_organization_id,-9999) = ' ||
' nvl(:sourcing_org_id, nvl(mkps.source_organization_id,-9999)) AND ' ||
' nvl(mkps.source_subinventory, ''9999'') = ' ||
' nvl(:sourcing_subinv, nvl(mkps.source_subinventory,''9999'')) AND ' ||
' nvl(mkps.source_locator_id, -9999) = '||
' nvl(:sourcing_loc_id,nvl(mkps.source_locator_id,-9999)) AND ' ||
' nvl(mkps.wip_line_id, -9999) = '||
' nvl(:line_id,nvl(mkps.wip_line_id,-9999)) AND ' ||
'mkps.locator_id in ( select inventory_location_id from mtl_item_locations ' ||
'where ' || p_where_loc ||
' and organization_id = :org_id) AND ' ||
'kanban_plan_id = -1';
'mkps.inventory_item_id in ( select inventory_item_id from mtl_system_items ' ||
'where ' || p_where_itm || ' and organization_id = :org_id) ' ||
' for update of mkps.organization_id NOWAIT ';
'select pull_sequence_id ,organization_id ,inventory_item_id ,' ||
' subinventory_name , locator_id , source_type , supplier_id,' ||
' supplier_site_id, source_organization_id, source_subinventory,' ||
' source_locator_id, wip_line_id, kanban_size, number_of_cards, ' ||
' release_kanban_flag from MTL_KANBAN_PULL_SEQUENCES where '||
' organization_id = :org_id AND source_type in (1,2,3,4) AND ' ||
'nvl(subinventory_name,''9999'') = ' ||
'nvl(:subinv, nvl(subinventory_name,''9999'')) AND ' ||
'nvl(source_type,-9999) = nvl(:source_type, nvl(source_type,-9999)) AND '||
'nvl(supplier_id,-9999) = nvl(:supplier_id,nvl(supplier_id, -9999)) AND '||
'nvl(supplier_site_id,-9999) = ' ||
'nvl(:supplier_site_id,nvl(supplier_site_id,-9999)) AND ' ||
'nvl(source_organization_id,-9999) = ' ||
'nvl(:sourcing_org_id, nvl(source_organization_id,-9999)) AND ' ||
'nvl(source_subinventory, ''9999'') = ' ||
'nvl(:sourcing_subinv, nvl(source_subinventory,''9999'')) AND ' ||
'nvl(source_locator_id, -9999) = '||
'nvl(:sourcing_loc_id,nvl(source_locator_id,-9999)) AND ' ||
'nvl(wip_line_id, -9999) = '||
'nvl(:line_id,nvl(wip_line_id,-9999)) AND ' ||
'locator_id in ( select inventory_location_id from mtl_item_locations ' ||
'where ' || p_where_loc ||
' and organization_id = :org_id) AND ' ||
'kanban_plan_id = -1';
'inventory_item_id in ( select inventory_item_id from mtl_system_items ' ||
'where ' || p_where_itm || ' and organization_id = :org_id) ' ||
' for update of organization_id NOWAIT ';
FND_MESSAGE.set_name('INV', 'INV_NO_PULLSEQ_SELECTED');
select
pull_sequence_id , organization_id , inventory_item_id ,
subinventory_name , locator_id , source_type , supplier_id,
supplier_site_id, source_organization_id, source_subinventory,
source_locator_id, wip_line_id, kanban_size, number_of_cards ,
release_kanban_flag
from
MTL_KANBAN_PULL_SEQUENCES
where
organization_id = X_org_id AND
nvl(subinventory_name,'9999') =
nvl(X_subinv, nvl(subinventory_name,'9999')) AND
nvl(source_type,-9999) = nvl(X_source_type, nvl(source_type,-9999)) AND
nvl(supplier_id,-9999) = nvl(X_supplier_id,nvl(supplier_id, -9999)) AND
nvl(supplier_site_id,-9999) =
nvl(X_supplier_site_id,nvl(supplier_site_id,-9999)) AND
nvl(source_organization_id,-9999) =
nvl(X_sourcing_org_id, nvl(source_organization_id,-9999)) AND
nvl(source_subinventory, '9999') =
nvl(X_sourcing_subinv, nvl(source_subinventory,'9999')) AND
nvl(source_locator_id, -9999) =
nvl(X_sourcing_loc_id,nvl(source_locator_id,-9999)) AND
nvl(wip_line_id, -9999) =
nvl(X_wip_line_id,nvl(wip_line_id,-9999)) AND
kanban_plan_id = -1 AND
source_type in (1,2,3,4)
--AND release_kanban_flag = 1
for update of organization_id NOWAIT;
select
mkps.pull_sequence_id , mkps.organization_id , mkps.inventory_item_id ,
mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,
mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,
mkps.source_locator_id, mkps.wip_line_id, mkps.kanban_size, mkps.number_of_cards ,
mkps.release_kanban_flag
from
MTL_KANBAN_PULL_SEQUENCES mkps
where mkps.organization_id = X_org_id AND
nvl(mkps.subinventory_name,'9999') = nvl(X_subinv, nvl(mkps.subinventory_name,'9999')) AND
nvl(mkps.source_type,-9999) = nvl(X_source_type, nvl(mkps.source_type,-9999)) AND
( X_supplier_id is null or (X_supplier_id is not null and
exists ( select 1 from mtl_pull_seq_suppliers mpss
where mpss.organization_id = mkps.organization_id
and mpss.pull_sequence_id = mkps.pull_sequence_id
and mpss.supplier_id = X_supplier_id
and rownum = 1
)
)
) AND
( X_supplier_site_id is null or (X_supplier_site_id is not null and
exists( select 1 from mtl_pull_seq_suppliers mpss
where mpss.organization_id = mkps.organization_id
and mpss.pull_sequence_id = mkps.pull_sequence_id
and mpss.supplier_id = X_supplier_id
and mpss.supplier_site_id = X_supplier_site_id
and rownum = 1
)
)
) AND
nvl(mkps.source_organization_id,-9999) = nvl(X_sourcing_org_id, nvl(mkps.source_organization_id,-9999)) AND
nvl(mkps.source_subinventory, '9999') = nvl(X_sourcing_subinv, nvl(mkps.source_subinventory,'9999')) AND
nvl(mkps.source_locator_id, -9999) = nvl(X_sourcing_loc_id,nvl(mkps.source_locator_id,-9999)) AND
nvl(mkps.wip_line_id, -9999) = nvl(X_wip_line_id,nvl(mkps.wip_line_id,-9999)) AND
mkps.kanban_plan_id = -1 AND
mkps.source_type in (1,2,3,4)
--AND release_kanban_flag = 1
for update of mkps.organization_id NOWAIT;
FND_MESSAGE.set_name('INV', 'INV_NO_PULLSEQ_SELECTED');
d_sql_stmt := 'select mkps.pull_sequence_id ,mkps.organization_id ,mkps.inventory_item_id ,' ||
' mkps.subinventory_name , mkps.locator_id , mkps.source_type , mkps.supplier_id,' ||
' mkps.supplier_site_id, mkps.source_organization_id, mkps.source_subinventory,' ||
' mkps.source_locator_id, mkps.wip_line_id, mkps.kanban_size, mkps.number_of_cards, ' ||
' mkps.release_kanban_flag from mtl_kanban_pull_sequences mkps '||
' WHERE '||
' mkps.organization_id = :org_id AND mkps.source_type in (1,2,3,4) AND ' ||
' nvl(mkps.subinventory_name,''9999'') = ' ||
' nvl(:subinv, nvl(mkps.subinventory_name,''9999'')) AND ' ||
' nvl(mkps.source_type,-9999) = nvl(:source_type,nvl(mkps.source_type,-9999)) AND '||
' ( :supplier_id is null or (:supplier_id is not null and ' ||
' exists ( select 1 from mtl_pull_seq_suppliers mpss ' ||
' where mpss.organization_id = mkps.organization_id ' ||
' and mpss.pull_sequence_id = mkps.pull_sequence_id ' ||
' and mpss.supplier_id = :supplier_id ' ||
' and rownum = 1 ' ||
' ) ' ||
' ) ' ||
' ) AND ' ||
' ( :supplier_site_id is null or (:supplier_site_id is not null and ' ||
' exists( select 1 from mtl_pull_seq_suppliers mpss ' ||
' where mpss.organization_id = mkps.organization_id ' ||
' and mpss.pull_sequence_id = mkps.pull_sequence_id ' ||
' and mpss.supplier_id = :supplier_id ' ||
' and mpss.supplier_site_id = :supplier_site_id ' ||
' and rownum = 1 ' ||
' ) ' ||
' ) ' ||
' ) AND ' ||
' nvl(mkps.source_organization_id,-9999) = ' ||
' nvl(:sourcing_org_id, nvl(mkps.source_organization_id,-9999)) AND ' ||
' nvl(mkps.source_subinventory, ''9999'') = ' ||
' nvl(:sourcing_subinv, nvl(mkps.source_subinventory,''9999'')) AND ' ||
' nvl(mkps.source_locator_id, -9999) = '||
' nvl(:sourcing_loc_id,nvl(mkps.source_locator_id,-9999)) AND ' ||
' nvl(mkps.wip_line_id, -9999) = '||
' nvl(:line_id,nvl(mkps.wip_line_id,-9999)) AND ' ||
' mkps.kanban_plan_id = -1 AND ' ||
--' release_kanban_flag = 1 AND ' ||
' mkps.inventory_item_id in ( select inventory_item_id from mtl_system_items '||
' where ' || p_where || ' and organization_id = :org_id) ' ||
' for update of mkps.organization_id NOWAIT ';
'select pull_sequence_id ,organization_id ,inventory_item_id ,' ||
' subinventory_name , locator_id , source_type , supplier_id,' ||
' supplier_site_id, source_organization_id, source_subinventory,' ||
' source_locator_id, wip_line_id, kanban_size, number_of_cards, ' ||
' release_kanban_flag from MTL_KANBAN_PULL_SEQUENCES where '||
' organization_id = :org_id AND source_type in (1,2,3,4) AND ' ||
' nvl(subinventory_name,''9999'') = ' ||
' nvl(:subinv, nvl(subinventory_name,''9999'')) AND ' ||
' nvl(source_type,-9999) = nvl(:source_type,nvl(source_type,-9999)) AND '||
' nvl(supplier_id,-9999) = nvl(:supplier_id,nvl(supplier_id,-9999)) AND '||
' nvl(supplier_site_id,-9999) = ' ||
' nvl(:supplier_site_id,nvl(supplier_site_id,-9999)) AND ' ||
' nvl(source_organization_id,-9999) = ' ||
' nvl(:sourcing_org_id, nvl(source_organization_id,-9999)) AND ' ||
' nvl(source_subinventory, ''9999'') = ' ||
' nvl(:sourcing_subinv, nvl(source_subinventory,''9999'')) AND ' ||
' nvl(source_locator_id, -9999) = '||
' nvl(:sourcing_loc_id,nvl(source_locator_id,-9999)) AND ' ||
'nvl(wip_line_id, -9999) = '||
'nvl(:line_id,nvl(wip_line_id,-9999)) AND ' ||
' kanban_plan_id = -1 AND ' ||
--' release_kanban_flag = 1 AND ' ||
' inventory_item_id in ( select inventory_item_id from mtl_system_items '||
' where ' || p_where || ' and organization_id = :org_id) ' ||
' for update of organization_id NOWAIT ';
FND_MESSAGE.set_name('INV', 'INV_NO_PULLSEQ_SELECTED');
to insert record into mtl_kanban_card_activity*/
l_kanban_card_rec INV_Kanban_PVT.Kanban_Card_Rec_Type;
Cursor get_cards_to_update(p_pull_sequence_id NUMBER)
Is
SELECT kanban_card_id
FROM MTL_KANBAN_CARDS
WHERE card_status =INV_Kanban_PVT.G_Card_Status_Planned
AND pull_sequence_id = p_pull_sequence_id;
SELECT number_of_cards
, kanban_size
, future_no_of_cards
, future_card_size
, planning_effectivity
INTO l_number_of_cards
, l_kanban_size
, l_future_no_of_cards
, l_future_card_size
, l_planning_effectivity
FROM mtl_kanban_pull_sequences mkps
WHERE pull_sequence_id = X_pull_sequence_id;
UPDATE mtl_kanban_pull_sequences SET
number_of_cards=nvl(l_future_no_of_cards,number_of_cards)
,kanban_size=nvl(l_future_card_size,kanban_size)
,future_no_of_cards=null
,future_card_size=null
,planning_effectivity =null
,last_update_date = sysdate
,last_updated_by = fnd_global.user_id
WHERE pull_sequence_id = X_pull_sequence_id;
SELECT COUNT(*)
INTO l_no_of_existing_cards
FROM MTL_KANBAN_CARDS
WHERE pull_sequence_id = X_Pull_sequence_id
AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
card_status = INV_Kanban_PVT.G_Card_Status_Hold)
AND max_replenishments is null
AND disable_date is null
AND kanban_card_type = INV_Kanban_Pvt.g_card_type_replenishable;
v_kanban_card.delete;
UPDATE MTL_KANBAN_CARDS SET
card_status=INV_Kanban_PVT.G_Card_Status_Active,
last_update_date = sysdate,
last_updated_by = fnd_global.user_id
WHERE card_status =INV_Kanban_PVT.G_Card_Status_Planned
AND pull_sequence_id = X_pull_sequence_id
AND (max_replenishments is not null or
disable_date is not null or
kanban_card_type <> INV_Kanban_Pvt.g_card_type_replenishable)
returning kanban_card_id bulk collect into v_kanban_card;
INV_KanbanCard_PKG.Insert_Activity_For_Card(l_Kanban_Card_Rec);
v_kanban_card.delete;
UPDATE MTL_KANBAN_CARDS SET
card_status=INV_Kanban_PVT.G_Card_Status_Active,
last_update_date = sysdate,
last_updated_by = fnd_global.user_id
WHERE card_status =INV_Kanban_PVT.G_Card_Status_Planned
AND pull_sequence_id = X_pull_sequence_id
AND max_replenishments is null
AND disable_date is null
AND kanban_card_type = INV_Kanban_Pvt.g_card_type_replenishable
AND rownum <= (nvl(l_number_of_cards,0)- l_no_of_existing_cards )
returning kanban_card_id bulk collect into v_kanban_card;
INV_KanbanCard_PKG.Insert_Activity_For_Card(l_Kanban_Card_Rec);
SELECT COUNT(*)
INTO l_no_of_existing_cards
FROM MTL_KANBAN_CARDS
WHERE pull_sequence_id = X_Pull_sequence_id
AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
card_status = INV_Kanban_PVT.G_Card_Status_Hold)
/*Added these 2 where clauses by javakat to fix 11829018*/
AND max_replenishments is null
AND disable_date is null
AND kanban_card_type = INV_Kanban_Pvt.g_card_type_replenishable;
select MTL_KANBAN_CARD_PRINT_TEMP_S.nextval
into l_report_id from DUAL;
insert into MTL_KANBAN_CARD_PRINT_TEMP
(REPORT_ID,KANBAN_CARD_ID)
values ( x_report_id, l_kanban_card_Ids(l_card_count) );
Select concatenated_segments
into l_loc_name
from mtl_item_locations_kfv
where inventory_location_id = X_loc_id and
organization_id = X_org_id;
Select concatenated_segments
into l_item_name
from mtl_system_items_kfv
where inventory_item_id = X_item_id and
organization_id = X_org_id;
Select organization_code
into l_org_code
from mtl_parameters
where ORGANIZATION_ID = X_org_id;
select a.application_column_name, b.format_type
from FND_ID_FLEX_SEGMENTS_VL a, FND_FLEX_VALUE_SETS b
where a.application_id = 401 and
a.id_flex_code = 'MTLL' and
a.id_flex_num = v_struct_num and
a.enabled_flag = 'Y' and
a.display_flag = 'Y' and
a.flex_value_set_id = b.flex_value_set_id
order by a.segment_num;
Select id_flex_num into v_flex_num
from fnd_id_flex_structures
where id_flex_code = 'MTLL';
Select project_reference_enabled into v_proj_ref_enabled
from MTL_PARAMETERS
where organization_id = X_org_id;
'(select project_id from mtl_project_v where '||
'project_name >= nvl('||comma||seg_low(v_cnt)||comma||
', project_name) '|| 'and project_name <= nvl('||
comma||seg_high(v_cnt)||comma||', project_name))';
'(select task_id from mtl_task_v where '||
'project_id = nvl(to_number(SEGMENT19),project_id) and '||
'project_name >= nvl('||comma||seg_low(v_cnt)||comma||
', project_name) '||
'and project_name <= nvl('||comma||seg_high(v_cnt)||comma||
',project_name))';
select a.application_column_name, b.format_type
from FND_ID_FLEX_SEGMENTS_VL a, FND_FLEX_VALUE_SETS b
where a.application_id = 401 and
a.id_flex_code = 'MSTK' and
a.id_flex_num = v_struct_num and
a.enabled_flag = 'Y' and
a.display_flag = 'Y' and
a.flex_value_set_id = b.flex_value_set_id
order by a.segment_num;
Select id_flex_num into v_flex_num
from fnd_id_flex_structures
where id_flex_code = 'MSTK';
SELECT LOWER(FL.iso_language),ISO_TERRITORY
INTO l_language,l_territory
FROM NLS_SESSION_PARAMETERS NSP
,fnd_languages FL
WHERE NSP.parameter = 'NLS_LANGUAGE'
AND NSP.value = FL.nls_language;
delete from MTL_KANBAN_CARD_PRINT_TEMP
where
report_id = X_REPORT_ID;
select a.application_column_name
from FND_ID_FLEX_SEGMENTS_VL a
where a.application_id = 401 and
a.id_flex_code = flex_code and
a.id_flex_num = (select id_flex_num
from fnd_id_flex_structures
where id_flex_code = flex_code) and
a.enabled_flag = 'Y' and
a.display_flag = 'Y'
order by a.segment_num;
Select id_flex_num into v_flex_num
from fnd_id_flex_structures
where id_flex_code = 'MTLL';
Select project_reference_enabled into v_proj_ref_enabled
from MTL_PARAMETERS
where organization_id = X_org_id;
select distinct project_name into v_proj_name
from mtl_project_v where
project_id = ( select nvl(to_number(SEGMENT19), 0)
from mtl_item_locations
where inventory_location_id = X_loc_id and
organization_id = X_org_id );
select distinct A.task_name into v_task_name
from mtl_task_v A where
A.task_id = (select nvl(to_number(SEGMENT20), 0)
from mtl_item_locations
where inventory_location_id = X_loc_id and
organization_id = X_org_id ) AND
A.project_id = (select nvl(to_number(SEGMENT19), A.project_id)
from mtl_item_locations
where inventory_location_id = X_loc_id and
organization_id = X_org_id );
v_parse_str := 'select '||v_loc_str||
' from mtl_item_locations where inventory_location_id = :loc_id '||
' and organization_id = :org_id';
Select concatenated_segments,organization_code,
subinventory_name,locator_id,pull.organization_id
into x_item_name,x_org_code,x_subinventory,l_locator_id,
l_organization_id
from mtl_system_items_kfv a , mtl_parameters b,
mtl_kanban_pull_sequences pull
where a.inventory_item_id = pull.inventory_item_id
and a.organization_id = Pull.organization_id
and b.organization_id = Pull.organization_id
and pull.pull_sequence_id = p_Pull_sequence_id;
Select concatenated_segments
into x_loc_name
from mtl_item_locations_kfv
where inventory_location_id = l_locator_id
and organization_id = l_organization_id;
select nvl(planning_effectivity,trunc(sysdate)),future_card_size,kanban_size,number_of_cards,future_no_of_cards
into l_plan_eff_date,l_future_size,l_size,l_num_card,l_future_num_card
from mtl_kanban_pull_sequences where pull_sequence_id = p_Pull_sequence_id;