CUSTV_PAYMT_VW

(SQL View)
Index Back

Customer Items


SELECT C.SETID , I.BUSINESS_UNIT , I.CUST_ID , I.BAL_CURRENCY , SUM(CASE WHEN I.ENTRY_USE_ID = 'WS-05' THEN I.BAL_AMT ELSE 0 END) AS ACV_PAYMNET , SUM(CASE WHEN I.ENTRY_USE_ID = 'WS-04' THEN I.BAL_AMT ELSE 0 END) AS ACV_PREPAYMENT , SUM(CASE WHEN I.ENTRY_USE_ID = 'IT-02' THEN I.BAL_AMT ELSE 0 END) AS ACV_CREDITS FROM %Table(SET_CNTRL_REC) C , %Table(ITEM) I WHERE C.RECNAME = 'CUSTOMER' AND C.SETCNTRLVALUE = I.BUSINESS_UNIT AND I.ITEM_STATUS = 'O' GROUP BY C.SETID , I.BUSINESS_UNIT , I.CUST_ID , I.BAL_CURRENCY

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID

Prompt Table: SP_SETID_NONVW

2 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Prompt Table: SP_BUARDS_NONVW

3 CUST_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations.
4 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
5 ACV_PAYMENT Signed Number(28,3) DECIMAL(26,3) NOT NULL Payment
6 ACV_PREPAYMENT Signed Number(28,3) DECIMAL(26,3) NOT NULL Prepayment
7 ACV_CREDITS Signed Number(28,3) DECIMAL(26,3) NOT NULL Credits