Wednesday, March 23, 2011

Sql Query for Operating unit,Chart of Accoutns,Segments and valuesets

Hi All,
Now a days i am spending a lot of time for getting data from some generic sql queries
Going forward i want post the generic sql which we require in our development activities.I will tag all of them under useful Application queries


R12:
select hou.name,application_column_name,segment_name,flex_value_set_id
from apps.hr_operating_units hou,
apps.gl_ledgers gled,
FND_ID_FLEX_SEGMENTS
where ledger_id=set_of_books_id
and id_flex_code='GL#'
and id_flex_num=gled.CHART_OF_ACCOUNTS_ID
and hou.organization_id=4