DBA Data[Home] [Help]

APPS.WIP_WS_LABOR_METRIC_PUB dependencies on WIP_WS_UTIL

Line 606: wip_ws_util.trace_log('Launching Labor Metrics Calculation for Organization: '||l_org_code);

602: into l_org_code
603: from mtl_parameters
604: where organization_id = p_organization_id;
605:
606: wip_ws_util.trace_log('Launching Labor Metrics Calculation for Organization: '||l_org_code);
607:
608: l_stmt_num :=20;
609:
610: /* If the calculation program is running for this org already, then error out.

Line 625: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

621: if (l_pgm_count > 1) then
622: fnd_message.set_name('WIP','WIP_RUNNING_LABOR_PRG');
623: fnd_message.set_token('ORG', to_char(l_org_code));
624: x_error_msg := fnd_message.get;
625: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
626: wip_ws_util.trace_log('Unable to run calculation program for this organization. Please try after some time.');
627: retcode := 2;
628: l_conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',
629: 'Errors encountered in calculation program, please check the log file.');

Line 626: wip_ws_util.trace_log('Unable to run calculation program for this organization. Please try after some time.');

622: fnd_message.set_name('WIP','WIP_RUNNING_LABOR_PRG');
623: fnd_message.set_token('ORG', to_char(l_org_code));
624: x_error_msg := fnd_message.get;
625: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
626: wip_ws_util.trace_log('Unable to run calculation program for this organization. Please try after some time.');
627: retcode := 2;
628: l_conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',
629: 'Errors encountered in calculation program, please check the log file.');
630: return;

Line 648: wip_ws_util.trace_log('Calendar: '||l_calendar_code);

644: window_end_time := get_period_end(l_calendar_code,l_current_date);
645: window_start_time := get_period_start(p_organization_id,window_end_time);
646:
647: if (g_logLevel <= wip_constants.trace_logging) then
648: wip_ws_util.trace_log('Calendar: '||l_calendar_code);
649: wip_ws_util.trace_log('Start Time: '||to_char(window_start_time,WIP_CONSTANTS.DATETIME_FMT));
650: wip_ws_util.trace_log('End Time: '||to_char(window_end_time,WIP_CONSTANTS.DATETIME_FMT));
651: wip_ws_util.trace_log('Base Time UOM: '||l_bom_uom_code);
652: end if;

Line 649: wip_ws_util.trace_log('Start Time: '||to_char(window_start_time,WIP_CONSTANTS.DATETIME_FMT));

645: window_start_time := get_period_start(p_organization_id,window_end_time);
646:
647: if (g_logLevel <= wip_constants.trace_logging) then
648: wip_ws_util.trace_log('Calendar: '||l_calendar_code);
649: wip_ws_util.trace_log('Start Time: '||to_char(window_start_time,WIP_CONSTANTS.DATETIME_FMT));
650: wip_ws_util.trace_log('End Time: '||to_char(window_end_time,WIP_CONSTANTS.DATETIME_FMT));
651: wip_ws_util.trace_log('Base Time UOM: '||l_bom_uom_code);
652: end if;
653:

Line 650: wip_ws_util.trace_log('End Time: '||to_char(window_end_time,WIP_CONSTANTS.DATETIME_FMT));

646:
647: if (g_logLevel <= wip_constants.trace_logging) then
648: wip_ws_util.trace_log('Calendar: '||l_calendar_code);
649: wip_ws_util.trace_log('Start Time: '||to_char(window_start_time,WIP_CONSTANTS.DATETIME_FMT));
650: wip_ws_util.trace_log('End Time: '||to_char(window_end_time,WIP_CONSTANTS.DATETIME_FMT));
651: wip_ws_util.trace_log('Base Time UOM: '||l_bom_uom_code);
652: end if;
653:
654: l_stmt_num :=40;

Line 651: wip_ws_util.trace_log('Base Time UOM: '||l_bom_uom_code);

647: if (g_logLevel <= wip_constants.trace_logging) then
648: wip_ws_util.trace_log('Calendar: '||l_calendar_code);
649: wip_ws_util.trace_log('Start Time: '||to_char(window_start_time,WIP_CONSTANTS.DATETIME_FMT));
650: wip_ws_util.trace_log('End Time: '||to_char(window_end_time,WIP_CONSTANTS.DATETIME_FMT));
651: wip_ws_util.trace_log('Base Time UOM: '||l_bom_uom_code);
652: end if;
653:
654: l_stmt_num :=40;
655: /* Check for the metrics preferences and its requirement: Start */

Line 785: wip_ws_util.trace_log('Metric 1: '||log_metric1);

