Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE package body KPC_CA is
- function find_change ( t_per_id KPCPAY.EMP_INF.per_id%type,
- shift1 KPCPAY.EMP_INF.shft1%type,
- shift2 KPCPAY.EMP_INF.shft2%type,
- shift3 KPCPAY.EMP_INF.shft3%type,
- wklyoff KPCPAY.EMP_INF.wklyoff%type,
- sup_name KPCPAY.EMP_INF.emp_name%type,
- sup_token_no KPCPAY.EMP_INF.r_emp_no%type,
- loc_desc KPCPAY.EMP_INF.loc_desc%type,
- dept_name KPCPAY.EMP_INF.dept_name%type,
- sbu KPCPAY.EMP_INF.sbu_id%type,
- effective_date date
- ) return number as
- t_shift1 KPCPAY.EMP_INF.shft1%type;
- t_shift2 KPCPAY.EMP_INF.shft2%type;
- t_shift3 KPCPAY.EMP_INF.shft3%type;
- t_wklyoff KPCPAY.EMP_INF.wklyoff%type;
- t_sup_name KPCPAY.EMP_INF.emp_name%type;
- t_sup_token_no KPCPAY.EMP_INF.r_emp_no%type;
- t_location KPCPAY.EMP_INF.loc_desc%type;
- t_dept_name KPCPAY.EMP_INF.dept_name%type;
- t_sbu KPCPAY.EMP_INF.sbu_id%type;
- flag boolean := false;
- begin
- begin
- select shft1, shft2, shft3, wklyoff, loc_desc, r_emp_no,
- dept_name into t_shift1, t_shift2, t_shift3, t_wklyoff,
- t_location, t_sup_token_no, t_dept_name
- from KPCPAY.EMP_INF
- where per_id = t_per_id;
- select emp_name into t_sup_name
- from KPCPAY.EMP_INF
- where emp_no = (select r_emp_no
- from KPCPAY.EMP_INF
- where per_id = t_per_id);
- SELECT distinct(decode ( SUBSTR(ORGANIZATION_CODE, 1, 1),
- '1','CORP',
- '2','ACD',
- '3','TRM',
- '4','ACR',
- '5','RR',
- '6','RRS'
- )) "decode" into t_sbu
- from apps.org_organization_definitions
- where ORGANIZATION_ID= (select sbu_id
- from kpcpay.emp_inf
- where per_id = t_per_id);
- end;
- begin
- if t_shift1 != shift1 then
- flag := true;
- end if;
- if t_shift2 != shift2 then
- flag := true;
- end if;
- if t_shift3 != shift3 then
- flag := true;
- end if;
- if t_wklyoff != wklyoff then
- flag := true;
- end if;
- if t_sup_token_no != sup_token_no then
- flag := true;
- end if;
- if t_sup_name != sup_name then
- flag := true;
- end if;
- if t_location != loc_desc then
- flag := true;
- end if;
- if t_dept_name != dept_name then
- flag := true;
- end if;
- if t_sbu != sbu then
- flag := true;
- end if;
- end;
- if flag = true then
- return 1;
- else
- return 0;
- -- or raise_application_error
- end if;
- end find_change;
- end KPC_CA;
- if ( (:p20_shift_1 != :p20_t_shift1) or
- (:p20_shift_2 != :p20_t_shift2) or
- (:p20_shift_3 != :p20_t_shift3) or
- (:p20_week_off != :p20_t_wklyoff) or
- (:p20_location != :p20_t_location) or
- (:p20_sup_token != :p20_t_sup_token) or
- (:p20_sup_name != :p20_t_sup) or
- (:p20_dept_name != :p20_t_dept) or
- (:p20_sbu != :p20_t_sbu)
- )
- then
- return true;
- else
- return false;
- end if;
- :P1_POPUP_1 != :P1_POPUP_1_ORIG AND :P1_POPUP_2 != :P1_POPUP_2_ORIG ...
- NVL( :P1_POPUP_1, '*' ) != NVL( :P1_POPUP_1_ORIG, '*' ) AND
- NVL( :P1_POPUP_2, '*' ) != NVL( :P1_POPUP_2_ORIG, '*' ) AND ...
Add Comment
Please, Sign In to add comment