Update Bank Payment Method API

By | May 22, 2017

This API Updates the Bank Payment Method Detail.

 

DECLARE
ln_method_id PAY_PERSONAL_PAYMENT_METHODS_F.PERSONAL_PAYMENT_METHOD_ID%TYPE;
ln_ext_acc_id PAY_EXTERNAL_ACCOUNTS.EXTERNAL_ACCOUNT_ID%TYPE;
ln_obj_ver_num PAY_PERSONAL_PAYMENT_METHODS_F.OBJECT_VERSION_NUMBER%TYPE;
ld_eff_start_date DATE;
ld_eff_end_date DATE;
ln_comment_id NUMBER;
cursor c1 is
select pm.assignment_id,pm.object_version_number,pm.PERSONAL_PAYMENT_METHOD_ID,ac.segment2, ac.segment12,pm.effective_start_date,pm.effective_end_date
,’QNBS8′ stg_emp_Branch_code,stg.name stg_segment_12,pm.EXTERNAL_ACCOUNT_ID ,mv.employee_number pf
from PAY_PERSONAL_PAYMENT_METHODS_F pm, PAY_EXTERNAL_ACCOUNTS ac, xxlsg_emp_master_v mv,XXLSG_PERSON_UPDATE_STG stg
where 1=1

and pm.external_account_id = ac.external_account_id
and pm.assignment_id = mv.assignment_id
and mv.employee_number = stg.employee_number
–and ac.segment12 <> stg.name
and trunc(sysdate) between pm.effective_start_date and pm.effective_end_date
and rownum < 50;

BEGIN

for r in c1 loop
begin
ln_obj_ver_num :=r.object_version_number;
ln_comment_id := NULL;
ln_ext_acc_id := r.EXTERNAL_ACCOUNT_ID;
ld_eff_start_date := r.effective_start_date;
ld_eff_end_date := r.effective_end_date;
ln_method_id :=r.PERSONAL_PAYMENT_METHOD_ID;
–dbms_output.put_line(‘pf ‘||r.pf);
hr_personal_pay_method_api.update_personal_pay_method
( — Input data elements

p_effective_date => ’01-MAY-2017’,
–p_assignment_id => r.assignment_id,
p_datetrack_update_mode => ‘UPDATE’,
–p_personal_payment_method_id => r.PERSONAL_PAYMENT_METHOD_ID,
p_object_version_number => ln_obj_ver_num,
p_segment2 => ‘QNBS8’,
p_segment12 => r.stg_segment_12,
— Output data elements
— ——————————–
p_personal_payment_method_id => ln_method_id,
p_effective_start_date => ld_eff_start_date,
p_effective_end_date => ld_eff_end_date,
p_external_account_id => ln_ext_acc_id,
p_comment_id => ln_comment_id
);
dbms_output.put_line(‘pf ‘||r.pf||’ Done Successfully’);
exception when others then

dbms_output.put_line(‘pf ‘||r.pf||’ ‘||SQLERRM);
end;
end loop;

END;