CUSTV_ITACTV_VW

(SQL View)
Index Back

Customer Item Activity


SELECT C.SETID , I.BUSINESS_UNIT , I.CUST_ID , I.ENTRY_CURRENCY , SUM(CASE WHEN I.ENTRY_USE_ID = 'FC-01' THEN I.ENTRY_AMT ELSE 0 END) AS OVERDUE_AMT , SUM(CASE I.ENTRY_USE_ID WHEN 'WS-09' THEN I.ENTRY_AMT WHEN 'MT-03' THEN I.ENTRY_AMT WHEN 'MT-02' THEN I.ENTRY_AMT ELSE 0 END) AS ACV_WRITEOFF FROM %Table(SET_CNTRL_REC) C , %Table(ITEM_ACTIVITY) I WHERE C.RECNAME = 'CUSTOMER' AND C.SETCNTRLVALUE = I.BUSINESS_UNIT GROUP BY C.SETID , I.BUSINESS_UNIT , I.CUST_ID , I.ENTRY_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 OVERDUE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Overdue Amount
6 ACV_WRITEOFF Signed Number(28,3) DECIMAL(26,3) NOT NULL Write Off