API: GL_FLEXFIELDS _PKG to get the description of GL Account
If you wish to display the account description, Oracle provides an API for that instead of hitting the Value Set tables for each of the segment. Below is an example of the same.
Parameters:
1. Chart of Account id
2. Number of the Segment
3. Segment value for which you need the description
1 2 3 4 5 6 7 8 |
SELECT gcc.code_combination_id, apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,1,gcc.segment1) Segment1_desc, apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,2,gcc.segment2) Segment2_desc, apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,3,gcc.segment3) Segment3_desc, apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,4,gcc.segment4) Segment4_desc, apps.gl_flexfields_pkg.get_description_sql( gcc.chart_of_accounts_id,5,gcc.segment5) Segment5_desc from gl_code_combinations gcc where gcc.code_combination_id = 12854 — code combination id |