The following lines contain the word 'select', 'insert', 'update' or 'delete':
select XDP_ORDER_HEADERS_S.NextVal into x_SDP_ORDER_ID
from dual;
insert into xdp_order_headers
(
order_id,
external_order_number,
status_code,
state,
date_received,
provisioning_date,
actual_provisioning_date,
order_type,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
)
values
(
x_sdp_order_id,
'DRC-'||TO_CHAR(x_sdp_order_id),
'IN PROGRESS',
'RUNNING',
sysdate,
sysdate,
sysdate,
'DRC',
sysdate,
FND_GLOBAL.USER_ID,
sysdate,
FND_GLOBAL.USER_ID,
FND_GLOBAL.LOGIN_ID
);
insert into xdp_order_line_items
(
line_item_id,
order_id,
line_number,
line_item_name,
provisioning_required_flag,
status_code,
state,
is_package_flag,
is_virtual_line_flag,
line_sequence,
provisioning_date,
workitem_id,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
)
values
(
XDP_ORDER_LINE_ITEMS_S.NextVal,
x_SDP_ORDER_ID,
1,
lv_wi,
'Y',
'IN PROGRESS',
'RUNNING',
'N',
'N',
0,
sysdate,
p_workitem_id,
sysdate,
FND_GLOBAL.USER_ID,
sysdate,
FND_GLOBAL.USER_ID,
FND_GLOBAL.LOGIN_ID
)
returning line_item_id into lv_line_id;
insert into XDP_ORDER_LINEITEM_DETS
(
line_item_id,
line_parameter_name,
parameter_value,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
)
values
(
lv_line_id,
p_task_parameter(lv_index).parameter_name,
p_task_parameter(lv_index).parameter_value,
sysdate,
FND_GLOBAL.USER_ID,
sysdate,
FND_GLOBAL.USER_ID,
FND_GLOBAL.LOGIN_ID
);
select 'N' into lv_done
from dual
where exists( select 'x' from
XDP_FULFILL_WORKLIST
where line_item_id = lv_line_id and
status_code = 'ERROR');
update xdp_order_headers
set status_code = 'COMPLETED',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where order_id = x_sdp_order_id;
update xdp_order_line_items
set status_code = 'COMPLETED',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where line_item_id = lv_line_id;
update xdp_order_headers
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where order_id = x_sdp_order_id;
update xdp_order_line_items
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where line_item_id = lv_line_id;
select
workitem_name, wi_type_code
into
x_workitem_name,lv_type
from
xdp_workitems wim
where
wim.workitem_id = p_workitem_id;
select
wfg.fulfillment_action_id,
wfg.provisioning_seq
from
xdp_wi_fa_mapping wfg,
XDP_FULFILL_WORKLIST fwt
where
fwt.workitem_id = wfg.workitem_id and
fwt.workitem_instance_id = p_workitem_instance_id
order by wfg.provisioning_seq;
select fa_instance_id
from xdp_fa_runtime_list
where
workitem_instance_id = p_workitem_instance_id;
select
wim.wi_type_code,
wim.fa_exec_map_proc,
fwt.order_id,
wim.workitem_name,
fwt.line_item_id
into
lv_type,
lv_proc,
lv_order_id,
lv_wi,
lv_line_item_id
from
xdp_workitems wim,
XDP_FULFILL_WORKLIST fwt
where
wim.workitem_id = fwt.workitem_id and
fwt.workitem_instance_id = p_workitem_instance_id;
UPDATE XDP_FULFILL_WORKLIST
set status_code = 'ERROR',
-- error_ref_id = lv_ref_id,
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where
workitem_instance_id = p_workitem_instance_id;
UPDATE XDP_FULFILL_WORKLIST
set status_code = 'ERROR',
-- error_ref_id = lv_ref_id,
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where
workitem_instance_id = p_workitem_instance_id;
update XDP_FULFILL_WORKLIST
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where workitem_instance_id = p_workitem_instance_id;
update XDP_FULFILL_WORKLIST
set status_code = 'COMPLETED',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where workitem_instance_id = p_workitem_instance_id;
UPDATE XDP_FULFILL_WORKLIST
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
-- ,error_ref_id = lv_ref_id
where
workitem_instance_id = p_workitem_instance_id;
select channel_name,adapter_status
from XDP_ADAPTER_REG
where adapter_status = 'IDLE' and
usage_code = 'TEST' and
fe_id = l_fe_id;
select
fe_routing_proc,
frt.workitem_instance_id,
fwt.order_id,
frt.fulfillment_action_id,
fwt.line_item_id
into
lv_proc,
lv_wi_instance_id,
lv_order_id,
lv_fa_id,
lv_line_item_id
from XDP_FULFILL_ACTIONS fan,
xdp_fa_runtime_list frt,
XDP_FULFILL_WORKLIST fwt
where
fan.fulfillment_action_id = frt.fulfillment_action_id and
fwt.workitem_instance_id = frt.workitem_instance_id and
frt.fa_instance_id = p_fa_instance_id;
UPDATE xdp_fa_runtime_list
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
-- , error_ref_id = lv_ref_id
where
fa_instance_id = p_fa_instance_id;
select fulfillment_proc
into lv_proc
from xdp_fa_fulfillment_proc ffp,
xdp_fe_sw_gen_lookup fsp
where
ffp.fulfillment_action_id = lv_fa_id and
ffp.fe_sw_gen_lookup_id = fsp.fe_sw_gen_lookup_id and
fsp.fetype_id = lv_fetype_id and
fsp.sw_generic = lv_sw_generic and
fsp.adapter_type = lv_adapter;
select channel_name
into lv_channel
from XDP_ADAPTER_REG
where channel_name = lv_channel_rec.channel_name and
adapter_status = 'IDLE' and
usage_code = 'TEST'
FOR UPDATE NOWAIT;
UPDATE xdp_fa_runtime_list
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
-- ,error_ref_id = lv_ref_id
where
fa_instance_id = p_fa_instance_id;
UPDATE xdp_fa_runtime_list
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
-- ,error_ref_id = lv_ref_id
where
fa_instance_id = p_fa_instance_id;
UPDATE xdp_fa_runtime_list
set status_code = 'COMPLETED',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
where
fa_instance_id = p_fa_instance_id;
UPDATE xdp_fa_runtime_list
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
-- ,error_ref_id = lv_ref_id
where
fa_instance_id = p_fa_instance_id;
UPDATE xdp_fa_runtime_list
set status_code = 'ERROR',
state = 'COMPLETED',
last_update_date = sysdate,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
-- ,error_ref_id = lv_ref_id
where
fa_instance_id = p_fa_instance_id;