Friday, 24 January 2014

GL SQL QUERIES and links

SELECT GL.NAME
      FROM GL_LEDGERS GL,
           GL_JE_BATCHES GJB,
           GL_JE_HEADERS  GJH
      WHERE GJB.JE_BATCH_ID=GJH.JE_BATCH_ID
      AND    GL.LEDGER_ID=GJH.LEDGER_ID
      AND     GJB.NAME='TUI BATCH 25MAR13'
     
SELECT FIFS.ID_FLEX_STRUCTURE_CODE
      FROM FND_ID_FLEX_STRUCTURES  FIFS, 
           GL_LEDGERS GL
      WHERE FIFS.ID_FLEX_NUM=GL.CHART_OF_ACCOUNTS_ID
      AND    GL.NAME='TUI LEDGER'

SELECT GJS.JE_SOURCE_NAME
      FROM GL_JE_HEADERS GJH,
           GL_JE_BATCHES GJB,
           GL_JE_SOURCES GJS
      WHERE  GJB.NAME='TUI BATCH 25MAR13'
      AND    GJH.JE_SOURCE=GJS.JE_SOURCE_NAME 
      AND     GJB.JE_BATCH_ID=GJH.JE_BATCH_ID
     
SELECT GCCK.CONCATENATED_SEGMENTS
      FROM GL_CODE_COMBINATIONS_KFV GCCK,
           GL_JE_HEADERS GJH,
           GL_JE_LINES   GJL,
           GL_JE_BATCHES GJB
      WHERE  GCCK.CODE_COMBINATION_ID=GJL.CODE_COMBINATION_ID
      AND    GJB.NAME='TUI BATCH 25MAR13'
      AND   GJB.JE_BATCH_ID=GJH.JE_BATCH_ID
      AND   GJL.JE_HEADER_ID=GJH.JE_HEADER_ID
                           
            

No comments:

Post a Comment