Tuesday, 17 January 2012

gl_segment1_definition_query_in_11i

SELECT   GJL.SET_OF_BOOKS_ID,
         GJH.JE_SOURCE,
         GJH.JE_CATEGORY,
         GJL.PERIOD_NAME,
         GLCC.SEGMENT1,
         SUBSTR (
            apps.gl_flexfields_pkg.get_description_sql (
               glcc.chart_of_accounts_id,
               1,
               glcc.segment1
            ),
            1,
            300
         )
            Seg1_Description,
         GLCC.SEGMENT3 acc_num,
         ffv.DESCRIPTION,
         GJL.ACCOUNTED_DR,
         GJL.ACCOUNTED_CR,
         NVL (GJL.ACCOUNTED_DR, 0) - NVL (GJL.ACCOUNTED_CR, 0) Difference
  FROM   gl_je_headers gjh,
         GL_JE_LINES GJL,
         GL_CODE_COMBINATIONS_KFV GLCC,
         fnd_flex_values_vl ffv
 WHERE       gjh.je_header_id = gjl.je_header_id
         AND GJL.CODE_COMBINATION_ID = GLCC.CODE_COMBINATION_ID
         AND ffv.FLEX_VALUE = GLCC.segment3
         AND gjh.set_of_books_id = gjl.set_of_books_id
         AND gjh.set_of_books_id = 5
         AND gjh.period_name LIKE 'APR-11'
         AND GJH.STATUS LIKE 'U'

No comments:

Post a Comment