Wednesday, 5 October 2016

GL Manual Journal Voucher Query

/********************************************** 
    Creation Date : 04 October, 2016
    Purpose       : GL Journal Voucher
                    Report Query
    Module        : General Ledger
    Parameters    : From and To Voucher No
    Created By    : Muhammad Waqas Khan
   
*********************************************/
SELECT H.PERIOD_NAME,
       H.DESCRIPTION,
       H.DEFAULT_EFFECTIVE_DATE,
       H.JE_HEADER_ID,
       L.JE_LINE_NUM,
       H.CURRENCY_CODE,
       H.DOC_SEQUENCE_VALUE JV_NO,
       H.LEDGER_ID,
       C.CONCATENATED_SEGMENTS,
       L.DESCRIPTION,
       APPS.GL_FLEXFIELDS_PKG.GET_DESCRIPTION_SQL(C.CHART_OF_ACCOUNTS_ID,
                                                  4,
                                                  C.SEGMENT4) ACCOUNT_DESC,
       L.ENTERED_DR,
       L.ENTERED_CR
  FROM GL_JE_HEADERS H, GL_JE_LINES L, GL_CODE_COMBINATIONS_KFV C
 WHERE H.JE_HEADER_ID = L.JE_HEADER_ID
      -- AND H.JE_SOURCE = 'Manual'
   AND H.DOC_SEQUENCE_VALUE IS NOT NULL
   AND NVL(H.DOC_SEQUENCE_VALUE, -1) BETWEEN
       NVL(:FROM_VOUCHER, NVL(H.DOC_SEQUENCE_VALUE, -1)) AND
       NVL(:TO_VOUCHER, NVL(H.DOC_SEQUENCE_VALUE, -1))
   AND L.CODE_COMBINATION_ID = C.CODE_COMBINATION_ID
   AND H.LEDGER_ID = :P_LEDGER_ID
 ORDER BY H.DOC_SEQUENCE_VALUE, H.JE_HEADER_ID, L.JE_LINE_NUM


No comments:

Post a Comment

Query to Find Receipt Class and its GL Combinition Query

SELECT ARC.NAME ReceiptClass,        ARC.CREATION_METHOD_CODE Creation_Mehthod,        DECODE (ARC.REMIT_METHOD_CODE,             ...