DBA Data[Home] [Help]

APPS.WIP_WS_TIME_ENTRY dependencies on WIP_RESOURCE_ACTUAL_TIMES

Line 10: -- Insert a record into the wip_resource_actual_times table.

6: G_BOM_AUTOCHARGE_TYPE_MANUAL CONSTANT NUMBER := 2;
7:
8: G_RES_CHG_FAILED Number :=wip_constants.no;
9:
10: -- Insert a record into the wip_resource_actual_times table.
11: PROCEDURE record_insert(
12: p_time_entry_id in number,
13: p_organization_id in number,
14: p_wip_entity_id in number,

Line 125: select WIP_RESOURCE_ACTUAL_TIMES_S.nextval into l_time_entry_id from dual;

121: l_uom_code := fnd_profile.value('BOM:HOUR_UOM_CODE');
122: l_return_status := 'U';
123:
124: if p_time_entry_id is null then
125: select WIP_RESOURCE_ACTUAL_TIMES_S.nextval into l_time_entry_id from dual;
126: else
127: l_time_entry_id := p_time_entry_id;
128: end if;
129:

Line 183: wip_logger.log('Inserting into wip_resource_actual_times', l_return_status);

179: end if;
180:
181: if(l_logLevel <= wip_constants.full_logging) then
182: wip_logger.log('Projected Completion Date: ' || l_projected_completion_date, l_return_status);
183: wip_logger.log('Inserting into wip_resource_actual_times', l_return_status);
184: end if;
185: insert into wip_resource_actual_times
186: (time_entry_id,
187: organization_id,

Line 185: insert into wip_resource_actual_times

181: if(l_logLevel <= wip_constants.full_logging) then
182: wip_logger.log('Projected Completion Date: ' || l_projected_completion_date, l_return_status);
183: wip_logger.log('Inserting into wip_resource_actual_times', l_return_status);
184: end if;
185: insert into wip_resource_actual_times
186: (time_entry_id,
187: organization_id,
188: wip_entity_id,
189: operation_seq_num,

Line 286: -- Update a record in the wip_resource_actual_times table.

282: x_returnStatus => l_return_status);
283: end if;
284: END record_insert;
285:
286: -- Update a record in the wip_resource_actual_times table.
287: PROCEDURE record_update(
288: p_time_entry_id in number,
289: p_organization_id in number,
290: p_wip_entity_id in number,

Line 413: from wip_resource_actual_times where time_entry_id = p_time_entry_id;

409: wip_logger.log('After inv_convert, l_duration: ' || l_duration, l_return_status);
410: end if;
411:
412: select object_version_number, start_date into l_object_version_num, l_start_date
413: from wip_resource_actual_times where time_entry_id = p_time_entry_id;
414:
415: if(l_logLevel <= wip_constants.full_logging) then
416: wip_logger.log('l_object_version_num: ' || l_object_version_num, l_return_status);
417: wip_logger.log('l_start_date: ' || l_start_date, l_return_status);

Line 433: wip_logger.log('updating wip_resource_actual_times', l_return_status);

429: end if;
430:
431: if l_object_version_num = p_object_version_num then
432: if(l_logLevel <= wip_constants.full_logging) then
433: wip_logger.log('updating wip_resource_actual_times', l_return_status);
434: end if;
435: update wip_resource_actual_times set
436: organization_id = p_organization_id,
437: wip_entity_id = p_wip_entity_id,

Line 435: update wip_resource_actual_times set

431: if l_object_version_num = p_object_version_num then
432: if(l_logLevel <= wip_constants.full_logging) then
433: wip_logger.log('updating wip_resource_actual_times', l_return_status);
434: end if;
435: update wip_resource_actual_times set
436: organization_id = p_organization_id,
437: wip_entity_id = p_wip_entity_id,
438: operation_seq_num = p_operation_seq_num,
439: resource_id = p_resource_id,

Line 498: -- Delete a record from the wip_resource_actual_times table.

494: x_returnStatus => l_return_status);
495: end if;
496: END record_update;
497:
498: -- Delete a record from the wip_resource_actual_times table.
499: PROCEDURE record_delete(
500: p_time_entry_id in number,
501: p_object_version_num in number,
502: x_return_status out NOCOPY varchar2)

Line 523: from wip_resource_actual_times

519: operation_seq_num,
520: resource_id,
521: resource_seq_num,
522: start_date
523: from wip_resource_actual_times
524: where time_entry_id = p_time_entry_id;
525: BEGIN
526: if(l_logLevel <= wip_constants.trace_logging) then
527: l_params(1).paramName := 'p_time_entry_id';

Line 558: wip_logger.log('updating wip_resource_actual_times', l_return_status);

554: end if;
555: else
556: if l_object_version_num = p_object_version_num then
557: if(l_logLevel <= wip_constants.full_logging) then
558: wip_logger.log('updating wip_resource_actual_times', l_return_status);
559: end if;
560: update wip_resource_actual_times set
561: process_status = l_process_status,
562: object_version_number = p_object_version_num + 1,

Line 560: update wip_resource_actual_times set

556: if l_object_version_num = p_object_version_num then
557: if(l_logLevel <= wip_constants.full_logging) then
558: wip_logger.log('updating wip_resource_actual_times', l_return_status);
559: end if;
560: update wip_resource_actual_times set
561: process_status = l_process_status,
562: object_version_number = p_object_version_num + 1,
563: last_update_date = sysdate,
564: last_updated_by = fnd_global.user_id,

Line 601: -- Delete a record from the wip_resource_actual_times table.

597: x_returnStatus => l_return_status);
598: end if;
599: END record_delete;
600:
601: -- Delete a record from the wip_resource_actual_times table.
602: PROCEDURE record_delete(
603: p_wip_entity_id in number,
604: p_operation_seq_num in number,
605: p_employee_id in number,

Line 623: from wip_resource_actual_times

619: organization_id,
620: resource_id,
621: resource_seq_num,
622: start_date
623: from wip_resource_actual_times
624: where wip_entity_id = p_wip_entity_id
625: and operation_seq_num = p_operation_seq_num
626: and employee_id = p_employee_id
627: and process_status <> 4;

Line 660: wip_logger.log('updating wip_resource_actual_times', l_return_status);

656: wip_logger.log('delete_cursor not found', l_return_status);
657: end if;
658: else
659: if(l_logLevel <= wip_constants.full_logging) then
660: wip_logger.log('updating wip_resource_actual_times', l_return_status);
661: end if;
662: update wip_resource_actual_times set
663: process_status = l_process_status,
664: object_version_number = l_object_version_num + 1,

Line 662: update wip_resource_actual_times set

658: else
659: if(l_logLevel <= wip_constants.full_logging) then
660: wip_logger.log('updating wip_resource_actual_times', l_return_status);
661: end if;
662: update wip_resource_actual_times set
663: process_status = l_process_status,
664: object_version_number = l_object_version_num + 1,
665: last_update_date = sysdate,
666: last_updated_by = fnd_global.user_id,

Line 770: update wip_resource_actual_times t

766: end if;
767: l_uom_code := fnd_profile.value('BOM:HOUR_UOM_CODE');
768: l_date := sysdate;
769:
770: update wip_resource_actual_times t
771: set
772: end_date = l_date,
773: duration = (l_date - start_date)*24,
774: uom_code = l_uom_code,

Line 812: from wip_resource_actual_times wrat,

808: cursor all_labor_clocked_out(p_scheduled_flag number) is
809: select
810: decode(
811: ( select count(*)
812: from wip_resource_actual_times wrat,
813: bom_resources br,
814: wip_operation_resources wor
815: where wrat.wip_entity_id = p_wip_entity_id
816: and wrat.operation_seq_num = p_operation_seq_num

Line 833: from wip_resource_actual_times wrat,

829:
830: /* max end date for yes/no labor resources */
831: cursor max_labor_end_date(p_scheduled_flag number) is
832: select max(wrat.end_date)
833: from wip_resource_actual_times wrat,
834: bom_resources br,
835: wip_operation_resources wor
836: where wrat.wip_entity_id = p_wip_entity_id
837: and wrat.operation_seq_num = p_operation_seq_num

Line 883: update wip_resource_actual_times t

879: close max_labor_end_date;
880:
881: if( l_date is null ) then l_date := sysdate; end if;
882:
883: update wip_resource_actual_times t
884: set
885: end_date = l_date,
886: duration = (l_date - start_date)*24,
887: uom_code = l_uom_code,

Line 921: update wip_resource_actual_times t

917: close max_labor_end_date;
918:
919: if( l_date is null ) then l_date := sysdate; end if;
920:
921: update wip_resource_actual_times t
922: set
923: end_date = l_date,
924: duration = (l_date - start_date)*24,
925: process_status = '3',

Line 957: update wip_resource_actual_times t

953: close max_labor_end_date;
954:
955: if( l_date is null ) then l_date := sysdate; end if;
956:
957: update wip_resource_actual_times t
958: set
959: end_date = l_date,
960: duration = (l_date - start_date)*24,
961: process_status = '3',

Line 993: from wip_resource_actual_times

989: Is
990: -- check if the resuorce is aleady used in wrat
991: cursor resource_seq_in_wrat is
992: select resource_seq_num
993: from wip_resource_actual_times
994: where wip_entity_id = p_wip_entity_id
995: and operation_seq_num = p_operation_seq_num
996: and resource_id = p_resource_id
997: and resource_seq_num is not null

Line 1021: from wip_resource_actual_times wrat

1017: and wor.operation_seq_num = p_operation_seq_num;
1018:
1019: select max(wrat.resource_seq_num) seq
1020: into l_wrat_max
1021: from wip_resource_actual_times wrat
1022: where wrat.wip_entity_id = p_wip_entity_id
1023: and wrat.operation_seq_num = p_operation_seq_num
1024: and wrat.resource_seq_num is not null;
1025:

Line 1047: from wip_resource_actual_times wrat

1043: update wip_operation_resources wor
1044: set
1045: wor.actual_completion_date =
1046: nvl( ( select max(wrat.end_date)
1047: from wip_resource_actual_times wrat
1048: where wrat.wip_entity_id = wor.wip_entity_id
1049: and wrat.operation_seq_num = wor.operation_seq_num
1050: and wrat.resource_seq_num = wor.resource_seq_num
1051: and wrat.process_status <> 4

Line 1056: from wip_resource_actual_times wrat

1052: and wrat.end_date is not null), sysdate)
1053: where wip_entity_id = p_wip_entity_id
1054: and operation_seq_num = p_operation_seq_num
1055: and not exists (select wrat.end_date
1056: from wip_resource_actual_times wrat
1057: where wrat.wip_entity_id = wor.wip_entity_id
1058: and wrat.operation_seq_num = wor.operation_seq_num
1059: and wrat.resource_seq_num = wor.resource_seq_num
1060: and wrat.start_date is not null

Line 1073: from wip_resource_actual_times wrat

1069: where wor.wip_entity_id = wo.wip_entity_id
1070: and wor.operation_seq_num = wo.operation_seq_num
1071: and wor.actual_completion_date is not null)
1072: , ( select max(wrat.end_date)
1073: from wip_resource_actual_times wrat
1074: where wrat.wip_entity_id = wo.wip_entity_id
1075: and wrat.operation_seq_num = wo.operation_seq_num
1076: and wrat.end_date is not null)
1077: ), sysdate)

Line 1081: from wip_resource_actual_times wrat

1077: ), sysdate)
1078: where wip_entity_id = p_wip_entity_id
1079: and operation_seq_num = p_operation_seq_num
1080: and not exists (select 1
1081: from wip_resource_actual_times wrat
1082: where wrat.wip_entity_id = wo.wip_entity_id
1083: and wrat.operation_seq_num = wo.operation_seq_num
1084: and wrat.start_date is not null
1085: and wrat.end_date is null

Line 1099: from wip_resource_actual_times wrat

1095:
1096: cursor time_records_all_cursor is
1097: select distinct wrat.wip_entity_id,
1098: wrat.operation_seq_num
1099: from wip_resource_actual_times wrat
1100: where wrat.organization_id = p_organization_id
1101: and wrat.status_type = 1
1102: and wrat.process_status = 2 /* only new records */
1103: and wrat.duration is not null;

Line 1129: from wip_resource_actual_times wrat

1125:
1126: cursor time_records_mytime_cursor is
1127: select distinct wrat.wip_entity_id,
1128: wrat.operation_seq_num
1129: from wip_resource_actual_times wrat
1130: where wrat.organization_id = p_organization_id
1131: and wrat.instance_id = p_instance_id
1132: and wrat.status_type = 1
1133: and wrat.process_status in (2, 3, 4)

Line 1161: from wip_resource_actual_times wrat

1157:
1158: cursor time_records_mytime_cursor is
1159: select distinct wrat.wip_entity_id,
1160: wrat.operation_seq_num,wrat.instance_id
1161: from wip_resource_actual_times wrat
1162: where wrat.organization_id = p_organization_id
1163: and ( (wrat.instance_id in (select instance_id from bom_resource_employees where organization_id=p_organization_id and person_id=p_emp_id ) ) or (employee_id=p_emp_id and instance_id is null) )
1164: and wrat.status_type = 1
1165: and wrat.process_status in (2, 3, 4)

Line 1282: from wip_resource_actual_times wrat,

1278: wrat.duration,
1279: wrat.uom_code,
1280: wrat.end_date,
1281: wrat.time_entry_mode
1282: from wip_resource_actual_times wrat,
1283: bom_resources br,
1284: wip_operation_resources wor
1285: where wrat.wip_entity_id = p_wip_entity_id
1286: and wrat.operation_seq_num = p_completed_op

Line 1307: from wip_resource_actual_times wrat

1303: --bug10333052 relaxed conditions since borrowed resource may not exists in WOR table
1304: --Joining WOR can cause clocking out automatcially when doing clocking in
1305: cursor active_clock_cursor is
1306: select count(*)
1307: from wip_resource_actual_times wrat
1308: --wip_operation_resources wor
1309: where wrat.wip_entity_id = p_wip_entity_id
1310: and wrat.operation_seq_num = p_completed_op
1311: and wrat.status_type = 1

Line 1467: update wip_resource_actual_times

1463: wip_logger.log('l_change_flag: ' || l_change_flag, l_return_status);
1464: end if;
1465:
1466: if l_change_flag = 'Y' then
1467: update wip_resource_actual_times
1468: set
1469: cost_flag = l_cost_flag,
1470: add_to_rtg = l_add_to_rtg,
1471: resource_seq_num = l_resource_seq_num,

Line 1504: wip_logger.log('update wip_resource_actual_times', l_return_status);

1500: x_return_status =>l_return_status);
1501: end if;
1502:
1503: if(l_logLevel <= wip_constants.full_logging) then
1504: wip_logger.log('update wip_resource_actual_times', l_return_status);
1505: end if;
1506: --mark status type complete for wrat records
1507: update wip_resource_actual_times
1508: set

