mtl_txn_request_lines mtrl , wsh_pick_grouping_rules wpgr WHERE mtrh.header_id = mtrl.header_id AND mtrl.line_id = wdd.move_order_line_id AND mtrh.grouping_rule_id = wpgr.pick_grouping_rule_id(+) ) name , wdd.ship_method_code carrier , wdd.shipment_priority_code priority , wdd.organization_id , wdd.requested_quantity2 secondary_qty_requested , wdd.requested_quantity_uom2 secondary_qty_requested_uom, wdd.shipped_quantity2 secondary_qty_shipped , wdd.requested_quantity_uom2 secondary_qty_shipped_uom , wdd.preferred_grade grade , wdd.freight_terms_code freight_terms , wdd.date_requested requested_ship_date , wdd.attribute1 wdd_attribute1 , wdd.attribute2 wdd_attribute2 , wdd.attribute3 wdd_attribute3 , wdd.attribute4 wdd_attribute4 , wdd.attribute5 wdd_attribute5 , wdd.attribute6 wdd_attribute6 , wdd.attribute7 wdd_attribute7 , wdd.attribute8 wdd_attribute8 , wdd.attribute9 wdd_attribute9 , wdd.attribute10 wdd_attribute10 , wdd.attribute11 wdd_attribute11 , wdd.attribute12 wdd_attribute12 , wdd.attribute13 wdd_attribute13 , wdd.attribute14 wdd_attribute14 , wdd.attribute15 wdd_attribute15 , wnd.attribute1 wnd_attribute1 , wnd.attribute2 wnd_attribute2 , wnd.attribute3 wnd_attribute3 , wnd.attribute4 wnd_attribute4 , wnd.attribute5 wnd_attribute5 , wnd.attribute6 wnd_attribute6 , wnd.attribute7 wnd_attribute7 , wnd.attribute8 wnd_attribute8 , wnd.attribute9 wnd_attribute9 , wnd.attribute10 wnd_attribute10 , wnd.attribute11 wnd_attribute11 , wnd.attribute12 wnd_attribute12 , wnd.attribute13 wnd_attribute13 , wnd.attribute14 wnd_attribute14 , wnd.attribute15 wnd_attribute15 , msik.concatenated_segments item_name , wdd.source_code source_code , ooha.cust_po_number cust_po_number , NVL( bill_acct_site.translated_customer_name,bill_party.party_name) bill_customer, bill_su.location b_location , bill_loc.address1 b_address1 , bill_loc.address2 b_address2 , bill_loc.address3 b_address3 , bill_loc.city || DECODE( bill_loc.city,NULL,NULL, DECODE(bill_loc.state,NULL,NULL,', ' || bill_loc.state)) || DECODE(bill_loc.province,NULL,NULL,', ' || bill_loc.province) || ' ' || bill_loc.postal_code || ', ' || bill_loc.country b_city_st_zip , bill_loc.country b_country , terr1.territory_short_name b_country_name , NVL( ship_acct_site.translated_customer_name,ship_party.party_name) ship_customer, DECODE(ooha.deliver_to_org_id,NULL,ship_party.party_name,NULL) S_PARTY_NAME, ship_su.location s_location , ship_loc.address1 s_address1 , ship_loc.address2 s_address2 , ship_loc.city || DECODE( ship_loc.city,NULL,NULL, DECODE(ship_loc.state,NULL,NULL,', ' || ship_loc.state)) || DECODE(ship_loc.province,NULL,NULL,', ' || ship_loc.province) || ' ' || ship_loc.postal_code || ', ' || ship_loc.country s_city_st_zip, foobar_3.cf_warehouseformula(wdd.organization_id) CF_warehouse, (SELECT fl.meaning FROM fnd_lookup_values fl WHERE ooha.shipment_priority_code = fl.lookup_code(+) AND fl.language = userenv('LANG') AND fl.lookup_type = 'SHIPMENT_PRIORITY' AND fl.enabled_flag = 'Y' AND SYSDATE BETWEEN fl.start_date_active AND NVL (fl.end_date_active, SYSDATE + 1 ) ) CF_temp , foobar_3.cf_requisition_numberformula(wdd.source_header_id) CF_requisition_number, NULL CF_ship_to_address , NULL CF_carrier , NULL CF_shipment_priority , NULL CF_subinventory , NULL CF_delivery_id , wnd.delivery_id CF_delivery , DECODE(ooha.ATTRIBUTE7,'Y','DUPLICATE',NULL) CF_DUPLICATE , foobar_3.INSERT_GT_TBL(ooha.header_id,ooha.org_id,ooha.ATTRIBUTE7) CF_INSERT_GT_TBL, NULL CF_trip_stop_address , ooha.order_number CF_order_number, lk1.meaning so_freight_terms , DECODE(ooha.deliver_to_org_id,NULL, NVL(ooha.packing_instructions, ship_party_site.addressee || (SELECT ' Phone ' || (DECODE(phone_country_code,NULL,NULL,'+' || phone_country_code || ' ') || DECODE(phone_area_code,NULL,NULL,'(' || phone_area_code || ')') || phone_number) FROM hz_contact_points hcp WHERE owner_table_name = 'HZ_PARTY_SITES' AND primary_flag = 'Y' AND owner_table_id = ship_party_site.party_site_id AND contact_point_type = 'PHONE' AND PHONE_LINE_TYPE = 'GEN' AND status = 'A' ) ) , ooha.packing_instructions) packing_instructions, /* (SELECT MIN (request_date) FROM oe_order_lines_all l WHERE l.org_id = ooha.org_id AND l.header_id= ooha.header_id )so_request_date, */ TRUNC(oola.schedule_ship_date) SSD , NULL CF_customer_name , foobar_3.CP_warehouse_code_p CP_warehouse_code , foobar_3.CP_warehouse_name_p CP_warehouse_name , foobar_3.st_addr1_p st_addr1 , foobar_3.ts_addr3_p ts_addr3 , foobar_3.ts_addr4_p ts_addr4 , foobar_3.ts_addr5_p ts_addr5 , foobar_3.ts_addr1_p ts_addr1 , foobar_3.ts_addr2_p ts_addr2 , foobar_3.st_addr4_p st_addr4 , foobar_3.st_addr5_p st_addr5 , foobar_3.st_addr2_p st_addr2 , foobar_3.st_addr3_p st_addr3 , NULL F_TO_LOCATION , NULL CF_customer , foobar_3.cf_trip_idformula(wnd.delivery_id, wnd.initial_pickup_location_id) CF_trip_id , foobar_3.f_item_descriptionformula(msitl.description, wdd.inventory_item_id, wdd.organization_id, msitl.description) F_ITEM_DESCRIPTION, NULL F_REQUESTED_QUANTITY , foobar_3.f_shipped_quantityformula() F_SHIPPED_QUANTITY , foobar_3.cf_trip_chrformula(foobar_3.cf_trip_idformula(wnd.delivery_id, wnd.initial_pickup_location_id)) CF_TRIP_CHR , foobar_3.CP_trip_name_p CP_trip_name , NULL F_FROM_LOCATION , foobar_3.cf_freight_terms_nameformula(wdd.freight_terms_code, wdd.source_code) CF_FREIGHT_TERMS_NAME , NULL CF_REVISION , foobar_3.B_task_idFt(wdd.organization_id) B_task_idFtFROM /* ( SELECT mmt.subinventory_code subinventory_code, mmt.locator_id from_locator_id, mmt.transfer_subinventory to_subinventory, mmt.transfer_locator_id to_locator_id, abs(mmt.primary_quantity) primary_qty, mmt.pick_slip_number, mmt.transaction_date detailing_date, mmt.move_order_line_id, 'PICKED' line_status, mmt.transaction_id, mmt.transaction_uom, mmt.secondary_transaction_quantity, mmt.secondary_uom_code , mtrl.header_id, mtrl.line_id, mtrl.line_number FROM mtl_material_transactions mmt, mtl_txn_request_lines mtrl WHERE mmt.pick_slip_number IS NOT NULL AND nvl(mmt.transaction_quantity,0) < 0 AND mmt.move_order_line_id = mtrl.line_id AND mtrl.organization_id = :p_organization_id AND 1=1 and 1=1 ) wpsv, */ wsh_delivery_details wdd,