GL Trial Balance - Detail
Description
Categories: Enginatics
Repository: Github
Repository: Github
Imported from Concurrent Program
Description: Detail Trial Balance (XML)
Application: General Ledger
Source: Trial Balance - Detail (XML)
Short Name: GLTRBALD
DB package:
Description: Detail Trial Balance (XML)
Application: General Ledger
Source: Trial Balance - Detail (XML)
Short Name: GLTRBALD
DB package:
Run
GL Trial Balance - Detail and other Oracle EBS reports with Blitz Report™ on our demo environment
select tb.* from ( select /*+ opt_param('_nlj_batching_enabled', 0) no_nlj_prefetch(b) */ max(lr.target_ledger_name) ledger_name, max(glb.currency_code) currency_code, &lp_pivot_segment_name pivot_segment, max(fnd_flex_xml_publisher_apis.process_kff_combination_1('acct_flex_cost_seg', 'SQLGL', 'GL#', glcc.chart_of_accounts_id, null, glcc.code_combination_id, :p_pagebreak_seg_num, 'Y', 'VALUE')) pivot_segment_value, max(fnd_flex_xml_publisher_apis.process_kff_combination_1('acct_flex_cost_seg', 'SQLGL', 'GL#', glcc.chart_of_accounts_id, null, glcc.code_combination_id, :p_pagebreak_seg_num, 'Y', 'DESCRIPTION')) pivot_segment_desc, max(fnd_flex_xml_publisher_apis.process_kff_combination_1('acct_flex_cost_seg', 'SQLGL', 'GL#', glcc.chart_of_accounts_id, null, glcc.code_combination_id, 'GL_ACCOUNT', 'Y', 'VALUE')) account_segment, max(fnd_flex_xml_publisher_apis.process_kff_combination_1('acct_flex_cost_seg', 'SQLGL', 'GL#', glcc.chart_of_accounts_id, null, glcc.code_combination_id, 'GL_ACCOUNT', 'Y', 'DESCRIPTION')) account_segment_desc, max(fnd_flex_xml_publisher_apis.process_kff_combination_1('acct_flex_cost_seg', 'SQLGL', 'GL#', glcc.chart_of_accounts_id, null, glcc.code_combination_id, 'ALL', 'Y', 'VALUE')) account, decode(:p_type,'PTD', sum(decode (:p_currency_type, 'T', nvl (begin_balance_dr, 0), 'S', nvl (begin_balance_dr, 0), 'E',decode (glb.translated_flag,'R', nvl (begin_balance_dr, 0), nvl (begin_balance_dr_beq, 0)), 'C', nvl (begin_balance_dr_beq, 0))), 'PJTD', decode (:p_currency_type, 'T', 0, 'S', 0, 'E', 0, 'C', 0), 'YTD', decode (:p_currency_type,'T', sum (decode(glb.period_name,:p_first_period_name,(nvl(begin_balance_dr,0)),0)), 'S', sum (decode(glb.period_name,:p_first_period_name,(nvl(begin_balance_dr,0)),0)), 'E', sum(decode (glb.translated_flag,'R', decode(glb.period_name,:p_first_period_name, nvl(begin_balance_dr,0),0), decode(glb.period_name,:p_first_period_name, nvl(begin_balance_dr_beq,0),0))), 'C', sum (decode (glb.period_name,:p_first_period_name, (nvl(begin_balance_dr_beq,0)),0)))) begin_balance_dr, decode(:p_type,'PTD', sum(decode (:p_currency_type, 'T', nvl (begin_balance_cr, 0), 'S', nvl (begin_balance_cr, 0), 'E',decode (glb.translated_flag,'R', nvl (begin_balance_cr, 0), nvl (begin_balance_cr_beq, 0)), 'C', nvl (begin_balance_cr_beq, 0))), 'PJTD', decode (:p_currency_type, 'T', 0, 'S', 0, 'E', 0, 'C', 0), 'YTD', decode (:p_currency_type,'T', sum (decode(glb.period_name,:p_first_period_name,(nvl(begin_balance_cr,0)),0)), 'S', sum (decode(glb.period_name,:p_first_period_name,(nvl(begin_balance_cr,0)),0)), 'E', sum(decode (glb.translated_flag,'R', decode(glb.period_name,:p_first_period_name, nvl(begin_balance_cr,0),0), decode(glb.period_name,:p_first_period_name, nvl(begin_balance_cr_beq,0),0))), 'C', sum (decode (glb.period_name,:p_first_period_name, (nvl(begin_balance_cr_beq,0)),0))))begin_balance_cr, decode(:p_type,'PTD', sum(decode (:p_currency_type, 'T', nvl (begin_balance_dr, 0)- nvl(begin_balance_cr,0), 'S', nvl (begin_balance_dr, 0)- nvl (begin_balance_cr, 0), 'E',decode (glb.translated_flag,'R', nvl (begin_balance_dr, 0)- nvl (begin_balance_cr, 0), nvl (begin_balance_dr_beq, 0)- nvl (begin_balance_cr_beq, 0)), 'C', nvl (begin_balance_dr_beq, 0)- nvl(begin_balance_cr_beq,0))), 'PJTD', decode (:p_currency_type, 'T', 0, 'S', 0, 'E', 0, 'C', 0), 'YTD', decode(:p_currency_type, 'T',sum(decode(glb.period_name, :p_first_period_name, (nvl(begin_balance_dr,0) - nvl(begin_balance_cr,0)),0)), 'S', sum(decode(glb.period_name, :p_first_period_name, (nvl(begin_balance_dr,0) - nvl(begin_balance_cr,0)),0)), 'E', sum(decode(glb.translated_flag, 'R', decode(glb.period_name, :p_first_period_name, nvl(begin_balance_dr,0) - nvl(begin_balance_cr,0),0), decode(glb.period_name, :p_first_period_name, nvl(begin_balance_dr_beq,0)- nvl(begin_balance_cr_beq,0),0))), 'C', sum (decode (glb.period_name,:p_first_period_name, (nvl(begin_balance_dr_beq,0)- nvl(begin_balance_cr_beq,0)),0)))) begin_balance, decode(:p_type, 'PTD', sum(decode(:p_currency_type, 'T', nvl(period_net_dr,0), 'S', nvl(period_net_dr,0), 'E', decode(glb.translated_flag, 'R', nvl(period_net_dr,0),nvl(period_net_dr_beq,0)), 'C', nvl(period_net_dr_beq,0))), 'PJTD', sum(decode(:p_currency_type, 'T', nvl(project_to_date_dr,0) + nvl(period_net_dr,0), 'S', nvl(project_to_date_dr,0) + nvl(period_net_dr,0), 'E', decode(glb.translated_flag, 'R', nvl(project_to_date_dr,0) + nvl(period_net_dr,0), nvl(project_to_date_dr_beq,0) + nvl(period_net_dr_beq,0)), 'C', nvl(project_to_date_dr_beq,0) + nvl(period_net_dr_beq,0))), 'YTD', decode(:p_currency_type, 'T',sum(decode(glb.period_name, :p_period_name, nvl(period_net_dr,0) + nvl(begin_balance_dr,0),0) - decode(glb.period_name, :p_first_period_name, nvl(begin_balance_dr,0),0)), 'S', sum(decode(glb.period_name, :p_period_name, nvl(period_net_dr,0) + nvl(begin_balance_dr,0),0) -decode(glb.period_name, :p_first_period_name, nvl(begin_balance_dr,0),0)), 'E', sum(decode(glb.translated_flag, 'R', decode(glb.period_name, :p_period_name, nvl(period_net_dr,0)+ nvl(begin_balance_dr,0),0) -decode(glb.period_name, :p_first_period_name, nvl(begin_balance_dr,0),0), decode(glb.period_name, :p_period_name, nvl(period_net_dr_beq,0)+nvl(begin_balance_dr_beq,0),0) -decode(glb.period_name, :p_first_period_name,nvl(begin_balance_dr_beq,0),0))), 'C', sum(decode(glb.period_name, :p_period_name, nvl(period_net_dr_beq,0) + nvl(begin_balance_dr_beq,0),0) - decode(glb.period_name, :p_first_period_name, nvl(begin_balance_dr_beq,0),0)))) period_dr, decode(:p_type, 'PTD', sum(decode(:p_currency_type, 'T', nvl(period_net_cr,0), 'S', nvl(period_net_cr,0), 'E', decode(glb.translated_flag, 'R', nvl(period_net_cr,0),nvl(period_net_cr_beq,0)), 'C', nvl(period_net_cr_beq,0))), 'PJTD', sum(decode(:p_currency_type, 'T', nvl(project_to_date_cr,0) + nvl(period_net_cr,0), 'S', nvl(project_to_date_cr,0) + nvl(period_net_cr,0), 'E', decode(glb.translated_flag, 'R', nvl(project_to_date_cr,0) + nvl(period_net_cr,0), nvl(project_to_date_cr_beq,0) + nvl(period_net_cr_beq,0)), 'C', nvl(project_to_date_cr_beq,0) + nvl(period_net_cr_beq,0))), 'YTD', decode(:p_currency_type, 'T',sum(decode(glb.period_name, :p_period_name, nvl(period_net_cr,0) + nvl(begin_balance_cr,0),0) - decode(glb.period_name, :p_first_period_name, nvl(begin_balance_cr,0),0)), 'S', sum(decode(glb.period_name, :p_period_name, nvl(period_net_cr,0) + nvl(begin_balance_cr,0),0) -decode(glb.period_name, :p_first_period_name, nvl(begin_balance_cr,0),0)), 'E', sum(decode(glb.translated_flag, 'R', decode(glb.period_name, :p_period_name, nvl(period_net_cr,0)+ nvl(begin_balance_cr,0),0) -decode(glb.period_name, :p_first_period_name, nvl(begin_balance_cr, |