558:
559: UNION ALL
560:
561: SELECT 'x'
562: FROM HZ_LOCATIONS HZ
563: WHERE PRL.deliver_to_location_id = HZ.location_id
564: AND HZ.location_id = x_ship_to_location_id
565: )
566: AND PRL.destination_organization_id = x_destination_org_id
648:
649: UNION ALL
650:
651: SELECT 'x'
652: FROM HZ_LOCATIONS HZ
653: WHERE PRL.deliver_to_location_id = HZ.location_id
654: AND HZ.location_id = x_ship_to_location_id
655: )
656: AND ( (PLI.PREFERRED_GRADE IS NULL
1945:
1946: UNION ALL
1947:
1948: SELECT 'x'
1949: FROM hz_locations hz
1950: WHERE prl.deliver_to_location_id = hz.location_id
1951: AND hz.location_id = x_ship_to_location_id
1952: ) )
1953: AND ( NVL (l_shipto_prf, 'Y') = 'N'
2610: BEGIN
2611:
2612: SELECT hzl.location_id
2613: INTO l_ship_to_location_id
2614: FROM hz_locations hzl
2615: WHERE hzl.location_id = p_deliver_to_loc_id;
2616:
2617: l_found := TRUE;
2618:
2619: EXCEPTION
2620:
2621: WHEN NO_DATA_FOUND THEN
2622: IF (po_log.d_stmt) THEN
2623: po_log.stmt (d_module, d_progress, 'No data found in hz_locations.' );
2624: END IF;
2625:
2626: END;
2627: