DBA Data[Home] [Help]

APPS.WIP_WS_LABOR_METRIC_PUB dependencies on WIP_CONSTANTS

Line 328: and fnd_date.canonical_to_date(to_char((bsd.shift_date + st.to_time/(60*60*24)),WIP_CONSTANTS.DATETIME_FMT)) < end_period

324: and bsd.shift_num = st.shift_num
325: and bsd.seq_num is not null
326: and bsd.calendar_code = bcs.calendar_code
327: and bsd.shift_num = bcs.shift_num
328: and fnd_date.canonical_to_date(to_char((bsd.shift_date + st.to_time/(60*60*24)),WIP_CONSTANTS.DATETIME_FMT)) < end_period
329: and brs.shift_num= bcs.shift_num
330: and brs.department_id = dept_id
331: and brs.resource_id = res_id;
332:

Line 647: if (g_logLevel <= wip_constants.trace_logging) then

643: l_calendar_code := get_calendar_code(p_organization_id);
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);

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 783: if (g_logLevel <= wip_constants.trace_logging) then

779: end loop;
780:
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);

Line 806: if (g_logLevel <= wip_constants.trace_logging) then

802: where organization_id= p_organization_id;
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. */

Line 814: if (g_logLevel <= wip_constants.trace_logging) then

810: the department for this organization. */
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;

Line 844: if (g_logLevel <= wip_constants.trace_logging) then

840: v_emp_perf_temp(emp_index).act_att_hrs :=0;
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

Line 848: if (g_logLevel <= wip_constants.trace_logging) then

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');
850: end if;
851: else
852: l_stmt_num :=90;

Line 862: if (g_logLevel <= wip_constants.trace_logging) then

858: v_emp_perf_temp(emp_index).earned_hrs :=0;
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:

Line 891: if (g_logLevel <= wip_constants.trace_logging) then

887: l_time_uom_flag := is_time_uom(emp_act_avl_hrs.uom_code);
888: l_stmt_num :=120;
889: -- Modified for bug 6972129.
890: if l_time_uom_flag = 2 then
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);

Line 920: if (g_logLevel <= wip_constants.trace_logging) then

916: if v_emp_perf_temp.exists(to_char(l_date_seq||':'||l_shift_num)) then
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)||

Line 924: ' Date: '||to_char(emp_act_avl_hrs.actual_date,WIP_CONSTANTS.DATETIME_FMT)||

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)||
926: ' Shift Num: '||to_char(l_shift_num)||
927: ' AAH Value: '||to_char(l_act_att_hrs));
928: end if;

Line 965: if (g_logLevel <= wip_constants.trace_logging) then

961: l_time_uom_flag := is_time_uom(emp_sch_avl_hrs.uom_code);
962: l_stmt_num :=180;
963: -- Modified for bug 6972129.
964: if l_time_uom_flag = 2 then
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);

Line 994: if (g_logLevel <= wip_constants.trace_logging) then

990: if v_emp_perf_temp.exists(to_char(l_date_seq||':'||l_shift_num)) then
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)||

Line 998: ' Date: '||to_char(emp_sch_avl_hrs.actual_date,WIP_CONSTANTS.DATETIME_FMT)||

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)||
1000: ' Shift Num: '||to_char(l_shift_num)||
1001: ' SAH Value: '||to_char(l_sch_avl_hrs));
1002: end if;

Line 1034: if (g_logLevel <= wip_constants.trace_logging) then

1030: l_time_uom_flag := is_time_uom(emp_dir_lab_hrs.uom_code);
1031: l_stmt_num :=230;
1032: -- Modified for bug 6972129.
1033: if l_time_uom_flag = 2 then
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);

Line 1065: if (g_logLevel <= wip_constants.trace_logging) then

1061: if v_emp_perf_temp.exists(to_char(l_date_seq||':'||l_shift_num)) then
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)||

Line 1069: ' Date: '||to_char(emp_dir_lab_hrs.actual_date,WIP_CONSTANTS.DATETIME_FMT)||

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)||
1071: ' Shift Num: '||to_char(l_shift_num)||
1072: ' DLH Value: '||to_char(l_dir_lab_hrs));
1073: end if;

Line 1111: if (g_logLevel <= wip_constants.trace_logging) then

1107: l_time_uom_flag := is_time_uom(l_uom_code);
1108: l_stmt_num :=310;
1109: -- Modified for bug 6972129.
1110: if l_time_uom_flag = 2 then
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);

Line 1121: if (g_logLevel <= wip_constants.trace_logging) then

1117: end if;
1118: is_eh_record_valid := false;
1119: end if;
1120: if earned_hrs_rates.basis_type = 2 then
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);

Line 1148: if (g_logLevel <= wip_constants.trace_logging) then

1144: if v_emp_perf_temp.exists(emp_clock_rec.emp_index) then
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)||

Line 1229: if (g_logLevel <= wip_constants.trace_logging) then

1225: emp_index := v_emp_perf_temp.next(emp_index);
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;

Line 1248: if (g_logLevel <= wip_constants.trace_logging) then

1244: forall cntr in v_wip_lab_perf_rate.first..v_wip_lab_perf_rate.last
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

Line 1293: if (g_logLevel <= wip_constants.trace_logging) then

1289: t.date_sequence,
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 */

Line 1350: if (g_logLevel <= wip_constants.trace_logging) then

1346: g_request_id,
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 */