Showing posts with label General Ledger. Show all posts
Showing posts with label General Ledger. Show all posts

Monday, May 19, 2025

How to find GL Code Combination ID and Description

Find GL Code Combination ID & Description


SELECT    gcc.segment1

       || '.'

       || gcc.segment2

       || '.'

       || gcc.segment3

       || '.'

       || gcc.segment4

       || '.'

       || gcc.segment5      ACCOUNT_CODE,

          a1.description

       || '-'

       || a2.description

       || '-'

       || a3.description

       || '-'

       || a4.description

       || '-'

       || a5.description    ACCOUNT_DECS

  FROM fnd_flex_values_vl    A1,

       fnd_flex_values_vl    A2,

       fnd_flex_values_vl    A3,

       fnd_flex_values_vl    A4,

       fnd_flex_values_vl    A5,

       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 a3.flex_value = gcc.segment3

       AND a3.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 = 'SEGMENT3')

       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 a5.flex_value = gcc.segment5

       AND a5.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 = 'SEGMENT5')

Office Activation