AR_DB_AGE_VW

(SQL View)
Index Back

Customer Aging for Dashboard

Customer aging balance and count by setid for use in AR dashboard

SELECT R.SETID , A.CUST_ID , A.SUBCUST_QUAL1 , A.SUBCUST_QUAL2 , A.AGING_ID , A.AGING_CATEGORY , C.DESCR , A.BUSINESS_UNIT , A.AGING_AMT , A.AGING_CNT , A.CURRENCY_CD FROM PS_AR_DB_AGEALL_VW A , PS_SET_CNTRL_REC R , PS_SET_CNTRL_REC S , PS_AGING_CATEG_TBL C WHERE R.RECNAME = 'CUSTOMER' AND R.SETCNTRLVALUE = A.BUSINESS_UNIT AND C.AGING_ID = A.AGING_ID AND C.AGING_CATEGORY = A.AGING_CATEGORY AND S.SETID = C.SETID AND S.SETCNTRLVALUE = A.BUSINESS_UNIT AND S.RECNAME = 'AGING_CATEG_TBL' AND C.EFFDT = ( SELECT MAX (C1.EFFDT) FROM PS_AGING_CATEG_TBL C1 WHERE C1.SETID = C.SETID AND C1.AGING_ID = C.AGING_ID AND C1.AGING_CATEGORY = C.AGING_CATEGORY AND C1.EFFDT <= %CurrentDateIn)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 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.
3 SUBCUST_QUAL1 Character(15) VARCHAR2(15) NOT NULL Specifies a user-defined grouping of customer receivables activity. A subcustomer qualifier provides the ability to record and report receivables activity across multiple business units and/or multiple customers. For example a subcustomer qualifier could represent a sales region or a geographic area. There are two possible subcustomer qualifiers: SUBCUST_QUAL1 and SUBCUST_QUAL2.
4 SUBCUST_QUAL2 Character(15) VARCHAR2(15) NOT NULL Specifies a user-defined grouping of customer receivables activity. A subcustomer qualifier provides the ability to record and report receivables activity across multiple business units and/or multiple customers. For example a subcustomer qualifier could represent a sales region or a geographic area. There are two possible subcustomer qualifiers: SUBCUST_QUAL1 and SUBCUST_QUAL2.
5 AGING_ID Character(5) VARCHAR2(5) NOT NULL Aging ID
6 AGING_CATEGORY Character(2) VARCHAR2(2) NOT NULL Aging Category
7 DESCR Character(30) VARCHAR2(30) NOT NULL Description
8 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
9 AGING_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Aging Amount
10 AGING_CNT Number(6,0) INTEGER NOT NULL Aging Count
11 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code