DBA Data[Home] [Help]

APPS.PA_CALENDAR_UTILS dependencies on FND_API

Line 42: x_return_status := FND_API.G_RET_STS_SUCCESS;

38:
39: BEGIN
40: l_I := 1;
41: -- Storing the status for error handling
42: x_return_status := FND_API.G_RET_STS_SUCCESS;
43:
44: -- Setup the cursor fetch loop
45: FOR v_c1 IN C1 LOOP
46: x_cal_record_tab(l_I).seq_num := v_c1.shift_sequence_number;

Line 98: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

94: END IF;
95:
96: EXCEPTION
97: WHEN OTHERS THEN
98: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
99: x_msg_count := 1 ; -- 4537865
100: x_msg_data := SUBSTRB(SQLERRM,1,240); -- 4537865
101: FND_MSG_PUB.add_exc_msg(p_pkg_name =>'PA_CALENDAR_UTILS',
102: p_procedure_name => 'get_calendar_shifts');

Line 134: x_return_status := FND_API.G_RET_STS_SUCCESS;

130: BEGIN
131: l_I := 1;
132:
133: -- Storing the status for error handling
134: x_return_status := FND_API.G_RET_STS_SUCCESS;
135:
136: -- Setup the cursor fetch loop
137: FOR v_c1 IN C1 LOOP
138: x_cal_except_record_tab(l_I).exception_id := v_c1.exception_id;

Line 149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

145:
146:
147: EXCEPTION
148: WHEN OTHERS THEN
149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
150: x_msg_count := 1 ; -- 4537865
151: x_msg_data := SUBSTRB(SQLERRM,1,240); -- 4537865
152: FND_MSG_PUB.add_exc_msg(p_pkg_name =>'PA_CALENDAR_UTILS',
153: p_procedure_name => 'get_calendar_except');

Line 188: x_return_status := FND_API.G_RET_STS_SUCCESS;

184: BEGIN
185: l_J := 1;
186:
187: -- Storing the status for error handling
188: x_return_status := FND_API.G_RET_STS_SUCCESS;
189:
190: -- if the passing calendar table type record does not have any record
191: IF (p_cal_record_tab.count = 0) THEN
192: Raise l_empty_tab_record;

Line 271: x_return_status := FND_API.G_RET_STS_SUCCESS;

267: END LOOP;
268:
269: EXCEPTION
270: WHEN l_empty_tab_record THEN -- the calendar table of record does not have any record
271: x_return_status := FND_API.G_RET_STS_SUCCESS;
272: NULL;
273: WHEN NO_DATA_FOUND THEN -- if the passed calendar does not exist in the table
274: x_return_status := FND_API.G_RET_STS_ERROR;
275: x_msg_data := 'Invalid Calendar Id '||p_calendar_id;

Line 274: x_return_status := FND_API.G_RET_STS_ERROR;

270: WHEN l_empty_tab_record THEN -- the calendar table of record does not have any record
271: x_return_status := FND_API.G_RET_STS_SUCCESS;
272: NULL;
273: WHEN NO_DATA_FOUND THEN -- if the passed calendar does not exist in the table
274: x_return_status := FND_API.G_RET_STS_ERROR;
275: x_msg_data := 'Invalid Calendar Id '||p_calendar_id;
276: NULL;
277: WHEN OTHERS THEN
278: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 278: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

274: x_return_status := FND_API.G_RET_STS_ERROR;
275: x_msg_data := 'Invalid Calendar Id '||p_calendar_id;
276: NULL;
277: WHEN OTHERS THEN
278: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
279: x_msg_count := 1 ; -- 4537865
280: x_msg_data := SUBSTRB(SQLERRM,1,240); -- 4537865
281: FND_MSG_PUB.add_exc_msg(p_pkg_name =>'PA_CALENDAR_UTILS',
282: p_procedure_name => 'gen_calendar_sch');

Line 323: l_x_return_status := FND_API.G_RET_STS_SUCCESS;

319: excep_days_count NUMBER;
320: BEGIN
321:
322: -- Storing the status for error handling
323: l_x_return_status := FND_API.G_RET_STS_SUCCESS;
324: x_return_status := FND_API.G_RET_STS_SUCCESS; -- 4537865
325: -- Storing the record for using this table of record in forther calculation
326: PA_SCHEDULE_UTILS.copy_schedule_rec_tab(p_sch_record_tab,p_sch_record_tab.first,p_sch_record_tab.last,
327: x_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);

