DBA Data[Home] [Help]

VIEW: APPS.WSH_PICKING_BATCHES_V

Source

View Text - Preformatted

SELECT wpb.rowid row_id , wpb.batch_id , wpb.creation_date , wpb.created_by , wpb.last_update_date , wpb.last_updated_by , wpb.last_update_login , wpb.program_application_id , wpb.program_id , wpb.program_update_date , wpb.request_id , wpb.name batch_name , wpb.backorders_only_flag , s1.meaning backorders , wpb.document_set_id , wrs.name doc_name , wpb.existing_rsvs_only_flag , s3.meaning reservation , decode(wpb.existing_rsvs_only_flag, 'Y', '*', NULL) reservation_star , wpb.shipment_priority_code , s2.meaning shipment_priority , wpb.ship_method_code , wpb.customer_id , substrb ( cust.party_name, 1, 50 ) /* customer_name */ , cust.account_number , wpb.order_header_id , h.order_number , wpb.ship_set_number ship_set_id, os.set_name ship_set_number, wpb.inventory_item_id , wpb.order_type_id , wpb.task_id, pjm_project.all_task_idtonum(wpb.task_id) task_number, wpb.project_id, pjm_project.all_proj_idtonum(wpb.project_id) project_number, ot.name order_type , wpb.FROM_requested_date , wpb.to_requested_date , wpb.FROM_scheduled_ship_date , wpb.to_scheduled_ship_date , wpb.ship_to_location_id , wstl.ui_location_code ship_to_location, wsfl.ui_location_code ship_FROM_location, wpb.ship_FROM_location_id , org.organization_code warehouse_code, h_org_tl.name warehouse , wpb.subinventory , wpb.attribute_category , wpb.attribute1 , wpb.attribute2 , wpb.attribute3 , wpb.attribute4 , wpb.attribute5 , wpb.attribute6 , wpb.attribute7 , wpb.attribute8 , wpb.attribute9 , wpb.attribute10 , wpb.attribute11 , wpb.attribute12 , wpb.attribute13 , wpb.attribute14 , wpb.attribute15 , wpb.organization_id , wpb.trip_stop_id stop_id, wssl.ui_location_code stop_name, wpb.trip_id , wpb.carrier_id, wt.name trip_name , wpb.default_stage_subinventory , wpb.default_stage_locator_id, wpb.pick_FROM_subinventory, wpb.pick_FROM_locator_id, wpb.delivery_id , wnd.name delivery_name , wpb.pick_grouping_rule_id , pgr.name pick_grouping_rule_name , wpb.pick_sequence_rule_id , psqr.name pick_seq_rule_name , wpb.autodetail_pr_flag, wpb.auto_pick_confirm_flag, wpb.include_planned_lines , wpb.autocreate_delivery_flag, wpb.delivery_detail_id, wpb.auto_send_doc_flag, wpb.task_planning_flag , wpb.ship_confirm_rule_id, wpb.autopack_flag, wpb.autopack_level, wpb.append_flag, wpb.region_id, wpb.zone_id, wpb.category_id, wpb.category_set_id, wpb.ac_delivery_criteria, wpb.rel_subinventory, wpb.task_priority, wpb.allocation_method, wpb.crossdock_criteria_id, wpb.actual_departure_date, wpb.dynamic_replenishment_flag, wpb.client_id FROM mtl_parameters org, hr_all_organization_units_tl h_org_tl, ( select party.party_name, cust_acct.account_number, cust_acct.cust_account_id from hz_parties party, hz_cust_accounts cust_acct where cust_acct.party_id = party.party_id ) cust, wsh_report_sets wrs, oe_order_types_v ot, wsh_delivery_legs wlg, wsh_trips wt, wsh_trip_stops wts, wsh_new_deliveries wnd, wsh_pick_grouping_rules pgr, wsh_pick_sequence_rules psqr, oe_order_headers_all h, oe_lookups s1, oe_lookups s2, oe_lookups s3, oe_sets os, wsh_picking_batches wpb, wsh_locations wstl, wsh_locations wsfl, wsh_locations wssl WHERE wt.trip_id(+) = wts.trip_id AND wts.stop_id(+) = wlg.pick_up_stop_id AND wlg.delivery_id(+) = wnd.delivery_id AND wnd.delivery_id(+) = wpb.delivery_id AND nvl(wlg.sequence_number,-1) = ( SELECT nvl(min(g.sequence_number), -1) FROM wsh_delivery_legs g WHERE g.delivery_id(+) = wnd.delivery_id ) AND cust.cust_account_id(+) = wpb.customer_id AND org.organization_id(+) = wpb.organization_id AND h_org_tl.organization_id(+) = wpb.organization_id AND h_org_tl.language(+) = userenv('LANG') AND wrs.report_set_id(+) = to_number(decode(wpb.document_set_id,'','-1', 'S','3', 'B','3', 'C','3', 'N','3', wpb.document_set_id) ) AND ot.order_type_id(+) = nvl(wpb.order_type_id, -1) AND h.header_id(+) = nvl(wpb.order_header_id,-1) AND os.set_id(+) = wpb.ship_set_number AND s1.lookup_type(+) = 'PICK_RELEASE_OPTIONS' AND s1.lookup_code(+) = wpb.backorders_only_flag AND s2.lookup_type(+) = 'SHIPMENT_PRIORITY' AND s2.lookup_code(+) = wpb.shipment_priority_code AND s3.lookup_type(+) = 'YES_NO' AND s3.lookup_code(+) = wpb.existing_rsvs_only_flag AND pgr.pick_grouping_rule_id(+) = wpb.pick_grouping_rule_id AND psqr.pick_sequence_rule_id(+) = wpb.pick_sequence_rule_id AND wpb.ship_to_location_id = wstl.wsh_location_id (+) AND wpb.ship_FROM_location_id = wsfl.wsh_location_id (+) AND wts.stop_location_id = wssl.wsh_location_id (+) AND nvl(wnd.shipment_direction, 'O') in ('O', 'IO') AND nvl(wts.shipments_type_flag, 'O') in ('O', 'M') AND nvl(wt.shipments_type_flag, 'O') in ('O', 'M')
View Text - HTML Formatted

