320: -- None.
321: --Function:
322: -- Retrieves the Job Name for the given Job ID.
323: -- Returns NULL if the input Job ID is NULL.
324: -- Throws error if input Job ID is not NULL but does not exist in PER_JOBS.
325: --Parameters:
326: --IN:
327: --p_job_id
328: -- Unique ID of the Job
335: -------------------------------------------------------------------------------
336: FUNCTION get_job_name ( p_job_id IN NUMBER )
337: RETURN VARCHAR2
338: IS
339: l_job_name PER_JOBS_VL.name%TYPE;
340: BEGIN
341:
342: IF ( p_job_id IS NULL )
343: THEN
345: END IF;
346:
347: SELECT name
348: INTO l_job_name
349: FROM per_jobs_vl
350: WHERE job_id = p_job_id;
351:
352: return (l_job_name);
353:
594: --SQL What: Check that ship-to org and job are in same business group
595: --SQL Why: Ensure ship-to orgs of temp labor lines are valid
596: SELECT 'Y'
597: INTO l_valid_flag
598: FROM per_jobs pj,
599: hr_all_organization_units haou,
600: mtl_parameters mp
601: WHERE pj.job_id = p_job_id
602: AND mp.organization_id = p_ship_to_org_id