FTE Derived Factors
SELECT BPFTF.NAME NAME_MDFTE,
BPFTF.MN_PCT_VAL MN_PCT_VAL_MDFTE,
BPFTF.MX_PCT_VAL MX_PCT_VAL_MDFTE,
DECODE(BPFTF.USE_PRMRY_ASNT_ONLY_FLAG,'Y','Yes','N','No') PRMRY_ASNT_ONLY_FLAG_MDFTE,
DECODE(BPFTF.USE_SUM_OF_ALL_ASNTS_FLAG,'Y','Yes','N','No') SUM_OF_ALL_ASNTS_FLAG_MDFTE,
HR_GENERAL.DECODE_LOOKUP('BEN_RNDG', BPFTF.RNDG_CD) ROUNDING_RULE_MDFTE,
FFFORMULAF1.BASE_FORMULA_NAME ROUNDING_FORMULA_MDFTE
FROM BEN_PCT_FL_TM_FCTR BPFTF
,FF_FORMULAS_B_F FFFORMULAF1
WHERE BPFTF.RNDG_RL = FFFORMULAF1.FORMULA_ID(+)
AND :P_AS_OF_DATE BETWEEN FFFORMULAF1.effective_start_date(+) AND FFFORMULAF1.effective_end_date(+)
AND (( :P_CREATION_TYPE= 'Custom' AND BPFTF.created_by <> 'SEED_DATA_FROM_APPLICATION')
OR ( :P_CREATION_TYPE = 'Seeded' AND BPFTF.created_by = 'SEED_DATA_FROM_APPLICATION')
OR ( :P_CREATION_TYPE = 'Seeded Modified' AND BPFTF.created_by = 'SEED_DATA_FROM_APPLICATION' AND BPFTF.last_updated_by <> 'SEED_DATA_FROM_APPLICATION')
OR (:P_CREATION_TYPE = 'ALL' ))