BOL_SHIPTO2_VW

(SQL View)
Index Back

BOL - SO shipped lines shipto

View is used when construction the Shipping Bill of Lading.

SELECT DISTINCT BUSINESS_UNIT , SOURCE_BUS_UNIT , SHIP_TO_CUST_ID , SHIP_CUST_NAME1 FROM PS_IN_DEMAND WHERE IN_FULFILL_STATE BETWEEN '60' AND '70' AND BILL_OF_LADING = ' ' AND SHIP_TO_CUST_ID <> ' ' AND ((EXPORT = 'Y' AND DEMAND_SOURCE <> 'OM') OR ORDER_NO IN ( SELECT DISTINCT S.ORDER_NO FROM PS_IN_DEMAND S , PS_ORD_LINE L , PS_ORD_SCHEDULE C WHERE S.DEMAND_SOURCE = 'OM' AND S.IN_FULFILL_STATE BETWEEN '60' AND '70' AND S.SOURCE_BUS_UNIT = L.BUSINESS_UNIT AND S.ORDER_NO = L.ORDER_NO AND S.SOURCE_BUS_UNIT = C.BUSINESS_UNIT AND S.ORDER_NO = C.ORDER_NO AND S.SHIP_TO_CUST_ID <> ' ' AND (L.EXPORT = 'Y' OR C.EXPORT = 'Y')))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 SOURCE_BUS_UNIT Character(5) VARCHAR2(5) NOT NULL Source Bus Unit
3 SHIP_TO_CUST_ID Character(15) VARCHAR2(15) NOT NULL Ship To Customer
4 SHIP_CUST_NAME1 Character(40) VARCHAR2(40) NOT NULL Ship To Name