Line 324: x_return_status := FND_API.G_RET_STS_SUCCESS; -- 4537865

320: BEGIN
321:
322: -- Storing the status for error handling
323: l_x_return_status := FND_API.G_RET_STS_SUCCESS;
324: x_return_status := FND_API.G_RET_STS_SUCCESS; -- 4537865
325: -- Storing the record for using this table of record in forther calculation
326: PA_SCHEDULE_UTILS.copy_schedule_rec_tab(p_sch_record_tab,p_sch_record_tab.first,p_sch_record_tab.last,
327: x_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);
328:

Line 359: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

355: (p_cal_except_record_tab(l_I).except_start_date+i > x_sch_record_tab(l_J).end_date) ) THEN
356:
357: -- PA_SCHEDULE_UTILS.log_message(1,'inside exp_dt < sch_st_dt or exp_dt > sch_end_dt ');
358: -- storing this record in temp variable to copy in final variable
359: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
360: PA_SCHEDULE_UTILS.add_schedule_rec_tab(x_sch_record_tab,l_j,l_j,l_out_sch_record_tab,l_x_return_status,
361: x_msg_count,x_msg_data);
362: END IF;
363:

Line 372: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

368: PA_SCHEDULE_UTILS.log_message(1,'inside exp_dt >= sch_st_dt AND exp_dt <= sch_end_dt ');
369:
370: l_shift_change := TRUE;
371: -- storing the value in temp variable and using in updation of schedule record which are without exception
372: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
373: PA_SCHEDULE_UTILS.copy_schedule_rec_tab(x_sch_record_tab,l_J,l_J,l_temp_sch_record_tab,
374: l_x_return_status,x_msg_count,x_msg_data );
375: END IF;
376:

Line 378: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

374: l_x_return_status,x_msg_count,x_msg_data );
375: END IF;
376:
377: -- storing the value in temp variable and using in updation of schedule record which are with exception
378: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
379: PA_SCHEDULE_UTILS.copy_schedule_rec_tab(x_sch_record_tab,l_J,l_J,l_temp_exp_sch_record_tab,
380: l_x_return_status,x_msg_count,x_msg_data );
381: END IF;
382:

Line 391: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

387: IF((x_sch_record_tab(l_J).start_date = p_cal_except_record_tab(l_I).except_start_date+i AND
388: x_sch_record_tab(l_J).end_date = p_cal_except_record_tab(l_I).except_start_date+i )) THEN
389:
390: -- updating that schedule record with zero hours and keeping start date and end date is same
391: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
392: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_exp_sch_record_tab,
393: p_start_date => p_cal_except_record_tab(l_I).except_start_date+i
394: ,p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i,p_monday_hours =>0,p_tuesday_hours =>0,
395: p_wednesday_hours =>0,p_thursday_hours =>0,p_friday_hours =>0,p_saturday_hours =>0,p_sunday_hours =>0,

Line 399: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

395: p_wednesday_hours =>0,p_thursday_hours =>0,p_friday_hours =>0,p_saturday_hours =>0,p_sunday_hours =>0,
396: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);
397: END IF;
398: -- adding in other temp variable just to copy in final variable
399: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
400: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_exp_sch_record_tab,l_temp_first,l_temp_last,
401: l_out_sch_record_tab,l_x_return_status, x_msg_count,x_msg_data);
402: END IF;
403:

Line 408: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

404: /* Exception date is on the start date and breaking that record in two records one with the zero
405: schedule and other with the defined schedule */
406: ELSIF ( x_sch_record_tab(l_J).start_date = p_cal_except_record_tab(l_I).except_start_date+i ) THEN
407:
408: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
409: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_exp_sch_record_tab,
410: p_start_date => p_cal_except_record_tab(l_I).except_start_date+i
411: ,p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i,p_monday_hours =>0,p_tuesday_hours =>0,
412: p_wednesday_hours =>0,p_thursday_hours =>0,p_friday_hours =>0,p_saturday_hours =>0,

Line 417: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

413: p_sunday_hours =>0,x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,
414: x_msg_data =>x_msg_data);
415: END IF;
416:
417: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
418: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_exp_sch_record_tab,l_temp_first,l_temp_last,
419: l_out_sch_record_tab,l_x_return_status, x_msg_count,x_msg_data);
420: END IF;
421:

