Query : To get the Statement of expenses incurred in particular gl entry account

select gl.chart_of_accounts_id,
gl.account_type,
gl.segment12 account_dep,
gl.segment14 company,
gl.segment16 department,
bl.currency_code,
bl.period_net_dr ,
bl.period_net_cr ,
substr(a.description,1,50) descr,
he.period_name
from gl_code_combinations gl ,
gl_balances bl,
fnd_flex_value_sets c ,
fnd_flex_values b ,
fnd_flex_values_tl a,
gl_je_headers he
where gl.code_combination_id =bl.code_combination_id
and gl.chart_of_accounts_id=xxx -- add coaid
and b.flex_value_set_id = c.flex_value_set_id
and a.flex_value_id = b.flex_value_id
and he.set_of_books_id=bl.set_of_books_id
and a.language = 'US'
and c.flex_value_set_name like 'Operations Account'
and b.flex_value= gl.segment12;

0 comments:

Post a Comment