AR_DSO_FLU_MVW

(SQL View)
Index Back

Customer DSO

Customer DSO

SELECT A.SETID , C.FISCAL_YEAR , C.ACCOUNTING_PERIOD , S.SETCNTRLVALUE , H.CUST_ID , 'DSO30' , %NumToChar(C.FISCAL_YEAR) %Concat '-' %Concat %NumToChar(C.ACCOUNTING_PERIOD) , %Round(H.HIST_AMT, 0) , H.HIST_COUNT , H.HIST_WEIGHT , H.CURRENCY_CD , O.CURRENT_DATE1 , S.SETID FROM PS_BUS_UNIT_OPT_AR A , PS_CAL_DETP_TBL C , PS_AR_BUSET_MVW S , PS_OPI_SYSCFG_TBL1 O , PS_CUST_HISTORY H WHERE C.SETID = A.SETID AND C.CALENDAR_ID = A.CALENDAR_ID AND O.CURRENT_DATE1 >= C.BEGIN_DT AND C.BEGIN_DT > %DateAdd(O.CURRENT_DATE1, -120) AND S.SETCNTRLVALUE = H.BUSINESS_UNIT AND H.FISCAL_YEAR = C.FISCAL_YEAR AND H.ACCOUNTING_PERIOD = C.ACCOUNTING_PERIOD AND H.CUST_HIST_ID = 'DSO30' AND O.PRODUCT_OE = 'ALL' AND S.RECNAME = 'CUSTOMER'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 FISCAL_YEAR Number(4,0) SMALLINT NOT NULL Fiscal Year
3 ACCOUNTING_PERIOD Number(3,0) SMALLINT NOT NULL Identifies a time period to which you post transactions. Typically, an accounting period represents a month, but it can also represent a week, a day, or any user-defined interval. An accounting period has a beginning date and an ending date, and is defined in the calendar table.
4 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
5 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.
6 CUST_HIST_ID Character(10) VARCHAR2(10) NOT NULL History ID
7 PERIOD_NAME Character(30) VARCHAR2(30) NOT NULL Period Name
8 DAYS Number(6,0) INTEGER NOT NULL Days
9 HIST_COUNT Signed Number(6,0) DECIMAL(5) NOT NULL History Count
10 HIST_WEIGHT Signed Number(28,3) DECIMAL(26,3) NOT NULL Weighting Amt
11 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
12 SYSTEM_DATE Date(10) DATE System Date
13 SETID1 Character(5) VARCHAR2(5) NOT NULL SetID Value