insert into fnd_sessions
values(userenv('sessionid'),trunc(sysdate))
SELECT elementtl.element_name,
elementtl.element_type_id,
spr.formula_id,
(select distinct formula_Name
from FF_FORMULAS_F ff where ff.formula_id = spr.formula_id)formula_name,
RESULT_NAME,
input_value.input_value_id,
spr.element_type_id processing_element_id
,(select element_name from pay_element_types_f petf
where element_type_id = spr.element_type_id)processing_element
FROM pay_formula_result_rules_f result_rule,
pay_input_values_f_tl valuetl,
pay_input_values_f input_value,
pay_status_processing_rules_f spr,
pay_element_types_f_tl elementtl,
pay_element_types_f ELEMENT,
fnd_sessions current_session
--,pay_formula_results_v payv
WHERE elementtl.element_type_id(+) = ELEMENT.element_type_id
AND DECODE (elementtl.element_type_id, NULL, '1', elementtl.LANGUAGE) =
DECODE (elementtl.element_type_id,
NULL, '1',
USERENV ('LANG')
)
AND valuetl.input_value_id(+) = input_value.input_value_id
AND DECODE (valuetl.input_value_id, NULL, '1', valuetl.LANGUAGE) =
DECODE (valuetl.input_value_id,
NULL, '1',
USERENV ('LANG')
)
AND result_rule.element_type_id = ELEMENT.element_type_id(+)
AND result_rule.status_processing_rule_id =
spr.status_processing_rule_id
AND result_rule.input_value_id = input_value.input_value_id(+)
AND ( current_session.session_id = USERENV ('sessionid')
AND current_session.effective_date
BETWEEN result_rule.effective_start_date
AND result_rule.effective_end_date
AND current_session.effective_date
BETWEEN NVL (spr.effective_start_date,
TO_DATE ('01/01/0001', 'DD/MM/YYYY')
)
AND NVL (spr.effective_end_date,
TO_DATE ('31/12/4712', 'DD/MM/YYYY')
)
AND current_session.effective_date
BETWEEN NVL (ELEMENT.effective_start_date,
TO_DATE ('01/01/0001', 'DD/MM/YYYY')
)
AND NVL (ELEMENT.effective_end_date,
TO_DATE ('31/12/4712', 'DD/MM/YYYY')
)
AND current_session.effective_date
BETWEEN NVL (input_value.effective_start_date,
TO_DATE ('01/01/0001', 'DD/MM/YYYY')
)
AND NVL (input_value.effective_end_date,
TO_DATE ('31/12/4712', 'DD/MM/YYYY')
)
)
--AND FORMULA_RESULT_RULE_ID = 158
AND elementtl.element_name = 'XX_Annual_Leave' --give ur name of element here
SELECT * FROM PAY_FORMULA_RESULT_RULES_v
WHERE RESULT_NAME LIKE '%ENCASH%'
AND FORMULA_RESULT_RULE_ID = 158
SELECT * FROM PAY_STATUS_PROCESSING_RULES_V
--WHERE ELEMENT_TYPE_ID = 161
SELECT * FROM PAY_STATUS_PROCESSING_RULES_V
values(userenv('sessionid'),trunc(sysdate))
SELECT elementtl.element_name,
elementtl.element_type_id,
spr.formula_id,
(select distinct formula_Name
from FF_FORMULAS_F ff where ff.formula_id = spr.formula_id)formula_name,
RESULT_NAME,
input_value.input_value_id,
spr.element_type_id processing_element_id
,(select element_name from pay_element_types_f petf
where element_type_id = spr.element_type_id)processing_element
FROM pay_formula_result_rules_f result_rule,
pay_input_values_f_tl valuetl,
pay_input_values_f input_value,
pay_status_processing_rules_f spr,
pay_element_types_f_tl elementtl,
pay_element_types_f ELEMENT,
fnd_sessions current_session
--,pay_formula_results_v payv
WHERE elementtl.element_type_id(+) = ELEMENT.element_type_id
AND DECODE (elementtl.element_type_id, NULL, '1', elementtl.LANGUAGE) =
DECODE (elementtl.element_type_id,
NULL, '1',
USERENV ('LANG')
)
AND valuetl.input_value_id(+) = input_value.input_value_id
AND DECODE (valuetl.input_value_id, NULL, '1', valuetl.LANGUAGE) =
DECODE (valuetl.input_value_id,
NULL, '1',
USERENV ('LANG')
)
AND result_rule.element_type_id = ELEMENT.element_type_id(+)
AND result_rule.status_processing_rule_id =
spr.status_processing_rule_id
AND result_rule.input_value_id = input_value.input_value_id(+)
AND ( current_session.session_id = USERENV ('sessionid')
AND current_session.effective_date
BETWEEN result_rule.effective_start_date
AND result_rule.effective_end_date
AND current_session.effective_date
BETWEEN NVL (spr.effective_start_date,
TO_DATE ('01/01/0001', 'DD/MM/YYYY')
)
AND NVL (spr.effective_end_date,
TO_DATE ('31/12/4712', 'DD/MM/YYYY')
)
AND current_session.effective_date
BETWEEN NVL (ELEMENT.effective_start_date,
TO_DATE ('01/01/0001', 'DD/MM/YYYY')
)
AND NVL (ELEMENT.effective_end_date,
TO_DATE ('31/12/4712', 'DD/MM/YYYY')
)
AND current_session.effective_date
BETWEEN NVL (input_value.effective_start_date,
TO_DATE ('01/01/0001', 'DD/MM/YYYY')
)
AND NVL (input_value.effective_end_date,
TO_DATE ('31/12/4712', 'DD/MM/YYYY')
)
)
--AND FORMULA_RESULT_RULE_ID = 158
AND elementtl.element_name = 'XX_Annual_Leave' --give ur name of element here
SELECT * FROM PAY_FORMULA_RESULT_RULES_v
WHERE RESULT_NAME LIKE '%ENCASH%'
AND FORMULA_RESULT_RULE_ID = 158
SELECT * FROM PAY_STATUS_PROCESSING_RULES_V
--WHERE ELEMENT_TYPE_ID = 161
SELECT * FROM PAY_STATUS_PROCESSING_RULES_V
No comments:
Post a Comment