HIST_LY_SALE_VW(SQL View) |
Index Back |
---|---|
Late Year Sales by Customer |
select a.business_unit, a.cust_id, sum(a.hist_amt), a.currency_cd from ps_Cust_history a, ps_cal_cur_per_vw b where b.setid = (select setid from ps_set_cntrl_rec where setcntrlvalue = A.business_unit and recname = 'CAL_DEFN_TBL' ) and b.calendar_id = (select calendar_id from PS_BUS_UNIT_OPT_AR O where O.setid = (select setid from ps_set_cntrl_rec where setcntrlvalue = A.business_unit and recname = 'BUS_UNIT_OPT_AR' )) and a.cust_hist_id = 'SALES' and a.fiscal_year = (b.fiscal_year - 1) group by a.business_unit, a.cust_id, a.currency_cd |
# | 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 | HIST_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | History Amt |
4 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |