Friday, 14 June 2013

GL Code Combination Id & Description

1) 
SELECT
gcc.segment1||'.'||gcc.segment2||'.'||gcc.segment3||'.'||gcc.segment4
 ACCOUNT,
A1.DESCRIPTION||'-'||A2.DESCRIPTION ||'-'|| A3.DESCRIPTION||'-'|| A4.DESCRIPTION   DECS
from
fnd_flex_values_vl A1,
fnd_flex_values_vl A2,
fnd_flex_values_vl A3,
fnd_flex_values_vl A4,
gl_code_combinations gcc
WHERE
a1.flex_value=gcc.segment1
And a1.FLEX_VALUE_SET_ID in ( select FLEX_VALUE_SET_ID
                            from fnd_id_flex_segments
                           WHERE application_id = 101 AND id_flex_code = 'GL#' and enabled_flag = 'Y'
                           and application_column_name='SEGMENT1' )
and a2.flex_value=gcc.segment2
And a2.FLEX_VALUE_SET_ID in ( select FLEX_VALUE_SET_ID
                            from fnd_id_flex_segments
                           WHERE application_id = 101 AND id_flex_code = 'GL#' and enabled_flag = 'Y'
                           and application_column_name='SEGMENT2' )
and a4.flex_value=gcc.segment4
And a4.FLEX_VALUE_SET_ID in ( select FLEX_VALUE_SET_ID
                            from fnd_id_flex_segments
                           WHERE application_id = 101 AND id_flex_code = 'GL#' and enabled_flag = 'Y'
                           and application_column_name='SEGMENT4' )
--AND gcc.segment4='03081'

2)  ---Only in R12----
select gcc.CONCATENATED_SEGMENTS,
GL_FLEXFIELDS_PKG.get_concat_description( gcc.chart_of_accounts_id, gcc.code_combination_id) acc_description
FROM gl_code_combinations_kfv gcc

1 comment:

  1. Thank You Sir For these great way to find code combinations descriptions

    ReplyDelete