[Home] [Help]
602: -- this location.
603: -- BUG 3377958 Madhuri
604: -- Pick the organization name
605: g_proc := 'Fetch Organization Name';
606: l_org_name :=GHR_MRE_PKG.GET_ORGANIZATION_NAME(P_ORGANIZATION_ID);
607: -- BUG 3377958 Madhuri
608: IF upper(p_action) = 'REPORT' AND l_submit_flag = 'P' THEN
609: -- BUG 3377958 Madhuri
610: pop_dtls_from_pa_req(p_person_id,l_effective_date,l_mass_salary_id,l_org_name);
2151: l_check_grade_retention VARCHAR2(200);
2152: BEGIN
2153: g_proc := 'get_pay_plan_and_table_id';
2154: hr_utility.set_location('Entering ' || l_proc,5);
2155: ghr_mre_pkg.pr('Entering ',l_proc,'ACTION '||p_action);
2156: -- Bug# 4126137,4179270,4086677
2157: l_check_grade_retention := CHECK_GRADE_RETENTION(P_PRD,P_PERSON_ID,P_EFFECTIVE_DATE);
2158:
2159: IF p_action = 'CREATE' THEN
2167: end loop;
2168:
2169: l_line := 20;
2170: hr_utility.set_location('Got grade or level and pay plan',2);
2171: ghr_mre_pkg.pr('Got grade or level and pay plan');
2172:
2173: ghr_history_fetch.fetch_positionei
2174: (p_position_id => p_position_id
2175: ,p_information_type => 'GHR_US_POS_VALID_GRADE'
2180: l_line := 30;
2181: P_PAY_table_id := l_pos_ei_data.poei_information5;
2182: P_PAY_BASIS := l_pos_ei_data.poei_information6;
2183:
2184: ghr_mre_pkg.pr(' Before fetch asgei', to_char(p_assignment_id));
2185:
2186: ghr_history_fetch.fetch_asgei
2187: (p_assignment_id => p_assignment_id
2188: ,p_information_type => 'GHR_US_ASG_SF52'
2195:
2196: ELSIF l_check_grade_retention = 'REGULAR' THEN
2197: hr_utility.set_location('Grade retention is regular',1);
2198:
2199: ghr_mre_pkg.pr('Grade retention is regular',1);
2200:
2201: FOR c_grade_kff_rec IN c_grade_kff (p_grade_id)
2202: LOOP
2203: p_pay_plan := c_grade_kff_rec.segment1;
2206: end loop;
2207:
2208: hr_utility.set_location('Got grade or level and pay plan',2);
2209:
2210: ghr_mre_pkg.pr('Got grade or level and pay plan',2);
2211:
2212: l_line := 50;
2213: ghr_history_fetch.fetch_positionei
2214: (p_position_id => p_position_id
2221: P_PAY_BASIS := l_pos_ei_data.poei_information6;
2222:
2223: l_line := 60;
2224:
2225: ghr_mre_pkg.pr('before fetch asgei 2 ',to_char(p_assignment_id));
2226:
2227: ghr_history_fetch.fetch_asgei
2228: (p_assignment_id => p_assignment_id
2229: ,p_information_type => 'GHR_US_ASG_SF52'
2239: --
2240: hr_utility.set_location('Before get retained grade',4);
2241:
2242: l_line := 80;
2243: ghr_mre_pkg.pr('Retained prd ',P_PRD);
2244:
2245: ghr_mre_pkg.pr('before get retained grade 2 ',to_char(p_person_id));
2246:
2247: BEGIN
2241:
2242: l_line := 80;
2243: ghr_mre_pkg.pr('Retained prd ',P_PRD);
2244:
2245: ghr_mre_pkg.pr('before get retained grade 2 ',to_char(p_person_id));
2246:
2247: BEGIN
2248: l_retained_grade_rec :=
2249: ghr_pc_basic_pay.get_retained_grade_details
2261: IF p_action = 'CREATE' THEN
2262: l_mslerrbuf := 'Error in Get retained grade for Person ID'||
2263: to_char(p_person_id)||
2264: 'Error is '||' Sql Err is '|| sqlerrm(sqlcode);
2265: ghr_mre_pkg.pr('Person id '||to_char(p_person_id),'ERROR 1',l_mslerrbuf);
2266: raise msl_error;
2267: END IF;
2268: WHEN others THEN
2269: l_mslerrbuf := 'Others error in Get retained grade '||
2267: END IF;
2268: WHEN others THEN
2269: l_mslerrbuf := 'Others error in Get retained grade '||
2270: 'Error is '||' Sql Err is '|| sqlerrm(sqlcode);
2271: ghr_mre_pkg.pr('Person ID '||to_char(p_person_id),'ERROR 2',l_mslerrbuf);
2272: raise msl_error;
2273: END;
2274: l_line := 90;
2275: -- Bug#4179270,4126137,4086677 Added the following ELSIF Condition.
2330: l_check_grade_retention VARCHAR2(200);
2331: BEGIN
2332: g_proc := 'get_pay_plan_and_table_id';
2333: hr_utility.set_location('Entering ' || l_proc,5);
2334: ghr_mre_pkg.pr('Entering ',l_proc,'ACTION '||p_action);
2335: -- Bug# 4126137,4179270,4086677
2336: l_check_grade_retention := CHECK_GRADE_RETENTION(P_PRD,P_PERSON_ID,P_EFFECTIVE_DATE);
2337:
2338: IF p_action = 'CREATE' THEN
2346: end loop;
2347:
2348: l_line := 20;
2349: hr_utility.set_location('Got grade or level and pay plan',2);
2350: ghr_mre_pkg.pr('Got grade or level and pay plan');
2351:
2352: ghr_history_fetch.fetch_positionei
2353: (p_position_id => p_position_id
2354: ,p_information_type => 'GHR_US_POS_VALID_GRADE'
2373:
2374: P_PAY_table_id := l_pos_ei_data.poei_information5;
2375: P_PAY_BASIS := l_pos_ei_data.poei_information6;
2376:
2377: ghr_mre_pkg.pr(' Before fetch asgei', to_char(p_assignment_id));
2378:
2379: ghr_history_fetch.fetch_asgei
2380: (p_assignment_id => p_assignment_id
2381: ,p_information_type => 'GHR_US_ASG_SF52'
2388:
2389: ELSIF l_check_grade_retention = 'REGULAR' THEN
2390: hr_utility.set_location('Grade retention is regular',1);
2391:
2392: ghr_mre_pkg.pr('Grade retention is regular',1);
2393:
2394: FOR c_grade_kff_rec IN c_grade_kff (p_grade_id)
2395: LOOP
2396: p_pay_plan := c_grade_kff_rec.segment1;
2399: end loop;
2400:
2401: hr_utility.set_location('Got grade or level and pay plan',2);
2402:
2403: ghr_mre_pkg.pr('Got grade or level and pay plan',2);
2404:
2405: l_line := 50;
2406: ghr_history_fetch.fetch_positionei
2407: (p_position_id => p_position_id
2426: P_PAY_BASIS := l_pos_ei_data.poei_information6;
2427:
2428: l_line := 60;
2429:
2430: ghr_mre_pkg.pr('before fetch asgei 2 ',to_char(p_assignment_id));
2431:
2432: ghr_history_fetch.fetch_asgei
2433: (p_assignment_id => p_assignment_id
2434: ,p_information_type => 'GHR_US_ASG_SF52'
2444: --
2445: hr_utility.set_location('Before get retained grade',4);
2446:
2447: l_line := 80;
2448: ghr_mre_pkg.pr('Retained prd ',P_PRD);
2449:
2450: ghr_mre_pkg.pr('before get retained grade 2 ',to_char(p_person_id));
2451:
2452: BEGIN
2446:
2447: l_line := 80;
2448: ghr_mre_pkg.pr('Retained prd ',P_PRD);
2449:
2450: ghr_mre_pkg.pr('before get retained grade 2 ',to_char(p_person_id));
2451:
2452: BEGIN
2453: l_retained_grade_rec :=
2454: ghr_pc_basic_pay.get_retained_grade_details
2466: IF p_action = 'CREATE' THEN
2467: l_mslerrbuf := 'Error in Get retained grade for Person ID'||
2468: to_char(p_person_id)||
2469: 'Error is '||' Sql Err is '|| sqlerrm(sqlcode);
2470: ghr_mre_pkg.pr('Person id '||to_char(p_person_id),'ERROR 1',l_mslerrbuf);
2471: raise msl_error;
2472: END IF;
2473: WHEN others THEN
2474: l_mslerrbuf := 'Others error in Get retained grade '||
2472: END IF;
2473: WHEN others THEN
2474: l_mslerrbuf := 'Others error in Get retained grade '||
2475: 'Error is '||' Sql Err is '|| sqlerrm(sqlcode);
2476: ghr_mre_pkg.pr('Person ID '||to_char(p_person_id),'ERROR 2',l_mslerrbuf);
2477: raise msl_error;
2478: END;
2479: l_line := 85;
2480: -- Bug#5089732 Pass the to to position pay plan, grade, grade_id also.
3610: end if;
3611: **************/
3612:
3613: if p_pay_plan is null or p_pay_rate_determinant is null then
3614: ghr_mre_pkg.pr('pay plan, prd failed');
3615: return false;
3616: end if;
3617:
3618: IF p_user_table_id <> p_pay_table_id THEN
3615: return false;
3616: end if;
3617:
3618: IF p_user_table_id <> p_pay_table_id THEN
3619: ghr_mre_pkg.pr('pay table id failed');
3620: return false;
3621: END IF;
3622:
3623: FOR msl_dtl IN msl_dtl_cur(p_pay_plan, p_pay_rate_determinant)
3637: p_effective_date => p_effective_date,
3638: p_first_noa_code => nvl(g_first_noa_code,'894'),
3639: p_pay_plan => p_pay_plan
3640: ) then
3641: ghr_mre_pkg.pr('1noa failed',to_char(p_person_id));
3642: return false;
3643: ELSE
3644: ghr_mre_pkg.pr('Eligible');
3645: RETURN TRUE;
3640: ) then
3641: ghr_mre_pkg.pr('1noa failed',to_char(p_person_id));
3642: return false;
3643: ELSE
3644: ghr_mre_pkg.pr('Eligible');
3645: RETURN TRUE;
3646: end if;
3647: end if;
3648: /************ This is not required****************
3650: (p_person_id => p_person_id,
3651: p_effective_date => p_effective_date,
3652: p_second_noa_code => '894'
3653: ) then
3654: ghr_mre_pkg.pr('2noa failed',to_char(p_person_id));
3655: return false;
3656: end if;
3657:
3658: *********** This is not required****************/
4379: else
4380: l_comb_rem := p_remark_code1;
4381: end if;
4382:
4383: l_poi_desc := GHR_MRE_PKG.GET_POI_NAME (p_personnel_office_id);
4384:
4385: BEGIN
4386: l_cust_in_rec.person_id := p_person_id;
4387: l_cust_in_rec.position_id := p_position_id;
4422: EXCEPTION
4423: when others then
4424: l_mslerrbuf := 'Preview - Others error in Get retained grade '||
4425: 'Error is '||' Sql Err is '|| sqlerrm(sqlcode);
4426: ghr_mre_pkg.pr('Person ID '||to_char(p_person_id),'ERROR 2',l_mslerrbuf);
4427: raise msl_error;
4428: END;
4429: ELSIF l_check_grade_retention ='MSL_ERROR' THEN
4430: hr_utility.set_message(8301,'GHR_38927_MISSING_MA_RET_DET');
5393: --
5394: -- BUG 3377958 Madhuri
5395: -- Pick the organization name
5396: --
5397: l_org_name :=GHR_MRE_PKG.GET_ORGANIZATION_NAME(p_ORGANIZATION_ID);
5398: -- BUG 3377958 Madhuri
5399: --
5400: /*get_pos_grp1_ddf(l_position_id,
5401: l_effective_date,
7501: -- this location.
7502: -- BUG 3377958 Madhuri
7503: -- Pick the organization name
7504: g_proc := 'Fetch Organization Name';
7505: l_org_name :=GHR_MRE_PKG.GET_ORGANIZATION_NAME(P_ORGANIZATION_ID);
7506: l_ses_basic_pay := NULL;
7507: -- BUG 3377958 Madhuri
7508: IF upper(p_action) = 'REPORT' AND l_submit_flag = 'P' THEN
7509: -- BUG 3377958 Madhuri