Saturday, 7 December 2019

Absence Management - Debugging

Absence Management - Debugging

Element Resolution Chain is a nice way to view how the process is working.
It shows all the elements that are executed which are configured in a Section under Process List under Run Type.

We can play with the sqls to get results we need.

select * from ps_GP_AUDIT_SEG_VW a1 where cal_run_id like '19USA%'; -- list of employees processed
select * from ps_GP_AUDIT_PRC_VW a2 where cal_run_id like '19USA%' ; -- list of elements processed (parent level)

select * from ps_GP_AUDIT_DTL_VW a3 where cal_run_id like '19USA%' ; -- list of elements processed (parent & child level)
select * from ps_GP_AUDIT_tbl where emplid  = 'xxx'; -- list of elements processed (all levels)

Using the above, we can add more conditions as we want.

Adding PS_GP_PIN gives us the name, description, etc, of the element. 

select a.*,  PIN_CODE, PIN_NM, DESCR,PIN_PARENT_NUM from ps_GP_AUDIT_PRC_VW a, PS_GP_PIN b where a.pin_num = b.pin_num and  cal_run_id  like '19USAS113%';


select  a.*,  PIN_CODE, PIN_NM, DESCR,PIN_PARENT_NUM from ps_GP_AUDIT_DTL_VW  a, PS_GP_PIN b where a.pin_num = b.pin_num and cal_run_id like '19USA%' 
order by emplid;

We can add employees too.

select HIRE_DT, TERMINATION_DT,REG_TEMP, FULL_PART_TIME,reg_region,state,a1.*,  PIN_CODE, PIN_NM, DESCR,PIN_PARENT_NUM 
from ps_GP_AUDIT_PRC_VW a1, PS_GP_PIN b , ps_employees c1 
where a1.pin_num = b.pin_num and  cal_run_id  like '19USAS113%'
and a1.emplid = c1.emplid

order by a1.emplid,AUDIT_SORT_KEY;

select  a1.*,  HIRE_DT, TERMINATION_DT,REG_TEMP, FULL_PART_TIME,reg_region,state,PIN_CODE, PIN_NM, DESCR,PIN_PARENT_NUM,  PIN_CODE, PIN_NM, DESCR,PIN_PARENT_NUM  
from ps_GP_AUDIT_DTL_VW  a1, PS_GP_PIN b1, ps_employees c1 
where a1.pin_num = b1.pin_num and cal_run_id like '19USA%' 
and a1.emplid = c1.emplid

order by a1.emplid,AUDIT_SORT_KEY;


select distinct pin_nm,
 CAL_RUN_ID, EMPLID, 
  GP_PAYGROUP, CAL_ID, ORIG_CAL_RUN_ID, 
RSLT_SEG_NUM, AUDIT_SORT_KEY,PIN_CHAIN_LVL_NUM,PIN_CHAIN_RSLT_NUM,a.PIN_NUM,--PIN_NM,
 -- CALC_RSLT_VAL, CALC_ADJ_VAL, CALC_RAW_VAL,DATE_PIN_VAL, CHR_PIN_VAL, PIN_VAL_NUM,
PIN_CHAIN_SEQ_NUM, INSTANCE_NUM, SLICE_BGN_DT, SLICE_END_DT, SUB_PRC_ITERATION, 
   PIN_STATUS_IND, CALC_RSLT_VAL, CALC_ADJ_VAL, CALC_RAW_VAL, DATE_PIN_VAL, CHR_PIN_VAL, PIN_VAL_NUM,
BAD_TRACE_IND, SUM_INSTANCE_IND
PIN_CODE,  DESCR,PIN_PARENT_NUM 
from ps_GP_AUDIT_tbl a, PS_GP_PIN b1 
where a.pin_num = b1.pin_num 
-- and  cal_run_id   like '19USA%30' --  and pin_nm like '%PTO%' 
and emplid  like '02257025%'
-- and  cal_run_id like 'TEST%'
-- and calc_rslt_val <> 0 and pin_type = 'AC'
-- and pin_nm in ('GP PRD BGN DT EXTR','ANF AR TERM DATE')
-- and cal_id  like '%USA%'  and cal_id not like '%SWE%' and cal_id not like '%BEL%'
-- and PIN_NM like '%ABS%' and (calc_rslt_val > 0 or calc_adj_val > 0 or calc_raw_val > 0)
and PIN_NM like '%USAPTOAE_BAL' -- USATAKE RUN%'--VR NEWHIRE%' -- BR USAPTOXFR%'-- %ANF%MODEL%' -- '%VR PTOPAYF%' 
order by CAL_RUN_ID, EMPLID, 
 GP_PAYGROUP, CAL_ID, ORIG_CAL_RUN_ID,
