This SQL shows the elements that feed to a specific balance. This information is similar to the Balance form Feeds button.
select et.element_name
, iv.name
, et.classification_id
, cs.classification_name
, bf.effective_start_date
, bf.effective_end_date
from pay_balance_feeds_f bf
, pay_input_values_f iv
, pay_element_types_f et
, pay_element_classifications cs
where bf.balance_type_id = &balance_type_id
and bf.input_value_id = iv.input_value_id
and iv.element_type_id = et.element_type_id
and sysdate between bf.effective_start_date and bf.effective_end_date
and sysdate between iv.effective_start_date and iv.effective_end_date
and sysdate between et.effective_start_date and et.effective_end_date
and cs.classification_id=et.classification_id
order by et.classification_id;