SRBT_ORDERI_VW

(SQL View)
Index Back

OMSRBT temp table

This is a working temporary table for SQR OMSRBT. Is contains customer info for each rebate calculation.

SELECT h.business_unit , h.sold_to_cust_id , l.product_id , l.unit_of_measure , %Round(%DecMult(s.net_unit_price_bse, S.QTY_SCHEDULED), 3) , s.qty_scheduled , h.order_date , s.req_arrival_dttm , s.sched_ship_dttm , h.currency_cd_base , h.rt_type FROM ps_ord_header H , ps_ord_line L , ps_ord_schedule S , PS_BI_LINE b WHERE h.business_unit = l.business_unit AND h.business_unit = s.business_unit AND s.business_unit = b.business_unit_om AND H.ORDER_TYPE_CD = 'SO' AND h.order_no = l.order_no AND h.order_no = s.order_no AND s.order_no = b.order_no AND l.order_int_line_no = s.order_int_line_no AND s.order_int_line_no = b.order_int_line_no AND s.ord_Sch_status <> 'X' AND S.ORD_SCH_STATUS <> 'P' AND B.LINE_TYPE = 'REV' AND NOT EXISTS ( SELECT 'x' FROM ps_ord_price_adjst a WHERE a.business_unit = h.business_unit AND a.order_no = h.order_no AND a.order_int_line_no = 0)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 SOLD_TO_CUST_ID Character(15) VARCHAR2(15) NOT NULL Sold To Customer
3 PRODUCT_ID Character(18) VARCHAR2(18) NOT NULL Product ID
4 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
5 NET_EXTENDED_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Net Extended Amount
6 QTY_SCHEDULED Signed Number(17,4) DECIMAL(15,4) NOT NULL Quantity Scheduled
7 ORDER_DATE Date(10) DATE Date Initials Issue Description 022701 mv SP2 (F-CJORGENS-3) CSR Desktop
8 REQ_ARRIVAL_DTTM DateTime(26) TIMESTAMP Requested Arrival
9 SCHED_SHIP_DTTM DateTime(26) TIMESTAMP Schedule Ship Datetime
10 CURRENCY_CD_BASE Character(3) VARCHAR2(3) NOT NULL Business Unit Base Currency
11 RT_TYPE Character(5) VARCHAR2(5) NOT NULL Defines a category of market rates for currency conversion. Some examples of rate types are commercial, average, floating, and historical.