781: l_stmt_num :=50;
782:
783: if (g_logLevel <= wip_constants.trace_logging) then
784:
785: wip_ws_util.trace_log('Metric 1: '||log_metric1);
786: wip_ws_util.trace_log('Metric 2: '||log_metric2);
787: wip_ws_util.trace_log('Metric 3: '||log_metric3);
788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);

Line 786: wip_ws_util.trace_log('Metric 2: '||log_metric2);

782:
783: if (g_logLevel <= wip_constants.trace_logging) then
784:
785: wip_ws_util.trace_log('Metric 1: '||log_metric1);
786: wip_ws_util.trace_log('Metric 2: '||log_metric2);
787: wip_ws_util.trace_log('Metric 3: '||log_metric3);
788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);
790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);

Line 787: wip_ws_util.trace_log('Metric 3: '||log_metric3);

783: if (g_logLevel <= wip_constants.trace_logging) then
784:
785: wip_ws_util.trace_log('Metric 1: '||log_metric1);
786: wip_ws_util.trace_log('Metric 2: '||log_metric2);
787: wip_ws_util.trace_log('Metric 3: '||log_metric3);
788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);
790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);
791: wip_ws_util.trace_log('Direct Labor Hours: '||log_dir_lab_hrs);

Line 789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);

785: wip_ws_util.trace_log('Metric 1: '||log_metric1);
786: wip_ws_util.trace_log('Metric 2: '||log_metric2);
787: wip_ws_util.trace_log('Metric 3: '||log_metric3);
788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);
790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);
791: wip_ws_util.trace_log('Direct Labor Hours: '||log_dir_lab_hrs);
792: wip_ws_util.trace_log('Earned Hours: '||log_earned_hrs);
793:

Line 790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);

786: wip_ws_util.trace_log('Metric 2: '||log_metric2);
787: wip_ws_util.trace_log('Metric 3: '||log_metric3);
788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);
790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);
791: wip_ws_util.trace_log('Direct Labor Hours: '||log_dir_lab_hrs);
792: wip_ws_util.trace_log('Earned Hours: '||log_earned_hrs);
793:
794: end if;

Line 791: wip_ws_util.trace_log('Direct Labor Hours: '||log_dir_lab_hrs);

787: wip_ws_util.trace_log('Metric 3: '||log_metric3);
788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);
790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);
791: wip_ws_util.trace_log('Direct Labor Hours: '||log_dir_lab_hrs);
792: wip_ws_util.trace_log('Earned Hours: '||log_earned_hrs);
793:
794: end if;
795:

Line 792: wip_ws_util.trace_log('Earned Hours: '||log_earned_hrs);

788:
789: wip_ws_util.trace_log('Actual Attendance Hours: '||log_act_avl_hrs);
790: wip_ws_util.trace_log('Scheduled Available Hours: '||log_sch_avl_hrs);
791: wip_ws_util.trace_log('Direct Labor Hours: '||log_dir_lab_hrs);
792: wip_ws_util.trace_log('Earned Hours: '||log_earned_hrs);
793:
794: end if;
795:
796: /* Check for the metrics preferences and its requirement: End */

Line 807: wip_ws_util.trace_log('Deleted Existing records for this Organization.');

803:
804: l_stmt_num :=60;
805:
806: if (g_logLevel <= wip_constants.trace_logging) then
807: wip_ws_util.trace_log('Deleted Existing records for this Organization.');
808: end if;
809: /* calculate the metrics for every employee associated to any of
810: the department for this organization. */
811: new_index :=0;

