The following lines contain the word 'select', 'insert', 'update' or 'delete':
g_update_object_version varchar2(30) := 'update_object_version';
cursor csr_person is select person_id from per_all_people_f where person_id = PersonId;
select trs.transaction_step_id
from hr_api_transaction_steps trs
where trs.transaction_id = hr_transaction_ss.get_transaction_id
(WfItemType ,WfItemKey )
and trs.api_name ='HR_PROCESS_PERSON_SS.PROCESS_API';
select status from hr_api_transactions hrt
where hrt.transaction_id = hr_transaction_ss.get_transaction_id(WfItemType ,WfItemKey);
/* Replaced commit_transaction with process_selected_transaction, commit transaction will
call all the steps for a given item key. However we need only person and address apis
are
*/
--ignore the emp number generation for newhire flow
hr_new_user_reg_ss.g_ignore_emp_generation := 'YES';
select 1 into l_session_c from fnd_sessions where session_id=userenv('sessionid');
insert into fnd_sessions(session_id,effective_date) values(userenv('sessionid'),l_effective_date);
process_selected_transaction
(p_item_type => WfItemType,
p_item_key => WfItemKey);
procedure process_selected_transaction
(p_item_type in varchar2
,p_item_key in varchar2
,p_ignore_warnings in varchar2 default 'Y'
,p_validate in boolean default false
,p_update_object_version in varchar2 default 'N'
,p_effective_date in varchar2 default null
,p_api_name in varchar2 default null
,p_source in varchar2 default null) is
-- --------------------------------------------------------------------------
-- declare local variables
-- --------------------------------------------------------------------------
l_transaction_id hr_api_transactions.transaction_id%type;
select trs.transaction_step_id
,trs.api_name
,trs.item_type
,trs.item_key
,trs.activity_id
,trs.creator_person_id
from hr_api_transaction_steps trs
where trs.transaction_id = l_transaction_id
and trs.api_name in ('HR_PROCESS_PERSON_SS.PROCESS_API',
'HR_PROCESS_ADDRESS_SS.PROCESS_API',
'HR_PROCESS_ASSIGNMENT_SS.PROCESS_API',
'HR_PROCESS_CONTACT_SS.PROCESS_CREATE_CONTACT_API')
order by trs.processing_order,trs.transaction_step_id;
select trs.transaction_step_id
,trs.api_name
,trs.item_type
,trs.item_key
,trs.activity_id
,trs.creator_person_id
from hr_api_transaction_steps trs
where trs.transaction_id = l_transaction_id
and trs.api_name = p_api_name
order by trs.processing_order;
if p_update_object_version = 'Y' then
-- update object version for each step
l_obj_api_name := substr(i.api_name,1, instr(i.api_name,'.'));
l_obj_api_name := l_obj_api_name || g_update_object_version;
end process_selected_transaction;
cursor csr_person is select person_id,person_type_id from per_all_people_f where person_id = l_person_id
and CURRENT_EMPLOYEE_FLAG = 'Y';
select max(object_version_number) into l_object_version_number from per_all_people_f
where person_id = l_person_id
and l_date between effective_start_date and effective_end_date; --Added the condition as a part of bug#13739532
process_selected_transaction
(p_item_type => WfItemType,
p_item_key => WfItemKey,
p_source => p_source);
select fs.id_flex_structure_code people_grp_f_struct_code
from hr_organization_information oi,
fnd_id_flex_structures fs
where oi.organization_id = bg_id
and oi.org_information_context = 'Business Group Information'
and oi.org_information5 = fs.id_flex_num(+)
and fs.id_flex_code(+) = 'GRP'
and fs.application_id(+) = 801;
select trs.transaction_step_id
from hr_api_transaction_steps trs
where trs.transaction_id = hr_transaction_ss.get_transaction_id
(WfItemType ,WfItemKey )
and trs.api_name ='HR_PROCESS_PERSON_SS.PROCESS_API';