You are on page 1of 10

PICKING RULES SAMPLES

Delivery Detail ID
select wdd.DELIVERY_DETAIL_ID from wsh_delivery_details wdd,oe_order_headers_all
ooha,oe_order_lines_all oola where 1=1 and wdd.source_header_id = ooha.header_id and
ooha.header_id = oola.header_id and wdd.source_line_id = oola.line_id and oola.ship_to_org_id in
(select site_use_id from apps.hz_cust_accounts_all hca, apps.hz_cust_acct_sites_all hcas ,
apps.hz_cust_site_uses_all hcsu where 1=1 and hca.cust_account_id = hcas.cust_account_id and
hcas.cust_acct_site_id = hcsu.cust_acct_site_id and hcsu.site_use_code = 'SHIP_TO' and hcsu.attribute3
= 'Y')

LOT ORIGINATION DATE

SELECT max(cmln.origination_date)

FROM mtl_lot_numbers cmln,

-- hz_cust_accounts chca,

-- hz_cust_acct_sites_all chcas,

hz_cust_site_uses_all chcsu,

wsh_delivery_details cwdd

WHERE 1=1

AND cwdd.organization_id = cmln.organization_id

AND cwdd.inventory_item_id = cmln.inventory_item_id

AND cwdd.lot_number = cmln.lot_number

-- AND chca.cust_account_id = chcas.cust_account_id

-- AND chcas.cust_acct_site_id = chcsu.cust_acct_site_id

AND chcsu.site_use_code = 'SHIP_TO'

-- AND cwdd.customer_id = chca.cust_account_id

AND cwdd.source_code = 'OE'

AND cwdd.released_status = 'C'

-- AND chcas.org_id= cwdd.org_id

AND chcsu.org_id= cwdd.org_id

AND cwdd.SHIP_TO_SITE_USE_ID=chcsu.site_use_id

--AND chca.cust_account_id = wdd.customer_id

AND cwdd.inventory_item_id = base.inventory_item_id

AND cwdd.organization_id = base.organization_id

AND cwdd.customer_id = wdd.customer_id


AND cwdd.SHIP_TO_SITE_USE_ID=wdd.SHIP_TO_SITE_USE_ID

ITEM

SELECT cmic.inventory_item_id FROM mtl_category_sets_tl cmcstl, mtl_item_categories_v cmic WHERE


1 = 1 AND cmcstl.language = 'US' AND cmcstl.category_set_name = 'PPG CONTAINER SEQUENCE' AND
cmcstl.category_set_id = cmic.category_set_id AND cmic.category_concat_segs = 'Y' AND
cmic.inventory_item_id = base.inventory_item_id AND cmic.organization_id = base.organization_id

LPN QUERY

SELECT DISTINCT LICENSE_PLATE_NUMBER FROM APPS.MTL_ONHAND_QUANTITIES_DETAIL MOQD,


APPS.WMS_LICENSE_PLATE_NUMBERS WLPN WHERE
MOQD.ORGANIZATION_ID=WLPN.ORGANIZATION_ID AND MOQD.LPN_ID=WLPN.LPN_ID AND
MOQD.STATUS_ID=22
SELECT DISTINCT OOHA.ORDER_NUMBER FROM MTL_RESERVATIONS MR, OE_ORDER_LINES_ALL
OOLA,OE_ORDER_HEADERS_ALL OOHA WHERE MR.DEMAND_SOURCE_LINE_ID= OOLA.LINE_ID AND
MR.ORGANIZATION_ID=OOLA.SHIP_FROM_ORG_ID AND MR.INVENTORY_ITEM_ID
=BASE.INVENTORY_ITEM_ID AND OOHA.HEADER_ID=OOLA.HEADER_ID AND
OOHA.SHIP_FROM_ORG_ID=OOLA.SHIP_FROM_ORG_ID AND MR.LOT_NUMBER IS NOT NULL
SELECT DISTINCT MR.LOT_NUMBER FROM MTL_RESERVATIONS MR, OE_ORDER_LINES_ALL OOLA
WHERE MR.DEMAND_SOURCE_LINE_ID= OOLA.LINE_ID AND
MR.ORGANIZATION_ID=OOLA.SHIP_FROM_ORG_ID AND MR.INVENTORY_ITEM_ID =
BASE.INVENTORY_ITEM_ID AND MR.LOT_NUMBER IS NOT NULL

SELECT DISTINCT OOHA.ORDER_NUMBER FROM MTL_RESERVATIONS MR, OE_ORDER_LINES_ALL


OOLA,OE_ORDER_HEADERS_ALL OOHA WHERE MR.DEMAND_SOURCE_LINE_ID= OOLA.LINE_ID AND
MR.ORGANIZATION_ID=OOLA.SHIP_FROM_ORG_ID AND MR.INVENTORY_ITEM_ID
=BASE.INVENTORY_ITEM_ID AND OOHA.HEADER_ID=OOLA.HEADER_ID AND
OOHA.SHIP_FROM_ORG_ID=OOLA.SHIP_FROM_ORG_ID AND MR.LOT_NUMBER IS NOT NULL
select distinct(msi2.inventory_item_id) from wsh_container_items wci, mtl_system_items_b msi1,
mtl_system_items_b msi2 where wci.load_item_id = msi2.inventory_item_id and msi2.organization_id =
wci.master_organization_id and wci.container_item_id = msi1.inventory_item_id and
wci.master_organization_id = msi1.organization_id and msi1.organization_id = g_organization_id and
msi1.container_type_code in ('STTOTE', 'PLTOTE')

SELECT chca.account_number FROM hz_cust_accounts chca, hz_cust_acct_sites_all chcas,


hz_cust_site_uses_all chcsu WHERE 1=1 AND chcas.cust_account_id = chca.cust_account_id AND
chcas.cust_acct_site_id = chcsu.cust_acct_site_id AND chcsu.site_use_code = 'SHIP_TO' AND
DECODE(chcsu.attribute3,'Yes','Y','YES','Y',chcsu.attribute3) = 'Y'

SELECT cmic.inventory_item_id FROM mtl_category_sets_tl cmcstl, mtl_item_categories_v cmic WHERE


1 = 1 AND cmcstl.language = 'US' AND cmcstl.category_set_name = 'PPG CONTAINER SEQUENCE' AND
cmcstl.category_set_id = cmic.category_set_id AND cmic.category_concat_segs = 'Y' AND
cmic.inventory_item_id = base.inventory_item_id AND cmic.organization_id = base.organization_id

Putaway Samples
SELECT DISTINCT msl.inventory_location_id

FROM wms.wms_zone_locators wzl,


wms.wms_zones_tl wzt,

inv.mtl_item_locations msl

WHERE wzl.zone_id = wzt.zone_id

AND msl.inventory_location_id = wzl.inventory_location_id

AND wzt.zone_name LIKE 'Z-RM-COLD'

You might also like