SELECT
GL.NAME "Ledger Name",
GL.DESCRIPTION "Ledger Description",
GLR.NAME "Revaluation Name",
GLR.DESCRIPTION "Revaluation Description",
(CASE GLR.AUTOMATIC_POST_FLAG
WHEN 'Y' THEN 'Enabled'
WHEN 'N' THEN 'Not Enabled' END) "Auto Post Revaluation Flag",
(CASE GLR.SECURITY_FLAG
WHEN 'Y' THEN 'Enabled'
WHEN 'N' THEN 'Not Enabled' END) "Enable Security Flag",
(CASE GLR.FROM_CURRENCY_OPTION_CODE
WHEN 'A' THEN 'All Currencies'
WHEN 'S' THEN 'Single Currency' END) "Currency Options",
GLR.FROM_CURRENCY_CODE "From Currency Code",
(CASE GLR.CONVERSION_RATE_OPTION_CODE
WHEN 'D' THEN 'Daily Rates'
WHEN 'U' THEN 'One-Time' END) "Rate Options",
(CASE GLR.CONVERSION_RATE_TYPE
WHEN '1000' THEN 'Month-end'
ELSE GLR.CONVERSION_RATE_TYPE END) "Conversion Rate Type",
GLR.REVALUATION_RATE "Revaluation Rate",
(GLR.GAIN_SEGMENT1||'.'||GLR.GAIN_SEGMENT2||'.'||GLR.GAIN_SEGMENT3||'.'||GLR.GAIN_SEGMENT4||'.'||
GLR.GAIN_SEGMENT5||'.'||GLR.GAIN_SEGMENT6||'.'||GLR.GAIN_SEGMENT7||'.'||GLR.GAIN_SEGMENT8) "Unrealised Gain Account",
(GLR.LOSS_SEGMENT1||'.'||GLR.LOSS_SEGMENT2||'.'||GLR.LOSS_SEGMENT3||'.'||GLR.LOSS_SEGMENT4||'.'||
GLR.LOSS_SEGMENT5||'.'||GLR.LOSS_SEGMENT6||'.'||GLR.LOSS_SEGMENT7||'.'||GLR.LOSS_SEGMENT8) "Unrealised Loss Account",
greatest(gl.last_update_date, glr.last_update_date) "Last Update Date",
(select name from v$database) "Database Name",
sysdate "Script Run Date"
FROM
APPS.GL_REVALUATIONS GLR,
APPS.GL_LEDGERS GL
WHERE gl.chart_of_accounts_id = glr.chart_of_accounts_id
and gl.name in('XXX Primary Ledger')ORDER BY GL.NAME
GL.NAME "Ledger Name",
GL.DESCRIPTION "Ledger Description",
GLR.NAME "Revaluation Name",
GLR.DESCRIPTION "Revaluation Description",
(CASE GLR.AUTOMATIC_POST_FLAG
WHEN 'Y' THEN 'Enabled'
WHEN 'N' THEN 'Not Enabled' END) "Auto Post Revaluation Flag",
(CASE GLR.SECURITY_FLAG
WHEN 'Y' THEN 'Enabled'
WHEN 'N' THEN 'Not Enabled' END) "Enable Security Flag",
(CASE GLR.FROM_CURRENCY_OPTION_CODE
WHEN 'A' THEN 'All Currencies'
WHEN 'S' THEN 'Single Currency' END) "Currency Options",
GLR.FROM_CURRENCY_CODE "From Currency Code",
(CASE GLR.CONVERSION_RATE_OPTION_CODE
WHEN 'D' THEN 'Daily Rates'
WHEN 'U' THEN 'One-Time' END) "Rate Options",
(CASE GLR.CONVERSION_RATE_TYPE
WHEN '1000' THEN 'Month-end'
ELSE GLR.CONVERSION_RATE_TYPE END) "Conversion Rate Type",
GLR.REVALUATION_RATE "Revaluation Rate",
(GLR.GAIN_SEGMENT1||'.'||GLR.GAIN_SEGMENT2||'.'||GLR.GAIN_SEGMENT3||'.'||GLR.GAIN_SEGMENT4||'.'||
GLR.GAIN_SEGMENT5||'.'||GLR.GAIN_SEGMENT6||'.'||GLR.GAIN_SEGMENT7||'.'||GLR.GAIN_SEGMENT8) "Unrealised Gain Account",
(GLR.LOSS_SEGMENT1||'.'||GLR.LOSS_SEGMENT2||'.'||GLR.LOSS_SEGMENT3||'.'||GLR.LOSS_SEGMENT4||'.'||
GLR.LOSS_SEGMENT5||'.'||GLR.LOSS_SEGMENT6||'.'||GLR.LOSS_SEGMENT7||'.'||GLR.LOSS_SEGMENT8) "Unrealised Loss Account",
greatest(gl.last_update_date, glr.last_update_date) "Last Update Date",
(select name from v$database) "Database Name",
sysdate "Script Run Date"
FROM
APPS.GL_REVALUATIONS GLR,
APPS.GL_LEDGERS GL
WHERE gl.chart_of_accounts_id = glr.chart_of_accounts_id
and gl.name in('XXX Primary Ledger')ORDER BY GL.NAME
No comments:
Post a Comment
Text Message