SELECT DISTINCT D.BUSINESS_UNIT , D.DELIVERY_ID , OUTR.SHIP_CNTR_ID , %Round(%DecMult(OUTR.SHIP_HEIGHT, %DecMult(OUTR.SHIP_LENGTH, OUTR.SHIP_WIDTH)), 4) , CASE OUTR.UNIT_MEASR_WT_USER WHEN ' ' THEN OUTR.GROSS_WEIGHT ELSE OUTR.GROSS_WEIGHT_USER END , OUTR.UNIT_MEASURE_VOL , CASE OUTR.UNIT_MEASR_WT_USER WHEN ' ' THEN OUTR.UNIT_MEASURE_WT ELSE OUTR.UNIT_MEASR_WT_USER END , C.SETID FROM PS_SHIP_CNTR_HDR OUTR , PS_SHIP_CNTR_HDR INNR , PS_SHIP_CNTR_INV DETL , PS_IN_DEMAND D , PS_IN_DELIVERY V , PS_SET_CNTRL_REC C WHERE %Join(COMMON_KEYS, IN_DEMAND D, SHIP_CNTR_INV DETL) AND D.IN_FULFILL_STATE BETWEEN '10' AND '60' AND D.IN_PROCESS_DATE IS NOT NULL AND D.DELIVERY_ID > ' ' AND V.BUSINESS_UNIT = D.BUSINESS_UNIT AND V.DELIVERY_ID = D.DELIVERY_ID AND V.DELIVERY_STATUS IN ('20','60','70') AND INNR.BUSINESS_UNIT = DETL.BUSINESS_UNIT AND INNR.SHIP_CNTR_ID = DETL.SHIP_CNTR_ID AND OUTR.BUSINESS_UNIT = INNR.BUSINESS_UNIT AND OUTR.SHIP_CNTR_ID = INNR.OUTER_MOST_CNTR_ID AND OUTR.SHIP_CNTR_ID = OUTR.OUTER_MOST_CNTR_ID AND C.SETCNTRLVALUE = D.BUSINESS_UNIT AND C.RECNAME = 'MASTER_ITEM_TBL'
|