-- calc_rslt_val desc,emplid, 
AUDIT_SORT_KEY,        PIN_CHAIN_LVL_NUM,  PIN_CHAIN_RSLT_NUM;

Absence Management - Navigations and Tables

Absence Management - Navigation and Tables

In PS Fluid interface its time taking to navigate from one navigation to another.
But based on the menu, component name, we can easily go that page by placing it in the URL.
Here are a few Navigations.

Also refer absence-management-tables-project.html
or /search/label/Absence

Security

Global Payroll User Profile: Used to set Absence management security.
Link: https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/DEFINE_PAYROLL_RULES_(GBL).GP_OPR_RULE_PRF.GBL
Nav: Set Up HCM  Security  User Maintenance  Global Payroll User Profile



Table: ps_GP_OPR_RULE_PRF Fields: OPRID, USED_BY, COUNTRY

Element Copy
 Set Up HCM  Product Related  Global Payroll & Absence Mgmt  Elements  Element Copy
/c/GPSC_ELEMENT_COPY.GPSC_ELEMENT_COPY.GBL

Process

RT1) Run Type 

Set Up HCM  Product Related  Global Payroll & Absence Mgmt  Integration  Map Earnings/TRCs to Run Types            https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/MANAGE_PAYROLL_PROCESS_(GBL).GP_RUN_TYPE.GBL
select * from ps_GP_RUN_TYPE;
select * from ps_GP_RUN_TYPE_DTL  where run_type like '' and pin_prc_num = 0;




RT1.1) Process Lists

Set Up HCM  Product Related  Global Payroll & Absence Mgmt  Framework  Processing  Process Lists  https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/DEFINE_PAYROLL_RULES_(GBL).GP_PROCESS.GBL
select * from ps_GP_PROCESS;
select * from ps_GP_PROCESS_DTL;


RT1.2) Sections

Set Up HCMProduct RelatedGlobal Payroll & Absence MgmtFrameworkProcessingSections
https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/DEFINE_PAYROLL_RULES_(GBL).GP_SECTION.GBL
select * from ps_GP_SECTION;




Migration

Create/Export Rule Package
https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/DEFINE_PAYROLL_RULES_(GBL).GP_PKG_CREXP.GBL
https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/DEFINE_PAYROLL_RULES_(GBL).GP_NR_PKG_CREATE.GBL
ps_GP_PKG_CRIT1
ps_GP_PKG_ELEMENTS



Debugging


Element Resolution Chain
https://xxx.com/psp/yyyy/EMPLOYEE/HRMS/c/MANAGE_PAYROLL_PROCESS_(GBL).GP_RESULT_TOOLS.GBL
ps_GP_AUDIT_tbl

More details in absence-management-debugging.html 


Element Groups
Used in Eligibility Groups
Set Up HCM  Product Related  Global Payroll & Absence Mgmt  Framework  Organizational  Element Groups
/c/MANAGE_PAYROLL_PROCESS_(GBL).GP_ELEMENT_GROUP.GBL
ps_GP_ELEM_GRP




Absence Management Tables - Project

Absence Management Tables - Project

While creating a project we may forget we created. Below is a way to find out.

This shows the Project and its details.
 Set Up HCM  Product Related  Global Payroll & Absence Mgmt  Elements  Manage Global Payroll Packages  Create/Export Rule Package

select * from ps_GP_PIN a1, ps_GP_PKG_CRIT1 b1 where gp_pkg_id = 'NV1' and a1.pin_num = b1.pin_num ;
select * from ps_GP_PIN a1, ps_GP_PKG_ELEMENTS b1 where gp_pkg_id = 'NV1' and a1.pin_num = b1.pin_num ;


select * from ps_GP_PIN where LAST_UPDT_OPRID like 'xxx%' and country in ('USA','ALL'); -- and pin_code like '%USA%';

Set Up HCMProduct RelatedGlobal Payroll & Absence MgmtElementsSupporting ElementsDurations

select * from ps_GP_PIN a1, ps_GP_DURATION b1 where a1.pin_num = b1.pin_num and EFFDT = '01-Sep-2019';

Set Up HCMProduct RelatedGlobal Payroll & Absence MgmtElementsSupporting ElementsVariables

select * from ps_GP_PIN a1, ps_GP_variable b1 where a1.pin_num = b1.pin_num and EFFDT = '01-Sep-2019';

Set Up HCMProduct RelatedGlobal Payroll & Absence MgmtElementsSupporting ElementsBrackets

select * from ps_GP_PIN a1, ps_GP_bracket b1 where a1.pin_num = b1.pin_num and EFFDT = '01-Sep-2019';

 Set Up HCM  Product Related  Global Payroll & Absence Mgmt  Elements  Supporting Elements  Formulas
