AR_ACCAGE_VW1

(SQL View)
Index Back

Customer Aging by Setid


SELECT P.SETID , A.CUST_ID , A.AGING_ID , A.AGING_CATEGORY , A.BUSINESS_UNIT , MIN(C.DESCR) , SUM(A.AGING_AMT) , SUM(A.AGING_CNT) , MIN(A.CURRENCY_CD) , MIN(B.AGED_DT) FROM PS_CUST_AGING A , PS_CUST_DATA B , PS_AGING_CATEG_TBL C , PS_SET_CNTRL_REC P , PS_SET_CNTRL_REC PC WHERE A.CUST_ID = B.CUST_ID AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND P.SETCNTRLVALUE = A.BUSINESS_UNIT AND P.RECNAME = 'CUSTOMER' AND A.AGING_CATEGORY = C.AGING_CATEGORY AND A.AGING_ID = C.AGING_ID AND PC.SETID = C.SETID AND PC.SETCNTRLVALUE = A.BUSINESS_UNIT AND PC.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 <= B.AGED_DT) GROUP BY P.SETID, A.CUST_ID, A.AGING_ID, A.AGING_CATEGORY, A.BUSINESS_UNIT

  • Related Language Record: AR_ACCAGE_LVW1
  • # 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 AGING_ID Character(5) VARCHAR2(5) NOT NULL Aging ID
    4 AGING_CATEGORY Character(2) VARCHAR2(2) NOT NULL Aging Category
    5 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
    6 AGING_CAT2 Character(30) VARCHAR2(30) NOT NULL Days Overdue
    7 AGING_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Aging Amount
    8 AGING_CNT Number(6,0) INTEGER NOT NULL Aging Count
    9 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
    10 AS_OF_DATE Date(10) DATE As of Date