Line 1507: update wip_resource_actual_times

1503: if(l_logLevel <= wip_constants.full_logging) then
1504: wip_logger.log('update wip_resource_actual_times', l_return_status);
1505: end if;
1506: --mark status type complete for wrat records
1507: update wip_resource_actual_times
1508: set
1509: status_type = l_completed_status_type,
1510: process_status = l_completed_process_status,
1511: object_version_number = l_object_version_num + 1,

Line 1549: delete from wip_resource_actual_times

1545: if(l_logLevel <= wip_constants.full_logging) then
1546: wip_logger.log('After calling job_off_internal', l_return_status);
1547: end if;
1548: /* for wrat records with process status deleted - delete records */
1549: delete from wip_resource_actual_times
1550: where wip_entity_id = p_wip_entity_id
1551: and operation_seq_num = p_completed_op
1552: and status_type = 1
1553: and process_status = 4;

Line 1556: update wip_resource_actual_times set

1552: and status_type = 1
1553: and process_status = 4;
1554:
1555: /* reset process_status of records of inserted/updated - mark as completed */
1556: update wip_resource_actual_times set
1557: process_status = l_completed_process_status,
1558: last_update_date = sysdate,
1559: last_updated_by = fnd_global.user_id,
1560: last_update_login = fnd_global.login_id

