CUSTV_ITEM_VW

(SQL View)
Index Back

Customer Items


SELECT C.SETID , I.BUSINESS_UNIT , I.CUST_ID , I.CURRENCY_CD , SUM(I.BAL_AMT_BASE) , SUM(CASE WHEN I.DUE_DT < %CurrentDateIn THEN (I.BAL_AMT_BASE) ELSE 0 END) , SUM(CASE WHEN I.DOUBTFUL = 'Y' THEN (I.BAL_AMT_BASE) ELSE 0 END) , SUM(CASE WHEN I.DEDUCTION_STATUS <> ' ' THEN (I.BAL_AMT_BASE) ELSE 0 END) , SUM(CASE WHEN I.COLLECTION_STATUS <> ' ' THEN (I.BAL_AMT_BASE) ELSE 0 END) , SUM(CASE WHEN I.DISPUTE_STATUS <> ' ' THEN %Round(%DecMult(%DecDiv(I.DISPUTE_AMOUNT, I.RATE_DIV), I.RATE_MULT),3) ELSE 0 END) FROM %Table(SET_CNTRL_REC) C , %Table(ITEM) I WHERE C.RECNAME = 'CUSTOMER' AND C.SETCNTRLVALUE = I.BUSINESS_UNIT GROUP BY C.SETID , I.BUSINESS_UNIT , I.CUST_ID , I.CURRENCY_CD

# 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 BAL_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Item Balance
6 PASTDUE Signed Number(28,3) DECIMAL(26,3) NOT NULL Past Due
7 DOUBTFUL_AMOUNT Signed Number(17,2) DECIMAL(15,2) NOT NULL Doubtful Amount
8 DEDUCTION_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Deduction Amount
9 COLLECTION_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Collection Amount
10 DISPUTE_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the amount of an item in dispute. This may represent only a portion of the full amount of an item.