GL Recurring Journal and Budget Formulas

Description
Categories: Enginatics, GL
Repository: Github
Lists Oracle General Ledger recurring journal and budget formula definitions - batches, journal entries, lines and each line's formula steps - with the account code combinations exploded into one column per Accounting Flexfield segment.

Each row is one formula step. The line account, which is the account the generated journal posts to, and the formula account, which is the account a step re ... 
Lists Oracle General Ledger recurring journal and budget formula definitions - batches, journal entries, lines and each line's formula steps - with the account code combinations exploded into one column per Accounting Flexfield segment.

Each row is one formula step. The line account, which is the account the generated journal posts to, and the formula account, which is the account a step reads a balance from, are both shown segment by segment. Company, Department, Account, Sub-Account and the remaining segments of your chart of accounts therefore become individual columns that can be sorted and filtered in Excel.

Replaces the Oracle standard report 'Other - Recurring Formula Listing' (GLXRLRFL), which prints concatenated code combinations in a fixed page layout. Definition access set security on recurring batches is applied exactly as in the standard report.

Use the Ledger, Batch Name, Journal Entry Name and Category parameters to focus on a subset, for example intercompany or intracompany batches, and the per segment like, From and To parameters to restrict the accounts.
   more
select
gl.name ledger,
grb.name batch_name,
grb.description batch_description,
xxen_util.description(grb.recurring_batch_type,'GL_RECURRING_BATCH_TYPE',101) batch_type,
xxen_util.description(decode(grb.budget_flag,'Y','B','A'),'BATCH_TYPE',101) batch_balance_type,
xxen_util.yes(grb.allocation_flag) "MassAllocation Batch",
grb.period_set_name calendar,
grb.accounted_period_type period_type,
grb.last_executed_period_name batch_last_executed_period,
grb.last_executed_date batch_last_executed_date,
grh.name journal_entry_name,
(select gjcv.user_je_category_name from gl_je_categories_vl gjcv where grh.je_category_name=gjcv.je_category_name) category,
grh.currency_code journal_currency,
(select gdct.user_conversion_type from gl_daily_conversion_types gdct where grh.currency_conversion_type=gdct.conversion_type) conversion_type,
xxen_util.yes(grh.enabled_flag) enabled,
grh.start_date_active,
grh.end_date_active,
grh.last_executed_period_name journal_last_executed_period,
grh.last_executed_date journal_last_executed_date,
grl.recurring_line_num line_number,
grl.description line_description,
grl.entered_dr,
grl.entered_cr,
grl.entered_currency_code line_currency,
gcck.concatenated_segments line_account,
&segment_columns
grlcr.rule_num formula_step,
xxen_util.description(grlcr.operator,'OPERATOR',101) operator,
grlcr.amount,
xxen_util.description(grlcr.amount_type,decode(grlcr.amount_type,'PATD','PATD_EOD','YATD','PATD_EOD','QATD','PATD_EOD','EOD','PATD_EOD','PTD_YTD'),101) amount_type,
xxen_util.meaning(grlcr.relative_period_code,'PERIOD CODE',101) relative_period,
xxen_util.description(grlcr.actual_flag,'BATCH_TYPE',101) balance_type,
xxen_util.meaning(grlcr.currency_type,'GL_CURRENCY_TYPE',101) currency_type,
grlcr.entered_currency formula_entered_currency,
grlcr.ledger_currency formula_ledger_currency,
&formula_segment_columns
(select gcck2.concatenated_segments from gl_code_combinations_kfv gcck2 where grlcr.assigned_code_combination=gcck2.code_combination_id) formula_assigned_account,
xxen_util.user_name(grb.last_updated_by) batch_last_updated_by,
xxen_util.client_time(grb.last_update_date) batch_last_update_date,
grb.recurring_batch_id,
grh.recurring_header_id
from
gl_recurring_batches grb,
gl_ledgers gl,
gl_recurring_headers grh,
gl_recurring_lines grl,
gl_recurring_line_calc_rules grlcr,
gl_code_combinations_kfv gcck
where
1=1 and
grb.ledger_id=gl.ledger_id(+) and
grb.recurring_batch_id=grh.recurring_batch_id and
grh.recurring_header_id=grl.recurring_header_id and
grl.recurring_header_id=grlcr.recurring_header_id(+) and
grl.recurring_line_num=grlcr.recurring_line_num(+) and
grl.code_combination_id=gcck.code_combination_id and
decode(grb.security_flag,'Y',decode(fnd_data_security.check_function(1.0,'GL_DAS_RECURRING_JOURNAL_V','GL_DAS_RECURRING_JOURNAL',to_char(grb.recurring_batch_id),null,null,null,null,fnd_global.user_name),'T','Y','N'),'Y')='Y'
order by
gl.name,
grb.name,
grh.name,
grl.recurring_line_num,
grlcr.rule_num
Parameter NameSQL textValidation
Ledger
gl.name=:ledger
LOV
Calendar
grb.period_set_name=:calendar
LOV
Batch Name
grb.name=:batch_name
LOV
Journal Entry Name
grh.name=:journal_entry_name
LOV
Category
grh.je_category_name=:category
LOV
Balance Type
grb.budget_flag=:balance_type
LOV
Batch Type
grb.recurring_batch_type=:batch_type
LOV
MassAllocation Batch
grb.allocation_flag=:massallocation_batch
LOV Oracle
Enabled
grh.enabled_flag=:enabled
LOV Oracle
Account like
gcck.concatenated_segments like :account_like
Char
GL_SEGMENT1
gcck.segment1=:segment1
LOV
GL_SEGMENT1 From
gcck.segment1>=:segment1_from
LOV
GL_SEGMENT1 To
gcck.segment1<=:segment1_to
LOV
GL_SEGMENT2
gcck.segment2=:segment2
LOV
GL_SEGMENT2 From
gcck.segment2>=:segment2_from
LOV
GL_SEGMENT2 To
gcck.segment2<=:segment2_to
LOV
GL_SEGMENT3
gcck.segment3=:segment3
LOV
GL_SEGMENT3 From
gcck.segment3>=:segment3_from
LOV
GL_SEGMENT3 To
gcck.segment3<=:segment3_to
LOV
GL_SEGMENT4
gcck.segment4=:segment4
LOV
GL_SEGMENT4 From
gcck.segment4>=:segment4_from
LOV
GL_SEGMENT4 To
gcck.segment4<=:segment4_to
LOV
GL_SEGMENT5
gcck.segment5=:segment5
LOV
GL_SEGMENT5 From
gcck.segment5>=:segment5_from
LOV
GL_SEGMENT5 To
gcck.segment5<=:segment5_to
LOV
GL_SEGMENT6
gcck.segment6=:segment6
LOV
GL_SEGMENT6 From
gcck.segment6>=:segment6_from
LOV
GL_SEGMENT6 To
gcck.segment6<=:segment6_to
LOV
GL_SEGMENT7
gcck.segment7=:segment7
LOV
GL_SEGMENT7 From
gcck.segment7>=:segment7_from
LOV
GL_SEGMENT7 To
gcck.segment7<=:segment7_to
LOV
GL_SEGMENT8
gcck.segment8=:segment8
LOV
GL_SEGMENT8 From
gcck.segment8>=:segment8_from
LOV
GL_SEGMENT8 To
gcck.segment8<=:segment8_to
LOV
GL_SEGMENT9
gcck.segment9=:segment9
LOV
GL_SEGMENT9 From
gcck.segment9>=:segment9_from
LOV
GL_SEGMENT9 To
gcck.segment9<=:segment9_to
LOV
GL_SEGMENT10
gcck.segment10=:segment10
LOV
GL_SEGMENT10 From
gcck.segment10>=:segment10_from
LOV
GL_SEGMENT10 To
gcck.segment10<=:segment10_to
LOV