Line 815: wip_ws_util.trace_log('Calculation for Emp with Dep_Id: '||to_char(employee.department_id)

811: new_index :=0;
812: for employee in employees(p_organization_id) Loop
813:
814: if (g_logLevel <= wip_constants.trace_logging) then
815: wip_ws_util.trace_log('Calculation for Emp with Dep_Id: '||to_char(employee.department_id)
816: ||' Res_Id: '||to_char(employee.resource_id)
817: ||' Pers_Id: '||to_char(employee.person_id));
818: end if;
819:

Line 845: wip_ws_util.trace_log('Employee Shift Info: '||emp_index);

841: v_emp_perf_temp(emp_index).dir_lab_hrs :=0;
842: v_emp_perf_temp(emp_index).sch_avl_hrs :=0;
843: v_emp_perf_temp(emp_index).earned_hrs :=0;
844: if (g_logLevel <= wip_constants.trace_logging) then
845: wip_ws_util.trace_log('Employee Shift Info: '||emp_index);
846: end if;
847: end loop;
848: if (g_logLevel <= wip_constants.trace_logging) then
849: wip_ws_util.trace_log('Re-Creating Shift Information for Employee');

Line 849: wip_ws_util.trace_log('Re-Creating Shift Information for Employee');

845: wip_ws_util.trace_log('Employee Shift Info: '||emp_index);
846: end if;
847: end loop;
848: if (g_logLevel <= wip_constants.trace_logging) then
849: wip_ws_util.trace_log('Re-Creating Shift Information for Employee');
850: end if;
851: else
852: l_stmt_num :=90;
853: emp_index := v_emp_perf_temp.first;

Line 863: wip_ws_util.trace_log('Re-Using Shift Information for Employee');

859: emp_index := v_emp_perf_temp.next(emp_index);
860: end loop;
861:
862: if (g_logLevel <= wip_constants.trace_logging) then
863: wip_ws_util.trace_log('Re-Using Shift Information for Employee');
864: end if;
865: end if;
866:
867: if l_act_avl_hrs_required then /* Calculate actual available hours here. */

Line 895: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

891: if (g_logLevel <= wip_constants.trace_logging) then
892: fnd_message.set_name('WIP','WIP_LM_TIME_UOM');
893: fnd_message.set_token('EMP', to_char(employee.person_id));
894: x_error_msg := fnd_message.get;
895: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
896: --l_error_count := l_error_count + 1;
897: end if;
898: is_aah_record_valid := false;
899: end if;

Line 921: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||

917: v_emp_perf_temp(to_char(l_date_seq||':'||l_shift_num)).act_att_hrs :=
918: v_emp_perf_temp(to_char(l_date_seq||':'||l_shift_num)).act_att_hrs+l_act_att_hrs;
919:
920: if (g_logLevel <= wip_constants.trace_logging) then
921: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||
922: ' Res: '||to_char(employee.resource_id)||
923: ' Pers: '||to_char(employee.person_id)||
924: ' Date: '||to_char(emp_act_avl_hrs.actual_date,WIP_CONSTANTS.DATETIME_FMT)||
925: ' Shift Seq: '||to_char(l_date_seq)||

Line 969: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

965: if (g_logLevel <= wip_constants.trace_logging) then
966: fnd_message.set_name('WIP','WIP_LM_TIME_UOM');
967: fnd_message.set_token('EMP', to_char(employee.person_id));
968: x_error_msg := fnd_message.get;
969: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
970: --l_error_count := l_error_count + 1;
971: end if;
972: is_sah_record_valid :=false;
973: end if;

Line 995: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||

991: v_emp_perf_temp(to_char(l_date_seq||':'||l_shift_num)).sch_avl_hrs :=
992: v_emp_perf_temp(to_char(l_date_seq||':'||l_shift_num)).sch_avl_hrs+l_sch_avl_hrs;
993:
994: if (g_logLevel <= wip_constants.trace_logging) then
995: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||
996: ' Res: '||to_char(employee.resource_id)||
997: ' Pers: '||to_char(employee.person_id)||
998: ' Date: '||to_char(emp_sch_avl_hrs.actual_date,WIP_CONSTANTS.DATETIME_FMT)||
999: ' Shift Seq: '||to_char(l_date_seq)||

Line 1038: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

1034: if (g_logLevel <= wip_constants.trace_logging) then
1035: fnd_message.set_name('WIP','WIP_LM_TIME_UOM');
1036: fnd_message.set_token('EMP', to_char(employee.person_id));
1037: x_error_msg := fnd_message.get;
1038: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1039: --l_error_count := l_error_count + 1;
1040: end if;
1041: is_dlh_record_valid :=false;
1042: end if;

Line 1066: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||

1062: v_emp_perf_temp(to_char(l_date_seq||':'||l_shift_num)).dir_lab_hrs :=
1063: v_emp_perf_temp(to_char(l_date_seq||':'||l_shift_num)).dir_lab_hrs+l_dir_lab_hrs;
1064:
1065: if (g_logLevel <= wip_constants.trace_logging) then
1066: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||
1067: ' Res: '||to_char(employee.resource_id)||
1068: ' Pers: '||to_char(employee.person_id)||
1069: ' Date: '||to_char(emp_dir_lab_hrs.actual_date,WIP_CONSTANTS.DATETIME_FMT)||
1070: ' Shift Seq: '||to_char(l_date_seq)||

Line 1115: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

1111: if (g_logLevel <= wip_constants.trace_logging) then
1112: fnd_message.set_name('WIP','WIP_LM_TIME_UOM');
1113: fnd_message.set_token('EMP', to_char(employee.person_id));
1114: x_error_msg := fnd_message.get;
1115: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1116: --l_error_count := l_error_count + 1;
1117: end if;
1118: is_eh_record_valid := false;
1119: end if;

Line 1125: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

1121: if (g_logLevel <= wip_constants.trace_logging) then
1122: fnd_message.set_name('WIP','WIP_LM_LOT_BASED_RES');
1123: fnd_message.set_token('EMP', to_char(employee.person_id));
1124: x_error_msg := fnd_message.get;
1125: wip_ws_util.trace_log(l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1126: --l_error_count := l_error_count + 1;
1127: end if;
1128: is_eh_record_valid := false;
1129: end if;

Line 1149: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||

1145: v_emp_perf_temp(emp_clock_rec.emp_index).earned_hrs :=
1146: v_emp_perf_temp(emp_clock_rec.emp_index).earned_hrs+l_earned_hrs;
1147:
1148: if (g_logLevel <= wip_constants.trace_logging) then
1149: wip_ws_util.trace_log('Dep: '||to_char(employee.department_id)||
1150: ' Res: '||to_char(employee.resource_id)||
1151: ' Pers: '||to_char(employee.person_id)||
1152: ' Index: '||to_char(emp_clock_rec.emp_index)||
1153: ' Move Qty: '||to_char(emp_earned_hrs.moved_qty)||

Line 1230: wip_ws_util.trace_log(' Calculation Completed for employee Dep: '||to_char(employee.department_id)||

1226: end loop;
1227: l_stmt_num :=360;
1228:
1229: if (g_logLevel <= wip_constants.trace_logging) then
1230: wip_ws_util.trace_log(' Calculation Completed for employee Dep: '||to_char(employee.department_id)||
1231: ' Res: '||to_char(employee.resource_id)||
1232: ' Pers: '||to_char(employee.person_id));
1233: end if;
1234: l_stmt_num :=370;

Line 1249: wip_ws_util.trace_log('Insertion of all calculated records is successful.');

1245: INSERT into WIP_LABOR_PERFORMANCE_RATES values v_wip_lab_perf_rate(cntr);
1246:
1247: l_stmt_num :=390;
1248: if (g_logLevel <= wip_constants.trace_logging) then
1249: wip_ws_util.trace_log('Insertion of all calculated records is successful.');
1250: end if;
1251:
1252: /* Since attendance hours is entered for an employee at org level and distributed across all departments
1253: if the employee is associated to multiple departments. So org level attendance hours will be over shooted

Line 1294: wip_ws_util.trace_log('Computed Org Level Summary Data.');

1290: t.shift_num;
1291:
1292: l_stmt_num :=400;
1293: if (g_logLevel <= wip_constants.trace_logging) then
1294: wip_ws_util.trace_log('Computed Org Level Summary Data.');
1295: end if;
1296:
1297: /* Insert into Metrics Table the org level summary data. Use -1 for dept,res and employee */
1298: forall org_index in v_shift_num.first..v_shift_num.last

Line 1351: wip_ws_util.trace_log('Insertion of Org Level Summary Data is successful.');

1347: 1);
1348:
1349: l_stmt_num :=400;
1350: if (g_logLevel <= wip_constants.trace_logging) then
1351: wip_ws_util.trace_log('Insertion of Org Level Summary Data is successful.');
1352: end if;
1353:
1354: end if; /* l_metric1_required or l_metric2_required or l_metric3_required */
1355:

Line 1357: wip_ws_util.trace_log('Labor Metrics Calculation completed.');

1353:
1354: end if; /* l_metric1_required or l_metric2_required or l_metric3_required */
1355:
1356: l_stmt_num :=410;
1357: wip_ws_util.trace_log('Labor Metrics Calculation completed.');
1358:
1359: commit;
1360:
1361: if l_error_count=0 then

Line 1380: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

1376: l_conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',errbuf);
1377: when others then
1378: fnd_message.set_name('WIP','WIP_LAB_UNEXPECTED_ERROR');
1379: x_error_msg := fnd_message.get;
1380: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1381: x_error_msg := sqlerrm(sqlcode);
1382: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1383: rollback;
1384: retcode := 2;

Line 1382: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);

1378: fnd_message.set_name('WIP','WIP_LAB_UNEXPECTED_ERROR');
1379: x_error_msg := fnd_message.get;
1380: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1381: x_error_msg := sqlerrm(sqlcode);
1382: wip_ws_util.trace_log('Error in '||l_proc_name||'( stmt_num: '||l_stmt_num||') '||x_error_msg);
1383: rollback;
1384: retcode := 2;
1385: errbuf := 'Errors encountered in calculation program, please check the log file.';
1386: l_conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',errbuf);