2370: ) IS
2371: SELECT ABS(islv.adjustment_num) adjustment_num, islv.unit_landed_cost -- SCM-051
2372: FROM inl_shipln_landed_costs_v islv,
2373: ( SELECT DISTINCT(adjustment_num) adjustment_num
2374: FROM inl_allocations
2375: WHERE allocation_id > p_max_allocation_id
2376: AND ship_header_id = p_ship_header_id
2377: UNION
2378: SELECT MAX(adjustment_num)
2375: WHERE allocation_id > p_max_allocation_id
2376: AND ship_header_id = p_ship_header_id
2377: UNION
2378: SELECT MAX(adjustment_num)
2379: FROM inl_allocations
2380: WHERE allocation_id <= p_max_allocation_id
2381: AND ship_header_id = p_ship_header_id
2382: ) alloc
2383: WHERE