HIST_LP_S_VW

(SQL View)
Index Back

Recent History SubCustomer


select business_unit, cust_id, subcust_qual1, subcust_qual2, cust_hist_id, fiscal_year,accounting_period, hist_amt, hist_weight, hist_count, hist_dt, currency_cd from PS_SUBCUST_HISTORY h where h.hist_amt <> 0 and h.hist_count <> 0 AND H.FISCAL_YEAR = (SELECT MAX(FISCAL_YEAR) FROM PS_CUST_HISTORY WHERE BUSINESS_UNIT = H.BUSINESS_UNIT AND CUST_ID = H.CUST_ID AND CUST_HIST_ID = H.CUST_HIST_ID) AND H.ACCOUNTING_PERIOD = (SELECT MAX(ACCOUNTING_PERIOD) FROM PS_CUST_HISTORY WHERE BUSINESS_UNIT = H.BUSINESS_UNIT AND CUST_ID = H.CUST_ID AND CUST_HIST_ID = H.CUST_HIST_ID AND FISCAL_YEAR = H.FISCAL_YEAR)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
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 CUST_HIST_ID Character(10) VARCHAR2(10) NOT NULL History ID
6 FISCAL_YEAR Number(4,0) SMALLINT NOT NULL Fiscal Year
7 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.
8 HIST_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL History Amt
9 HIST_WEIGHT Signed Number(28,3) DECIMAL(26,3) NOT NULL Weighting Amt
10 HIST_COUNT Signed Number(6,0) DECIMAL(5) NOT NULL History Count
11 HIST_DT Date(10) DATE History Date
12 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code