RQ_PENCMBAL_VW2

(SQL View)
Index Back

SELECT KKVW.BUSINESS_UNIT , KKVW.REQ_ID , SUM(KKVW.ENCUM_BALANCE) , KKVW.CURRENCY_CD , SUM(KKVW.FOREIGN_AMOUNT) FROM PS_PO_KK_VW KKVW LEFT JOIN PS_REQ_LN_DISTRIB DIS ON KKVW.BUSINESS_UNIT = DIS.BUSINESS_UNIT AND KKVW.REQ_ID = DIS.REQ_ID AND KKVW.LINE_NBR = DIS.LINE_NBR AND KKVW.SCHED_NBR = DIS.SCHED_NBR AND KKVW.DISTRIB_LINE_NUM = DIS.DISTRIB_LINE_NUM JOIN PS_REQ_HDR REQHDR ON KKVW.REQ_ID = REQHDR.REQ_ID AND KKVW.BUSINESS_UNIT = REQHDR.BUSINESS_UNIT WHERE EXISTS ( SELECT 'X' FROM PS_KK_ACTIVITY_LOG ACT , PS_BUL_CNTL_BUD LED WHERE ACT.BUSINESS_UNIT = LED.BUSINESS_UNIT AND ACT.KK_TRAN_ID = KKVW.KK_TRAN_ID AND ACT.KK_TRAN_DT = KKVW.KK_TRAN_DT AND ACT.LEDGER_GROUP = KKVW.LEDGER_GROUP AND LED.KK_LEDGER_GROUP = KKVW.LEDGER_GROUP AND LED.KK_DETAIL_LED = 'Y') GROUP BY KKVW.BUSINESS_UNIT, KKVW.REQ_ID, KKVW.CURRENCY_CD

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 REQ_ID Character(10) VARCHAR2(10) NOT NULL Requisition ID
3 PRE_ENCUM_BALANCE Signed Number(28,3) DECIMAL(26,3) NOT NULL Pre-Encumbrance Balance
4 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
5 FOREIGN_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the monetary amount of a debit or credit (accounting entry line) in the entry currency of the item. The sum of FOREIGN_AMOUNT values on AR lines should equal the ENTRY_AMT on the pending item.