11.0.3. Extract GL Budgets

SQL Statement to extract GL Budget STAT amounts.

 

select /*+ index(gcc code_combination_id) */
bal.period_num,
bal.period_net_dr,
bal.period_net_cr,
gcc.segment1,
gcc.segment2,
gcc.segment3,
gcc.segment4,
gcc.segment5,
gcc.segment6,
gcc.segment7
from apps.gl_balances bal
, apps.gl_sets_of_books bsk
, apps.gl_code_combinations gcc
, apps.gl_periods pd
where bal.period_year = 2016
and bal.period_num = 1
and bal.actual_flag = ‘B’
and ‘STAT’ =  bal.currency_code
and bsk.set_of_books_id = bal.set_of_books_id
and pd.period_set_name = bsk.period_set_name
and pd.period_name = bal.period_name
and gcc.code_combination_id = bal.code_combination_id
and gcc.summary_flag = ‘N’

Leave a Reply