105: if(p_location is not null) then
106:
107: select hlt.location_id
108: into p_location_id
109: from hr_locations_all_tl hlt
110: where hlt.location_code = p_location
111: and hlt.language=userenv('LANG');
112: end if;
113: if(P_NEEDBY_DATE_FROM <> to_date('1900/01/01','yyyy/mm/dd') and P_NEED_BY_DATE_TO <> to_date('9999/01/01','yyyy/mm/dd')) then
132: else
133: begin
134: select hlt.location_code
135: into x_location_code
136: from hr_locations_all_tl hlt
137: where hlt.location_id=p_location_id
138: and hlt.language=userenv('LANG');
139:
140: exception when no_data_found then