Sunday, July 6, 2014

Query to Get Element Direct or Indirect Results from Formula Results

Note: We have used Oracle Generated Views to extract Results, so therefore we need to use fnd_sessions for the same

INSERT INTO fnd_sessions
     VALUES (USERENV ('sessionid'), TRUNC (SYSDATE));

SELECT formula.effective_start_date formula_effective_start_date,
       formula.effective_end_date formula_effective_end_date,
       formula.formula_name,
       rules.effective_start_date rule_effective_start_date,
       rules.effective_end_date rule_effective_end_date,
       rules.element_name,
       rules.rule_type_name,
       rules.input_value_name,
       rules.unit_of_measure,
       rules.result_name ff_input_variable
  FROM pay_status_processing_rules_v formula,
       pay_formula_result_rules_v rules
 WHERE formula.status_processing_rule_id = rules.status_processing_rule_id
       AND formula.element_type_id = 20321
       AND UPPER (rules.input_value_name) = 'PAY VALUE'

No comments:

Post a Comment