Line 1790: from wip_resource_actual_times wrat

1786: l_return_status varchar2(1);
1787: l_params wip_logger.param_tbl_t;
1788: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1789: cursor min_start_date_wrat_cursor is select min(wrat.start_date)
1790: from wip_resource_actual_times wrat
1791: where wrat.wip_entity_id = p_wip_entity_id
1792: and wrat.operation_seq_num = p_operation_seq_num
1793: and nvl(wrat.resource_seq_num, -1) = nvl(p_resource_seq_num, -1)
1794: and wrat.start_date is not null

Line 1889: from wip_resource_actual_times wrat

1885: l_return_status varchar2(1);
1886: l_params wip_logger.param_tbl_t;
1887: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1888: cursor max_end_date_wrat_cursor is select max(wrat.end_date)
1889: from wip_resource_actual_times wrat
1890: where wrat.wip_entity_id = p_wip_entity_id
1891: and wrat.operation_seq_num = p_operation_seq_num
1892: and nvl(wrat.resource_seq_num, -1) = nvl(p_resource_seq_num, -1)
1893: and not exists (select wrat.end_date

Line 1894: from wip_resource_actual_times wrat

1890: where wrat.wip_entity_id = p_wip_entity_id
1891: and wrat.operation_seq_num = p_operation_seq_num
1892: and nvl(wrat.resource_seq_num, -1) = nvl(p_resource_seq_num, -1)
1893: and not exists (select wrat.end_date
1894: from wip_resource_actual_times wrat
1895: where wrat.wip_entity_id = p_wip_entity_id
1896: and wrat.operation_seq_num = p_operation_seq_num
1897: and nvl(wrat.resource_seq_num, -1) = nvl(p_resource_seq_num, -1)
1898: and wrat.end_date is null

Line 1904: from wip_resource_actual_times wrat,

1900: and wrat.process_status <> 4;
1901:
1902: --find out if there are any active next resources
1903: cursor active_next_resource_cursor is select 'Y'
1904: from wip_resource_actual_times wrat,
1905: wip_operation_resources wor
1906: where wrat.wip_entity_id = p_wip_entity_id
1907: and wrat.operation_seq_num = p_operation_seq_num
1908: and wrat.status_type = 1

Line 2290: SELECT 1 FROM wip_resource_actual_times wrat

2286: l_params wip_logger.param_tbl_t;
2287: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2288:
2289: CURSOR shift_in_cursor IS
2290: SELECT 1 FROM wip_resource_actual_times wrat
2291: WHERE wrat.wip_entity_id IS NULL
2292: AND wrat.end_date IS NULL
2293: and wrat.employee_id = l_person_id
2294: and wrat.time_entry_mode = 8

Line 2330: wip_logger.log('inserting into wip_resource_actual_times', l_ret_status);

2326: --Already Shifted in
2327: l_shift_status := 'C';
2328: ELSE
2329: if(l_logLevel <= wip_constants.trace_logging) then
2330: wip_logger.log('inserting into wip_resource_actual_times', l_ret_status);
2331: end if;
2332: --shift in employee for which badge number was entered
2333: -- removed hardcoding of resource_id for bug 6969269.
2334: insert into wip_resource_actual_times

Line 2334: insert into wip_resource_actual_times

2330: wip_logger.log('inserting into wip_resource_actual_times', l_ret_status);
2331: end if;
2332: --shift in employee for which badge number was entered
2333: -- removed hardcoding of resource_id for bug 6969269.
2334: insert into wip_resource_actual_times
2335: (TIME_ENTRY_ID,ORGANIZATION_ID,WIP_ENTITY_ID,
2336: OPERATION_SEQ_NUM,RESOURCE_ID,RESOURCE_SEQ_NUM,
2337: INSTANCE_ID,SERIAL_NUMBER,TIME_ENTRY_MODE,
2338: COST_FLAG,ADD_TO_RTG,STATUS_TYPE,START_DATE,

Line 2346: (WIP_RESOURCE_ACTUAL_TIMES_S.nextval,p_org_id,

2342: LAST_UPDATE_LOGIN,OBJECT_VERSION_NUMBER,
2343: ACTION_FLAG,REQUEST_ID,PROGRAM_ID,
2344: PROGRAM_APPLICATION_ID,PROGRAM_UPDATE_DATE)
2345: values
2346: (WIP_RESOURCE_ACTUAL_TIMES_S.nextval,p_org_id,
2347: null,null,null,null,null,null,8,'N','N',null,
2348: sysdate,null,null,null,
2349: fnd_profile.value('BOM:HOUR_UOM_CODE'),
2350: l_person_id,1,fnd_global.user_id,

Line 2387: select start_date from wip_resource_actual_times wrat

2383: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2384: l_ret_status varchar2(1);
2385:
2386: cursor shift_out_test_cursor is
2387: select start_date from wip_resource_actual_times wrat
2388: where wrat.wip_entity_id is null
2389: and wrat.EMPLOYEE_ID=l_person_id
2390: and wrat.ORGANIZATION_ID=p_org_id
2391: and wrat.end_date is null

Line 2425: update wip_resource_actual_times set

2421: else
2422: l_date := sysdate;
2423: l_duration := (l_date - l_start_date)*24;
2424:
2425: update wip_resource_actual_times set
2426: end_date = l_date,
2427: duration = l_duration
2428: where ORGANIZATION_ID=p_org_id
2429: and employee_id =l_person_id

Line 2463: select 1 from wip_resource_actual_times wrat

2459:
2460: l_params wip_logger.param_tbl_t;
2461: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2462: cursor undo_shift_in_test_cursor is
2463: select 1 from wip_resource_actual_times wrat
2464: where wrat.wip_entity_id is null
2465: and wrat.EMPLOYEE_ID=l_person_id
2466: and wrat.ORGANIZATION_ID=p_org_id
2467: and wrat.end_date is null;

Line 2497: delete from wip_resource_actual_times wrat

2493: l_shift_status :='N';
2494: elsif undo_shift_in_test_cursor%NOTFOUND then
2495: l_shift_status := 'O';
2496: else
2497: delete from wip_resource_actual_times wrat
2498: where wrat.wip_entity_id is null
2499: and wrat.EMPLOYEE_ID=l_person_id
2500: and wrat.ORGANIZATION_ID=p_org_id
2501: and wrat.end_date is null;

Line 2532: SELECT 1 FROM wip_resource_actual_times wrat

2528: l_params wip_logger.param_tbl_t;
2529: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2530:
2531: CURSOR shift_in_cursor IS
2532: SELECT 1 FROM wip_resource_actual_times wrat
2533: WHERE wrat.wip_entity_id IS NULL
2534: AND wrat.end_date IS NULL
2535: and wrat.employee_id = p_wip_employee_id
2536: and wrat.time_entry_mode = 8;

Line 2567: insert into wip_resource_actual_times

2563: l_shift_status := 'C';
2564: ELSE
2565: --shift in employee for which badge number was entered
2566: -- removed hardcoding of resource_id for bug 6969269.
2567: insert into wip_resource_actual_times
2568: (TIME_ENTRY_ID,ORGANIZATION_ID,WIP_ENTITY_ID,
2569: OPERATION_SEQ_NUM,RESOURCE_ID,RESOURCE_SEQ_NUM,
2570: INSTANCE_ID,SERIAL_NUMBER,TIME_ENTRY_MODE,
2571: COST_FLAG,ADD_TO_RTG,STATUS_TYPE,START_DATE,

Line 2579: (WIP_RESOURCE_ACTUAL_TIMES_S.nextval,p_org_id,

2575: LAST_UPDATE_LOGIN,OBJECT_VERSION_NUMBER,
2576: ACTION_FLAG,REQUEST_ID,PROGRAM_ID,
2577: PROGRAM_APPLICATION_ID,PROGRAM_UPDATE_DATE)
2578: values
2579: (WIP_RESOURCE_ACTUAL_TIMES_S.nextval,p_org_id,
2580: null,null,null,null,null,null,8,'N','N',null,
2581: sysdate,null,null,null,
2582: fnd_profile.value('BOM:HOUR_UOM_CODE'),
2583: p_wip_employee_id,1,fnd_global.user_id,

Line 2618: select start_date from wip_resource_actual_times wrat

2614:
2615: l_params wip_logger.param_tbl_t;
2616: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2617: cursor shift_out_test_cursor is
2618: select start_date from wip_resource_actual_times wrat
2619: where wrat.wip_entity_id is null
2620: and wrat.EMPLOYEE_ID=p_wip_employee_id
2621: and wrat.ORGANIZATION_ID=p_org_id
2622: and wrat.end_date is null;

Line 2653: update wip_resource_actual_times set

2649: else
2650: l_date := sysdate;
2651: l_duration := (l_date - l_start_date)*24;
2652:
2653: update wip_resource_actual_times set
2654: end_date = l_date,
2655: duration = l_duration
2656: where ORGANIZATION_ID=p_org_id
2657: and employee_id =p_wip_employee_id

Line 2690: from wip_resource_actual_times wrat

2686: l_ret_status varchar2(1);
2687:
2688: cursor undo_shift_in_test_cursor is
2689: select 1
2690: from wip_resource_actual_times wrat
2691: where wrat.wip_entity_id is null
2692: and wrat.EMPLOYEE_ID=p_wip_employee_id
2693: and wrat.ORGANIZATION_ID=p_org_id
2694: and wrat.end_date is null;

Line 2721: delete from wip_resource_actual_times wrat

2717: l_shift_status :='N';
2718: elsif undo_shift_in_test_cursor%NOTFOUND then
2719: l_shift_status := 'O';
2720: else
2721: delete from wip_resource_actual_times wrat
2722: where
2723: wrat.wip_entity_id is null
2724: and wrat.EMPLOYEE_ID=p_wip_employee_id
2725: and wrat.ORGANIZATION_ID=p_org_id

Line 2775: from wip_resource_actual_times wrat

2771: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
2772: l_ret_status varchar2(1);
2773:
2774: cursor clock_in_cursor is select 1
2775: from wip_resource_actual_times wrat
2776: where wrat.wip_entity_id = p_wip_entity_id
2777: and wrat.operation_seq_num = p_operation_seq_num
2778: and wrat.resource_id = p_resource_id
2779: /*Fix Bug 9681625,it is unnecessary to filter based on resource_seq_num

Line 2801: from wip_resource_actual_times wrat, wip_operation_resources wor

2797:
2798: /* check if there is no clock-in in the scheduled flag group */
2799: cursor num_job_op_cursor(p_scheduled_flag varchar2) is
2800: select count(*)
2801: from wip_resource_actual_times wrat, wip_operation_resources wor
2802: where wrat.wip_entity_id = p_wip_entity_id
2803: and wrat.operation_seq_num = p_operation_seq_num
2804: and wrat.wip_entity_id = wor.wip_entity_id (+)
2805: and wrat.operation_seq_num = wor.operation_seq_num (+)

Line 2826: from wip_resource_actual_times wrat

2822: decode(c_scheduled_flag, 2, 1, c_scheduled_flag)
2823: and br.resource_type = 1 --machine resource
2824: and wor.resource_id = br.resource_id
2825: and not exists (select 1
2826: from wip_resource_actual_times wrat
2827: where wrat.wip_entity_id = p_wip_entity_id
2828: and wrat.operation_seq_num = p_operation_seq_num
2829: and wrat.resource_id = wor.resource_id
2830: and wrat.resource_seq_num = wor.resource_seq_num

Line 3056: from wip_resource_actual_times

3052: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
3053: cursor clock_out_test_cursor is
3054: select object_version_number,
3055: start_date
3056: from wip_resource_actual_times
3057: where wip_entity_id = p_wip_entity_id
3058: and operation_seq_num = p_operation_seq_num
3059: and resource_id = p_resource_id
3060: /* and nvl(resource_seq_num, -1) = nvl(p_resource_seq_num, -1) BUG 7322174*/

Line 3102: wip_logger.log('updating wip_resource_actual_times', x_status);

3098: if clock_out_test_cursor%NOTFOUND then
3099: l_clock_status := 'O';
3100: else
3101: if(l_logLevel <= wip_constants.trace_logging) then
3102: wip_logger.log('updating wip_resource_actual_times', x_status);
3103: end if;
3104: l_date := sysdate;
3105: l_duration := (l_date - l_start_date)*24;
3106: update wip_resource_actual_times set

Line 3106: update wip_resource_actual_times set

3102: wip_logger.log('updating wip_resource_actual_times', x_status);
3103: end if;
3104: l_date := sysdate;
3105: l_duration := (l_date - l_start_date)*24;
3106: update wip_resource_actual_times set
3107: end_date = l_date,
3108: duration = l_duration,
3109: uom_code = l_uom_code,
3110: process_status = l_process_status,

Line 3294: from wip_resource_actual_times

3290: l_dummy_var varchar2(1);
3291:
3292: cursor pending_clockout_cursor is
3293: select count(*)
3294: from wip_resource_actual_times
3295: where wip_entity_id = p_wip_entity_id
3296: and operation_seq_num = nvl(p_operation_seq_num, operation_seq_num)
3297: and status_type = 1
3298: and start_date is not null

Line 3346: from wip_resource_actual_times

3342: select count(1)
3343: into l_emp_clock_ins
3344: from dual
3345: where exists( select wip_entity_id
3346: from wip_resource_actual_times
3347: where organization_id = p_organization_id
3348: and employee_id = l_person_id
3349: and end_date is null
3350: and wip_entity_id is not null );

Line 3514: from wip_resource_actual_times wrat, mtl_employees_current_view mec

3510: But resource charging will not be allowed.*/
3511: begin
3512: /*select wrat.employee_id, mec.employee_num
3513: into l_employee_id, l_employee_num
3514: from wip_resource_actual_times wrat, mtl_employees_current_view mec
3515: where wrat.time_entry_id = p_entry_id
3516: and wrat.employee_id = mec.employee_id
3517: and wrat.organization_id = mec.organization_id;*/
3518: --Bug 14595358, Contingent Worker Project, can no longer use mtl_employees_current_view

Line 3526: wip_resource_actual_times wrat

3522: FROM PER_PEOPLE_F P,
3523: PER_ASSIGNMENTS_F A,
3524: PER_PERSON_TYPES T,
3525: HR_ORGANIZATION_UNITS ORG,
3526: wip_resource_actual_times wrat
3527: WHERE A.PERSON_ID = P.PERSON_ID AND
3528: ORG.BUSINESS_GROUP_ID = P.BUSINESS_GROUP_ID AND
3529: A.PRIMARY_FLAG = 'Y' AND
3530: A.ASSIGNMENT_TYPE in ('C','E') AND

Line 3939: from wip_resource_actual_times wrat,

3935: select count(*)
3936: into l_num_jobs
3937: from
3938: (select distinct wrat.wip_entity_id, wrat.operation_seq_num
3939: from wip_resource_actual_times wrat,
3940: bom_resources br
3941: where wrat.organization_id = p_org_id
3942: and wrat.employee_id = p_emp_id
3943: and wrat.start_date is not null

Line 3984: from wip_resource_actual_times wrat,

3980: select wrat.wip_entity_id,
3981: wrat.operation_seq_num,
3982: wrat.start_date
3983: into l_wip_entity_id, l_op_seq_num, l_start_date
3984: from wip_resource_actual_times wrat,
3985: bom_resources br
3986: where wrat.organization_id = p_org_id
3987: and wrat.employee_id = p_emp_id
3988: and wrat.start_date is not null