The following lines contain the word 'select', 'insert', 'update' or 'delete':
TXN_TYPE_UPDATE NUMBER := 2;
SELECT organization_id,
inventory_item_id,
kanban_plan_id,
subinventory_name,
locator_id,
source_type,
kanban_size,
number_of_cards
from mtl_kanban_pull_sequences
where pull_sequence_id = p_pull_Sequence_Id;
elsif p_txn_type = TXN_TYPE_UPDATE then
l_event_name := 'oracle.apps.flm.ekanban.pullSeqUpdate';
SELECT MTL_BUSINESS_EVENTS_S.NEXTVAL into l_event_num FROM dual;
if( l_event_name = 'oracle.apps.flm.ekanban.pullSeqUpdate') then
wf_event.AddParameterToList(p_name=>'update_from_planning',
p_value=>p_from_planning,
p_parameterlist=>l_parameter_list);
l_parameter_list.DELETE;
/*Below procedure raise business event for kanban card creation and update
p_txn_type: 1 Creation
2 Update
*/
PROCEDURE Raise_Kanban_Card_Event(p_kanban_card_id IN NUMBER,
p_txn_type in NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
CURSOR c_kanbanCard
IS
SELECT kanban_card_id,
organization_id,
kanban_card_number,
pull_sequence_id
from mtl_kanban_cards
where kanban_card_id = p_kanban_card_id;
elsif p_txn_type = TXN_TYPE_UPDATE then
l_event_name := 'oracle.apps.flm.ekanban.kanbanCardUpdate';
SELECT MTL_BUSINESS_EVENTS_S.NEXTVAL into l_event_num FROM dual;
l_parameter_list.DELETE;
SELECT kanban_card_id,
kanban_card_number,
pull_sequence_id,
card_status,
supply_status
from mtl_kanban_cards
where kanban_card_id = p_kanban_card_id;
SELECT MTL_BUSINESS_EVENTS_S.NEXTVAL into l_event_num FROM dual;
l_parameter_list.DELETE;
select exception_id
into l_exception_id
from wip_exceptions where rownum <2;
select
wen.wip_entity_name, we.operation_seq_num, br.resource_code, msi.concatenated_segments
into
l_job_name, l_op_seq_num, l_res_name, l_comp_name
from
wip_exceptions we, wip_entities wen, bom_resources br, mtl_system_items_vl msi
where
we.organization_id = wen.organization_id and
we.wip_entity_id = wen.wip_entity_id and
we.organization_id = br.organization_id(+) and
we.resource_id = br.resource_id (+) and
we.organization_id = msi.organization_id(+) and
we.component_item_id = msi.inventory_item_id (+) and
we.exception_id = p_exception_id;
select to_char(WIP_EXP_NOTIF_WF_ITEMKEY_S.NEXTVAL)
into l_seq from sys.dual;