select * from ps_GP_PIN a1, ps_GP_formula b1 where a1.pin_num = b1.pin_num and EFFDT = '01-Sep-2019';



select * from ps_GP_PIN a1, ps_GP_PKG_CRIT1 b1 where gp_pkg_id like '%USA32' and a1.pin_num = b1.pin_num ; -- all objects in project

select * from ps_GP_PIN a1 where LAST_UPDT_OPRID like 'RPATR%' and country in ('USA','ALL') -- objects not in project
and a1.pin_num not in (select b11.pin_num from ps_GP_PIN a11, ps_GP_PKG_CRIT1 b11 where gp_pkg_id like '%USA32' and a11.pin_num = b11.pin_num and a1.pin_num = b11.pin_num)

order by 2,LAST_UPDT_DTTM desc;

select * from ps_GP_PIN a1, ps_GP_DURATION b1 where a1.pin_num = b1.pin_num and EFFDT >= '01-Sep-2019'  -- duration not in proj
and b1.pin_num not in (select b11.pin_num from ps_GP_PIN a11, ps_GP_PKG_CRIT1 b11 
where gp_pkg_id like '%USA32' and a11.pin_num = b11.pin_num and b1.pin_num = b11.pin_num);

select a1.* from ps_GP_PIN a1, ps_GP_variable b1 where a1.pin_num = b1.pin_num and EFFDT >= '01-Sep-2019' -- variable not in proj
and b1.pin_num not in (select b11.pin_num from ps_GP_PIN a11, ps_GP_PKG_CRIT1 b11 
where gp_pkg_id = 'ANFUSA32' and a11.pin_num = b11.pin_num and b1.pin_num = b11.pin_num);

select distinct a1.PIN_NUM, PIN_CODE, PIN_NM, PIN_TYPE, DESCR, FLD_FMT, a1.DEFN_ASOFDT_OPTN, CHECK_GENER_IND, RECALC_IND, USED_BY, COUNTRY, PIN_CATEGORY, PIN_INDUSTRY, PIN_OWNER, PIN_CLASS, OVRD_IND_CAL, OVRD_IND_PYENT, OVRD_IND_PG, OVRD_IND_PYE, OVRD_IND_PI, OVRD_IND_ELEM, OVRD_IND_SOVR, STORE_RSLT, STORE_RSLT_IF_ZERO, PIN_PARENT_NUM, PIN_CUSTOM1, PIN_CUSTOM2, PIN_CUSTOM3, PIN_CUSTOM4, PIN_CUSTOM5, FCST_IND, FCST_REQ_IND, PIN_DRIVER_NUM, ENTRY_TYPE_USER_F1, PIN_USER_FLD1_NUM, ENTRY_TYPE_USER_F2, PIN_USER_FLD2_NUM, ENTRY_TYPE_USER_F3, PIN_USER_FLD3_NUM, ENTRY_TYPE_USER_F4, PIN_USER_FLD4_NUM, ENTRY_TYPE_USER_F5, PIN_USER_FLD5_NUM, ENTRY_TYPE_USER_F6, PIN_USER_FLD6_NUM, RTO_DELTA_UF_LVL, LAST_UPDT_DTTM, LAST_UPDT_OPRID, AUTO_ASSIGNED_TYPE, a1.GP_VERSION
from ps_GP_PIN a1, ps_GP_formula b1,ps_GP_PKG_CRIT1 c1 where a1.pin_num = b1.pin_num and EFFDT = '01-Sep-2019' -- formula not in proj

and b1.pin_num not in (select b11.pin_num from ps_GP_PIN a11, ps_GP_PKG_CRIT1 b11 
where gp_pkg_id like '%USA32' and a11.pin_num = b11.pin_num and b1.pin_num = b11.pin_num)

;


select * from ps_GP_PIN a1, ps_GP_bracket b1 where a1.pin_num = b1.pin_num and EFFDT >= '01-Sep-2019'-- bracket not in proj
and b1.pin_num not in (select b11.pin_num from ps_GP_PIN a11, ps_GP_PKG_CRIT1 b11 

where gp_pkg_id like '%USA32' and a11.pin_num = b11.pin_num and b1.pin_num = b11.pin_num);


select * from ps_GP_PIN a1, ps_GP_array b1 where a1.pin_num = b1.pin_num and country = 'USA' and pin_nm like '%' '-- array not in proj
and b1.pin_num not in (select b11.pin_num from ps_GP_PIN a11, ps_GP_PKG_CRIT1 b11 

where gp_pkg_id like '%USA32' and a11.pin_num = b11.pin_num and b1.pin_num = b11.pin_num);