Line 422: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

418: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_exp_sch_record_tab,l_temp_first,l_temp_last,
419: l_out_sch_record_tab,l_x_return_status, x_msg_count,x_msg_data);
420: END IF;
421:
422: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
423: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_sch_record_tab,
424: p_start_date =>p_cal_except_record_tab(l_I).except_start_date+i + 1 ,
425: p_end_date =>x_sch_record_tab(l_J).end_date,x_return_status =>l_x_return_status,
426: x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);

Line 429: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

425: p_end_date =>x_sch_record_tab(l_J).end_date,x_return_status =>l_x_return_status,
426: x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);
427: END IF;
428:
429: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
430: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_sch_record_tab,l_temp_first,l_temp_last,
431: l_out_sch_record_tab,l_x_return_status, x_msg_count,x_msg_data);
432: END IF;
433:

Line 440: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

436: and ending date is also exception but with zero hours and last having start date with just after
437: the exception date and end date is passed end date */
438: ELSIF (p_cal_except_record_tab(l_I).except_start_date+i < x_sch_record_tab(l_J).end_date ) THEN
439:
440: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
441: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_sch_record_tab,
442: p_start_date =>x_sch_record_tab(l_J).start_date ,
443: p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i - 1,
444: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);

Line 447: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

443: p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i - 1,
444: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);
445: END IF;
446:
447: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
448: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_sch_record_tab,l_temp_first,l_temp_last,
449: l_out_sch_record_tab,l_x_return_status,
450: x_msg_count,x_msg_data);
451: END IF;

Line 453: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

449: l_out_sch_record_tab,l_x_return_status,
450: x_msg_count,x_msg_data);
451: END IF;
452:
453: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
454: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_exp_sch_record_tab,
455: p_start_date => p_cal_except_record_tab(l_I). except_start_date+i
456: ,p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i,p_monday_hours =>0,p_tuesday_hours =>0,
457: p_wednesday_hours =>0,p_thursday_hours =>0,p_friday_hours =>0,p_saturday_hours =>0,

Line 462: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

458: p_sunday_hours =>0,x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,
459: x_msg_data =>x_msg_data);
460: END IF;
461:
462: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
463: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_exp_sch_record_tab,l_temp_first,l_temp_last,
464: l_out_sch_record_tab,l_x_return_status, x_msg_count,x_msg_data);
465: END IF;
466:

Line 467: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

463: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_exp_sch_record_tab,l_temp_first,l_temp_last,
464: l_out_sch_record_tab,l_x_return_status, x_msg_count,x_msg_data);
465: END IF;
466:
467: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
468: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_sch_record_tab,
469: p_start_date =>p_cal_except_record_tab(l_I).except_start_date+i + 1 ,
470: p_end_date =>x_sch_record_tab(l_J).end_date,
471: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);

Line 474: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

470: p_end_date =>x_sch_record_tab(l_J).end_date,
471: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);
472: END IF;
473:
474: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
475: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_sch_record_tab,l_temp_first,l_temp_last,
476: l_out_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);
477: END IF;
478:

Line 484: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

480: it is and end date is just before the exception date the other having start date is
481: the exception date and end date is also the exception date i.e. end date of the previous schedule*/
482: ELSIF (p_cal_except_record_tab(l_I).except_start_date+i = x_sch_record_tab(l_J).end_date) THEN
483:
484: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
485: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_sch_record_tab,
486: p_start_date =>x_sch_record_tab(l_J).start_date ,
487: p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i - 1,
488: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);

Line 491: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

487: p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i - 1,
488: x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,x_msg_data =>x_msg_data);
489: END IF;
490:
491: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
492: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_sch_record_tab,l_temp_first,l_temp_last,
493: l_out_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);
494: END IF;
495:

Line 496: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