SELECT WPB.ROWID ROW_ID
, WPB.BATCH_ID
, WPB.CREATION_DATE
, WPB.CREATED_BY
, WPB.LAST_UPDATE_DATE
, WPB.LAST_UPDATED_BY
, WPB.LAST_UPDATE_LOGIN
, WPB.PROGRAM_APPLICATION_ID
, WPB.PROGRAM_ID
, WPB.PROGRAM_UPDATE_DATE
, WPB.REQUEST_ID
, WPB.NAME BATCH_NAME
, WPB.BACKORDERS_ONLY_FLAG
, S1.MEANING BACKORDERS
, WPB.DOCUMENT_SET_ID
, WRS.NAME DOC_NAME
, WPB.EXISTING_RSVS_ONLY_FLAG
, S3.MEANING RESERVATION
, DECODE(WPB.EXISTING_RSVS_ONLY_FLAG
, 'Y'
, '*'
, NULL) RESERVATION_STAR
, WPB.SHIPMENT_PRIORITY_CODE
, S2.MEANING SHIPMENT_PRIORITY
, WPB.SHIP_METHOD_CODE
, WPB.CUSTOMER_ID
, SUBSTRB ( CUST.PARTY_NAME
, 1
, 50 ) /* CUSTOMER_NAME */
, CUST.ACCOUNT_NUMBER
, WPB.ORDER_HEADER_ID
, H.ORDER_NUMBER
, WPB.SHIP_SET_NUMBER SHIP_SET_ID
, OS.SET_NAME SHIP_SET_NUMBER
, WPB.INVENTORY_ITEM_ID
, WPB.ORDER_TYPE_ID
, WPB.TASK_ID
, PJM_PROJECT.ALL_TASK_IDTONUM(WPB.TASK_ID) TASK_NUMBER
, WPB.PROJECT_ID
, PJM_PROJECT.ALL_PROJ_IDTONUM(WPB.PROJECT_ID) PROJECT_NUMBER
, OT.NAME ORDER_TYPE
, WPB.FROM_REQUESTED_DATE
, WPB.TO_REQUESTED_DATE
, WPB.FROM_SCHEDULED_SHIP_DATE
, WPB.TO_SCHEDULED_SHIP_DATE
, WPB.SHIP_TO_LOCATION_ID
, WSTL.UI_LOCATION_CODE SHIP_TO_LOCATION
, WSFL.UI_LOCATION_CODE SHIP_FROM_LOCATION
, WPB.SHIP_FROM_LOCATION_ID
, ORG.ORGANIZATION_CODE WAREHOUSE_CODE
, H_ORG_TL.NAME WAREHOUSE
, WPB.SUBINVENTORY
, WPB.ATTRIBUTE_CATEGORY
, WPB.ATTRIBUTE1
, WPB.ATTRIBUTE2
, WPB.ATTRIBUTE3
, WPB.ATTRIBUTE4
, WPB.ATTRIBUTE5
, WPB.ATTRIBUTE6
, WPB.ATTRIBUTE7
, WPB.ATTRIBUTE8
, WPB.ATTRIBUTE9
, WPB.ATTRIBUTE10
, WPB.ATTRIBUTE11
, WPB.ATTRIBUTE12
, WPB.ATTRIBUTE13
, WPB.ATTRIBUTE14
, WPB.ATTRIBUTE15
, WPB.ORGANIZATION_ID
, WPB.TRIP_STOP_ID STOP_ID
, WSSL.UI_LOCATION_CODE STOP_NAME
, WPB.TRIP_ID
, WPB.CARRIER_ID
, WT.NAME TRIP_NAME
, WPB.DEFAULT_STAGE_SUBINVENTORY
, WPB.DEFAULT_STAGE_LOCATOR_ID
, WPB.PICK_FROM_SUBINVENTORY
, WPB.PICK_FROM_LOCATOR_ID
, WPB.DELIVERY_ID
, WND.NAME DELIVERY_NAME
, WPB.PICK_GROUPING_RULE_ID
, PGR.NAME PICK_GROUPING_RULE_NAME
, WPB.PICK_SEQUENCE_RULE_ID
, PSQR.NAME PICK_SEQ_RULE_NAME
, WPB.AUTODETAIL_PR_FLAG
, WPB.AUTO_PICK_CONFIRM_FLAG
, WPB.INCLUDE_PLANNED_LINES
, WPB.AUTOCREATE_DELIVERY_FLAG
, WPB.DELIVERY_DETAIL_ID
, WPB.AUTO_SEND_DOC_FLAG
, WPB.TASK_PLANNING_FLAG
, WPB.SHIP_CONFIRM_RULE_ID
, WPB.AUTOPACK_FLAG
, WPB.AUTOPACK_LEVEL
, WPB.APPEND_FLAG
, WPB.REGION_ID
, WPB.ZONE_ID
, WPB.CATEGORY_ID
, WPB.CATEGORY_SET_ID
, WPB.AC_DELIVERY_CRITERIA
, WPB.REL_SUBINVENTORY
, WPB.TASK_PRIORITY
, WPB.ALLOCATION_METHOD
, WPB.CROSSDOCK_CRITERIA_ID
, WPB.ACTUAL_DEPARTURE_DATE
, WPB.DYNAMIC_REPLENISHMENT_FLAG
, WPB.CLIENT_ID
FROM MTL_PARAMETERS ORG
, HR_ALL_ORGANIZATION_UNITS_TL H_ORG_TL
, ( SELECT PARTY.PARTY_NAME
, CUST_ACCT.ACCOUNT_NUMBER
, CUST_ACCT.CUST_ACCOUNT_ID
FROM HZ_PARTIES PARTY
, HZ_CUST_ACCOUNTS CUST_ACCT
WHERE CUST_ACCT.PARTY_ID = PARTY.PARTY_ID ) CUST
, WSH_REPORT_SETS WRS
, OE_ORDER_TYPES_V OT
, WSH_DELIVERY_LEGS WLG
, WSH_TRIPS WT
, WSH_TRIP_STOPS WTS
, WSH_NEW_DELIVERIES WND
, WSH_PICK_GROUPING_RULES PGR
, WSH_PICK_SEQUENCE_RULES PSQR
, OE_ORDER_HEADERS_ALL H
, OE_LOOKUPS S1
, OE_LOOKUPS S2
, OE_LOOKUPS S3
, OE_SETS OS
, WSH_PICKING_BATCHES WPB
, WSH_LOCATIONS WSTL
, WSH_LOCATIONS WSFL
, WSH_LOCATIONS WSSL
WHERE WT.TRIP_ID(+) = WTS.TRIP_ID
AND WTS.STOP_ID(+) = WLG.PICK_UP_STOP_ID
AND WLG.DELIVERY_ID(+) = WND.DELIVERY_ID
AND WND.DELIVERY_ID(+) = WPB.DELIVERY_ID
AND NVL(WLG.SEQUENCE_NUMBER
, -1) = ( SELECT NVL(MIN(G.SEQUENCE_NUMBER)
, -1)
FROM WSH_DELIVERY_LEGS G
WHERE G.DELIVERY_ID(+) = WND.DELIVERY_ID )
AND CUST.CUST_ACCOUNT_ID(+) = WPB.CUSTOMER_ID
AND ORG.ORGANIZATION_ID(+) = WPB.ORGANIZATION_ID
AND H_ORG_TL.ORGANIZATION_ID(+) = WPB.ORGANIZATION_ID
AND H_ORG_TL.LANGUAGE(+) = USERENV('LANG')
AND WRS.REPORT_SET_ID(+) = TO_NUMBER(DECODE(WPB.DOCUMENT_SET_ID
, ''
, '-1'
, 'S'
, '3'
, 'B'
, '3'
, 'C'
, '3'
, 'N'
, '3'
, WPB.DOCUMENT_SET_ID) )
AND OT.ORDER_TYPE_ID(+) = NVL(WPB.ORDER_TYPE_ID
, -1)
AND H.HEADER_ID(+) = NVL(WPB.ORDER_HEADER_ID
, -1)
AND OS.SET_ID(+) = WPB.SHIP_SET_NUMBER
AND S1.LOOKUP_TYPE(+) = 'PICK_RELEASE_OPTIONS'
AND S1.LOOKUP_CODE(+) = WPB.BACKORDERS_ONLY_FLAG
AND S2.LOOKUP_TYPE(+) = 'SHIPMENT_PRIORITY'
AND S2.LOOKUP_CODE(+) = WPB.SHIPMENT_PRIORITY_CODE
AND S3.LOOKUP_TYPE(+) = 'YES_NO'
AND S3.LOOKUP_CODE(+) = WPB.EXISTING_RSVS_ONLY_FLAG
AND PGR.PICK_GROUPING_RULE_ID(+) = WPB.PICK_GROUPING_RULE_ID
AND PSQR.PICK_SEQUENCE_RULE_ID(+) = WPB.PICK_SEQUENCE_RULE_ID
AND WPB.SHIP_TO_LOCATION_ID = WSTL.WSH_LOCATION_ID (+)
AND WPB.SHIP_FROM_LOCATION_ID = WSFL.WSH_LOCATION_ID (+)
AND WTS.STOP_LOCATION_ID = WSSL.WSH_LOCATION_ID (+)
AND NVL(WND.SHIPMENT_DIRECTION
, 'O') IN ('O'
, 'IO')
AND NVL(WTS.SHIPMENTS_TYPE_FLAG
, 'O') IN ('O'
, 'M')
AND NVL(WT.SHIPMENTS_TYPE_FLAG
, 'O') IN ('O'
, 'M')