The below query is useful to get the balances with in the balance group. Balance group is group of balances used in reporting purpose, mainly in requirement like to get sum of particular balances. We can create a Balance group for particular set of balances. We can use below query to find what are the balances in the defined balance group.
The more info about balance group from oracle is in below link
http://docs.oracle.com/cloud/farel11/globalcs_gs/FAIGP/FAIGP1427196.htm#FAIGP1655173
The query is,
Select pbg.base_group_name
, pbt.base_balance_name
, pbgu.BASE_GROUP_USAGE_NAME
, pbd.dimension_level
, pbd.period_type
, pbd.base_dimension_name
, pbd.base_db_item_suffix
, pbc.base_category_name
from PAY_BALANCE_GROUPS pbg,
PAY_BAL_GRP_USAGES pbgu,
PAY_BAL_GRP_INCLUSIONS pbgi,
PAY_BAL_ATT_DEFINITIONS pbad,
PAY_BALANCE_ATTRIBUTES pba,
PAY_DEFINED_BALANCES pdb,
PAY_BALANCE_TYPES pbt,
PAY_BALANCE_DIMENSIONS Pbd,
PAY_BALANCE_CATEGORIES_F pbc
where pbg.base_group_name like :P_Balance_group_name
and pbg.balance_group_id = pbgi.balance_group_id
and pbg.balance_group_id = pbgu.balance_group_id
and pbad.attribute_id = pbgi.attribute_id
and pbad.attribute_id = pba.attribute_id
and pdb.defined_balance_id = pba.defined_balance_id
and pbt.balance_type_id = pdb.balance_type_id
and pbd.balance_dimension_id = pdb.balance_dimension_id
and pbc.balance_category_id = pbt.balance_category_id
and sysdate between pbc.effective_start_date and pbc.effective_end_date
order by pbg.base_group_name
The more info about balance group from oracle is in below link
http://docs.oracle.com/cloud/farel11/globalcs_gs/FAIGP/FAIGP1427196.htm#FAIGP1655173
The query is,
Select pbg.base_group_name
, pbt.base_balance_name
, pbgu.BASE_GROUP_USAGE_NAME
, pbd.dimension_level
, pbd.period_type
, pbd.base_dimension_name
, pbd.base_db_item_suffix
, pbc.base_category_name
from PAY_BALANCE_GROUPS pbg,
PAY_BAL_GRP_USAGES pbgu,
PAY_BAL_GRP_INCLUSIONS pbgi,
PAY_BAL_ATT_DEFINITIONS pbad,
PAY_BALANCE_ATTRIBUTES pba,
PAY_DEFINED_BALANCES pdb,
PAY_BALANCE_TYPES pbt,
PAY_BALANCE_DIMENSIONS Pbd,
PAY_BALANCE_CATEGORIES_F pbc
where pbg.base_group_name like :P_Balance_group_name
and pbg.balance_group_id = pbgi.balance_group_id
and pbg.balance_group_id = pbgu.balance_group_id
and pbad.attribute_id = pbgi.attribute_id
and pbad.attribute_id = pba.attribute_id
and pdb.defined_balance_id = pba.defined_balance_id
and pbt.balance_type_id = pdb.balance_type_id
and pbd.balance_dimension_id = pdb.balance_dimension_id
and pbc.balance_category_id = pbt.balance_category_id
and sysdate between pbc.effective_start_date and pbc.effective_end_date
order by pbg.base_group_name