492: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_sch_record_tab,l_temp_first,l_temp_last,
493: l_out_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);
494: END IF;
495:
496: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
497: PA_SCHEDULE_UTILS.update_sch_rec_tab(px_sch_record_tab =>l_temp_exp_sch_record_tab,
498: p_start_date => p_cal_except_record_tab(l_I). except_start_date+i
499: ,p_end_date =>p_cal_except_record_tab(l_I).except_start_date+i,p_monday_hours =>0,p_tuesday_hours =>0,
500: p_wednesday_hours =>0,p_thursday_hours =>0,p_friday_hours =>0,p_saturday_hours =>0,

Line 505: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

501: p_sunday_hours =>0,x_return_status =>l_x_return_status,x_msg_count =>x_msg_count,
502: x_msg_data =>x_msg_data);
503: END IF;
504:
505: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
506: PA_SCHEDULE_UTILS.add_schedule_rec_tab(l_temp_exp_sch_record_tab,l_temp_first,l_temp_last,
507: l_out_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);
508: END IF;
509:

Line 516: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

512: IF (l_J <> x_sch_record_tab.last ) THEN
513: l_temp_next := x_sch_record_tab.next(l_J);
514: l_temp_last := x_sch_record_tab.last;
515:
516: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
517: PA_SCHEDULE_UTILS.add_schedule_rec_tab(x_sch_record_tab,l_temp_next,l_temp_last,
518: l_out_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data );
519: END IF;
520: END IF;

Line 533: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

529:
530: END LOOP;
531:
532: IF (l_shift_change) THEN
533: IF (l_x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
534: -- finaly copying the records from temp variable to the actual variable
535: PA_SCHEDULE_UTILS.copy_schedule_rec_tab(l_out_sch_record_tab,l_out_sch_record_tab.first,
536: l_out_sch_record_tab.last,x_sch_record_tab,l_x_return_status,x_msg_count,x_msg_data);
537: END IF;

Line 560: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

556: EXCEPTION
557: WHEN l_empty_tab_record THEN
558: NULL;
559: WHEN OTHERS THEN
560: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
561: x_msg_count := 1 ; -- 4537865
562: x_msg_data := SUBSTRB(SQLERRM,1,240); -- 4537865
563: FND_MSG_PUB.add_exc_msg(p_pkg_name =>'PA_CALENDAR_UTILS',
564: p_procedure_name => 'apply_calendar_except');

Line 600: x_return_status := FND_API.G_RET_STS_ERROR;

596:
597: /* Bug 2887390 : Added the following condition */
598: IF (p_calendar_id is NULL and p_calendar_name is NULL) THEN
599: x_calendar_id := NULL;
600: x_return_status := FND_API.G_RET_STS_ERROR;
601: x_error_message_code := 'PA_CALENDAR_ID_INVALID';
602: return;
603: END IF;
604:

Line 657: x_return_status:= FND_API.G_RET_STS_SUCCESS;

653: x_calendar_id := NULL;
654: END IF;
655: END IF;
656:
657: x_return_status:= FND_API.G_RET_STS_SUCCESS;
658:
659: EXCEPTION
660: WHEN NO_DATA_FOUND THEN
661: x_calendar_id := NULL;

Line 662: x_return_status := FND_API.G_RET_STS_ERROR;

658:
659: EXCEPTION
660: WHEN NO_DATA_FOUND THEN
661: x_calendar_id := NULL;
662: x_return_status := FND_API.G_RET_STS_ERROR;
663: x_error_message_code := 'PA_CALENDAR_ID_INVALID';
664: WHEN TOO_MANY_ROWS THEN
665: x_calendar_id := NULL;
666: x_return_status := FND_API.G_RET_STS_ERROR;

Line 666: x_return_status := FND_API.G_RET_STS_ERROR;

662: x_return_status := FND_API.G_RET_STS_ERROR;
663: x_error_message_code := 'PA_CALENDAR_ID_INVALID';
664: WHEN TOO_MANY_ROWS THEN
665: x_calendar_id := NULL;
666: x_return_status := FND_API.G_RET_STS_ERROR;
667: x_error_message_code := 'PA_CALENDAR_NOT_UNIQUE';
668: WHEN OTHERS THEN
669: x_calendar_id := NULL;
670: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 670: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

666: x_return_status := FND_API.G_RET_STS_ERROR;
667: x_error_message_code := 'PA_CALENDAR_NOT_UNIQUE';
668: WHEN OTHERS THEN
669: x_calendar_id := NULL;
670: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
671: -- 4537865 : reset x_error_message_code also
672: x_error_message_code := SQLCODE ;
673:
674: FND_MSG_PUB.add_exc_msg(p_pkg_name =>'PA_CALENDAR_UTILS',