/* Formatted on 2014/01/23 09:22 (Formatter Plus v4.8.8) */
SELECT jeh.je_header_id, jel.je_line_num, jeh.NAME jounal_name,
jeh.doc_sequence_value,
gcc.segment1
|| '.'
|| gcc.segment2
|| '.'
|| gcc.segment3
|| '.'
|| gcc.segment4
|| '.'
|| gcc.segment5
|| '.'
|| gcc.segment6
|| '.'
|| gcc.segment7 glaccount_number,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment1
) entity,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment2
) department,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment3
) mainaccount,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment4
) currency,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment5
) sub_account,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment6
) analysis,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment7
) future,
jeh.currency_code, jeh.currency_conversion_rate,
jeh.currency_conversion_type, jeh.posted_date,
jel.description line_description, gcc.account_type, jel.accounted_dr,
jel.accounted_cr, jel.entered_cr credit, jel.entered_dr debit,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment1
) "Business Unit",
jel.period_name, jeh.default_effective_date, jeh.creation_date,
--decode(jeh.je_source,'21','HR','106','DEPOX','2','RTGS','4','Currency','42','MSM','86','TIWSS',jeh.je_source) DDsource,
jeh.description journal_description,
NVL ((SELECT papf.title
|| ' '
|| papf.first_name
|| ' '
|| papf.middle_names
|| ' '
|| papf.last_name
FROM per_all_people_f papf, apps.fnd_user fu
WHERE papf.person_id = fu.employee_id
AND fu.user_id = jeh.created_by
AND SYSDATE BETWEEN papf.effective_start_date
AND papf.effective_end_date),
(SELECT user_name
FROM apps.fnd_user a
WHERE a.user_id = jeh.created_by)
) prepare_by,
jeh.created_by prepare_id
FROM apps.gl_je_headers jeh,
apps.gl_je_lines jel,
apps.gl_code_combinations gcc
WHERE jeh.je_header_id = jel.je_header_id
AND jel.code_combination_id = gcc.code_combination_id
--AND jeh.period_name LIKE '%13%'
AND jel.effective_date BETWEEN ('01-JAN-2013') AND ('31-DEC-2013')
AND jeh.actual_flag = 'A'
ORDER BY jeh.je_header_id, jel.je_line_num, jel.effective_date
SELECT jeh.je_header_id, jel.je_line_num, jeh.NAME jounal_name,
jeh.doc_sequence_value,
gcc.segment1
|| '.'
|| gcc.segment2
|| '.'
|| gcc.segment3
|| '.'
|| gcc.segment4
|| '.'
|| gcc.segment5
|| '.'
|| gcc.segment6
|| '.'
|| gcc.segment7 glaccount_number,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment1
) entity,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment2
) department,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment3
) mainaccount,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment4
) currency,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment5
) sub_account,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment6
) analysis,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment7
) future,
jeh.currency_code, jeh.currency_conversion_rate,
jeh.currency_conversion_type, jeh.posted_date,
jel.description line_description, gcc.account_type, jel.accounted_dr,
jel.accounted_cr, jel.entered_cr credit, jel.entered_dr debit,
apps.cbo_functions_pkg.get_description
(gcc.chart_of_accounts_id,
gcc.segment1
) "Business Unit",
jel.period_name, jeh.default_effective_date, jeh.creation_date,
--decode(jeh.je_source,'21','HR','106','DEPOX','2','RTGS','4','Currency','42','MSM','86','TIWSS',jeh.je_source) DDsource,
jeh.description journal_description,
NVL ((SELECT papf.title
|| ' '
|| papf.first_name
|| ' '
|| papf.middle_names
|| ' '
|| papf.last_name
FROM per_all_people_f papf, apps.fnd_user fu
WHERE papf.person_id = fu.employee_id
AND fu.user_id = jeh.created_by
AND SYSDATE BETWEEN papf.effective_start_date
AND papf.effective_end_date),
(SELECT user_name
FROM apps.fnd_user a
WHERE a.user_id = jeh.created_by)
) prepare_by,
jeh.created_by prepare_id
FROM apps.gl_je_headers jeh,
apps.gl_je_lines jel,
apps.gl_code_combinations gcc
WHERE jeh.je_header_id = jel.je_header_id
AND jel.code_combination_id = gcc.code_combination_id
--AND jeh.period_name LIKE '%13%'
AND jel.effective_date BETWEEN ('01-JAN-2013') AND ('31-DEC-2013')
AND jeh.actual_flag = 'A'
ORDER BY jeh.je_header_id, jel.je_line_num, jel.effective_date
No comments :
Post a Comment