[Home] [Help]
2383: when OTHERS then
2384: raise;
2385: End fetch_address ;
2386: --
2387: -- Procedure fetch_person_analyses fetches the last record from per_person_analyses or ghr_pa_history
2388: -- which was created between effective start date and effective end date
2389: --
2390: Procedure fetch_person_analyses (
2391: p_person_analysis_id in number default null,
2393: p_altered_pa_request_id in number default null,
2394: p_noa_id_corrected in number default null,
2395: p_rowid in rowid default null,
2396: p_pa_history_id in number default null,
2397: p_peranalyses_data out nocopy per_person_analyses%rowtype,
2398: p_result_code out nocopy varchar2 ) is
2399: l_peranalyses_data per_person_analyses%rowtype;
2400: l_proc varchar2(30) := 'fetch_person_analyses';
2401: l_hist_data ghr_pa_history%rowtype;
2395: p_rowid in rowid default null,
2396: p_pa_history_id in number default null,
2397: p_peranalyses_data out nocopy per_person_analyses%rowtype,
2398: p_result_code out nocopy varchar2 ) is
2399: l_peranalyses_data per_person_analyses%rowtype;
2400: l_proc varchar2(30) := 'fetch_person_analyses';
2401: l_hist_data ghr_pa_history%rowtype;
2402: l_result_code varchar2(100);
2403: cursor per_peranalyses_rowid_cursor is
2401: l_hist_data ghr_pa_history%rowtype;
2402: l_result_code varchar2(100);
2403: cursor per_peranalyses_rowid_cursor is
2404: select *
2405: from per_person_analyses
2406: where rowid = p_rowid;
2407: Begin
2408: hr_utility.set_location('Entering:'|| l_proc, 5);
2409: p_result_code := null;
3009: l_proc varchar2(72) := 'return_special_information ';
3010: l_id_flex_num fnd_id_flex_structures.id_flex_num%type;
3011: l_analysis_criteria_id per_analysis_criteria.analysis_criteria_id%type;
3012: l_session ghr_history_api.g_session_var_type;
3013: l_person_analysis_id per_person_analyses.person_analysis_id%type;
3014: l_pa_request_id ghr_pa_requests.pa_request_id%type;
3015:
3016: Cursor c_flex_num is
3017: select flx.id_flex_num
3029: FND_DATE.CANONICAL_TO_DATE(gan.information10) date_to ,
3030: pa_request_id,
3031: TO_NUMBER(gan.INFORMATION6) analysis_Criteria_id
3032: from ghr_pa_history gan , -- ghr_person_analyses_h_v gan,
3033: per_person_analyses per
3034: where gan.table_name = 'PER_PERSON_ANALYSES'
3035: and TO_NUMBER(gan.information7) = p_person_id -- information7 holds person_id
3036: and per.person_id = TO_NUMBER(gan.information7)
3037: and TO_NUMBER(gan.INFORMATION11)= l_id_flex_num -- information11 holds id_flex_Number
3030: pa_request_id,
3031: TO_NUMBER(gan.INFORMATION6) analysis_Criteria_id
3032: from ghr_pa_history gan , -- ghr_person_analyses_h_v gan,
3033: per_person_analyses per
3034: where gan.table_name = 'PER_PERSON_ANALYSES'
3035: and TO_NUMBER(gan.information7) = p_person_id -- information7 holds person_id
3036: and per.person_id = TO_NUMBER(gan.information7)
3037: and TO_NUMBER(gan.INFORMATION11)= l_id_flex_num -- information11 holds id_flex_Number
3038: and per.id_flex_num = TO_NUMBER(gan.INFORMATION11)
3047: --- Not much impact so changing the select statement.
3048:
3049: Cursor c_pan_ovn is
3050: select object_version_number
3051: from per_person_analyses pan
3052: where person_analysis_id = l_person_analysis_id;
3053:
3054: Cursor c_sit is
3055: select pea.analysis_criteria_id,