DBA Data[Home] [Help]

APPS.EAM_WO_IMPORT_DS_PVT dependencies on EAM_WORK_ORDER_IMPORT

Line 59: UPDATE EAM_WORK_ORDER_IMPORT

55: BEGIN
56:
57: IF p_validate_fail THEN
58: -- Validate_Structure failed .Fail entire structure with status 3
59: UPDATE EAM_WORK_ORDER_IMPORT
60: SET process_status = 3,
61: last_update_date = sysdate,
62: last_updated_by = fnd_global.user_id,
63: last_update_login = fnd_global.login_id

Line 66: FROM EAM_WORK_ORDER_IMPORT

62: last_updated_by = fnd_global.user_id,
63: last_update_login = fnd_global.login_id
64: WHERE group_id = p_group_id
65: AND wip_entity_id IN (SELECT wip_entity_id
66: FROM EAM_WORK_ORDER_IMPORT
67: WHERE top_wip_entity_id= p_top_wip_entity_id);
68:
69: ELSE
70: -- Update for One work order in hierarchy has failed.Fail entire structure with status 3

Line 73: UPDATE EAM_WORK_ORDER_IMPORT

69: ELSE
70: -- Update for One work order in hierarchy has failed.Fail entire structure with status 3
71: -- Since some work orders has errored out,they will be in status 4 Hence only pick up
72: -- those work orders which in status 2
73: UPDATE EAM_WORK_ORDER_IMPORT
74: SET process_status = 3,
75: last_update_date = sysdate,
76: last_updated_by = fnd_global.user_id,
77: last_update_login = fnd_global.login_id

Line 80: FROM EAM_WORK_ORDER_IMPORT

76: last_updated_by = fnd_global.user_id,
77: last_update_login = fnd_global.login_id
78: WHERE group_id = p_group_id
79: AND wip_entity_id in (SELECT wip_entity_id
80: FROM EAM_WORK_ORDER_IMPORT
81: WHERE top_wip_entity_id= p_top_wip_entity_id
82: AND process_status =2);
83: END IF;
84:

Line 90: INSERT INTO EAM_WORK_ORDER_IMPORT_ERRORS(

86: fnd_file.put_line(FND_FILE.LOG,'Status Relationship Error .Structure failed while updating work order hierarchy with parent work order ' || p_top_wip_entity_id);
87: fnd_file.put_line(FND_FILE.LOG,'Error Stack: ');
88: IF p_wo_relationship_exc_tbl.count > 0 THEN
89: FOR work_rel_counter IN p_wo_relationship_exc_tbl.FIRST..p_wo_relationship_exc_tbl.LAST LOOP
90: INSERT INTO EAM_WORK_ORDER_IMPORT_ERRORS(
91: header_id ,
92: group_id ,
93: row_id ,
94: error_message ,

Line 117: FROM EAM_WORK_ORDER_IMPORT

113: END LOOP;
114: END IF;
115: fnd_file.put_line(FND_FILE.LOG,'Hence Marking following workorders under hierarchy as failed :');
116: FOR log_counter IN (SELECT wip_entity_id
117: FROM EAM_WORK_ORDER_IMPORT
118: WHERE group_id = p_group_id
119: AND top_wip_entity_id=p_top_wip_entity_id
120: )
121: LOOP

Line 131: FROM EAM_WORK_ORDER_IMPORT

127: fnd_file.put_line(FND_FILE.LOG,'Status Relationship Error .Structure failed while updating the one of work order under the hierarchy with parent work order ' || p_top_wip_entity_id);
128: fnd_file.put_line(FND_FILE.LOG,'Error Stack :' || temp_err_mesg);
129: fnd_file.put_line(FND_FILE.LOG,'Hence Marking following workorders under hierarchy as failed :');
130: FOR log_counter IN ( SELECT wip_entity_id
131: FROM EAM_WORK_ORDER_IMPORT
132: WHERE group_id = p_group_id
133: AND top_wip_entity_id=p_top_wip_entity_id
134: )
135: LOOP

Line 146: -- Function : In EAM_WORK_ORDER_IMPORT_ERRORS, inserts a row for each error message retrieved from work order API

142:
143: -- Start of comments
144: -- API name : log_error_messages
145: -- Type : Private.
146: -- Function : In EAM_WORK_ORDER_IMPORT_ERRORS, inserts a row for each error message retrieved from work order API
147: -- message stack. Update the column RETURN_STATUS of the import with the API return_status,
148: -- also update RETURN_STATUS in all child tables with the return status got from the output child
149: -- records such as the ones for operations, resources etc. Update the WHO columns like LAST_UPDATE_DATE,
150: -- LAST_UPDATED_BY, LAST_UPDATE_LOGIN whenever any update is done to any import table record

Line 158: -- p_wo_rec IN EAM_WORK_ORDER_IMPORT%ROWTYPE

154: -- l_return_status IN VARCHAR2 Required
155: -- Status returned by work order api.This can be 'E'/'U'
156: -- l_group_id IN NUMBER Required
157: -- Group Id
158: -- p_wo_rec IN EAM_WORK_ORDER_IMPORT%ROWTYPE
159: -- Required Work Order Record fetched from cursor
160: -- p_eam_op_tbl IN EAM_PROCESS_WO_PUB.eam_op_tbl_type Required
161: -- Operation out table from work order api
162: -- p_eam_res_tbl IN EAM_PROCESS_WO_PUB.eam_res_tbl_type Required

Line 177: p_wo_rec EAM_WORK_ORDER_IMPORT%ROWTYPE,

173: -- End of comments
174:
175: PROCEDURE log_error_messages(p_return_status VARCHAR2,
176: p_group_id NUMBER,
177: p_wo_rec EAM_WORK_ORDER_IMPORT%ROWTYPE,
178: p_eam_op_tbl EAM_PROCESS_WO_PUB.eam_op_tbl_type,
179: p_eam_res_tbl EAM_PROCESS_WO_PUB.eam_res_tbl_type,
180: p_eam_res_inst_tbl EAM_PROCESS_WO_PUB.eam_res_inst_tbl_type,
181: p_eam_res_usage_tbl EAM_PROCESS_WO_PUB.eam_res_usage_tbl_type,

Line 192: UPDATE EAM_WORK_ORDER_IMPORT

188:
189: PRAGMA AUTONOMOUS_TRANSACTION;
190: BEGIN
191:
192: UPDATE EAM_WORK_ORDER_IMPORT
193: SET process_status = 4 ,
194: last_update_date = sysdate,
195: last_updated_by = fnd_global.user_id,
196: last_update_login = fnd_global.login_id

Line 201: -- into EAM_WORK_ORDER_IMPORT_ERRORS

197: WHERE group_id = p_group_id
198: AND wip_entity_id = p_wo_rec.wip_entity_id;
199:
200: -- get the error messages from the work order api exception stack and insert
201: -- into EAM_WORK_ORDER_IMPORT_ERRORS
202:
203: l_msg_count := fnd_msg_pub.count_msg;
204: IF(l_msg_count>0) THEN
205: msg_index := l_msg_count;

Line 212: INSERT INTO EAM_WORK_ORDER_IMPORT_ERRORS(

208: p_encoded => 'F',
209: p_data => temp_err_mesg,
210: p_msg_index_out => msg_index);
211:
212: INSERT INTO EAM_WORK_ORDER_IMPORT_ERRORS(
213: header_id ,
214: group_id ,
215: row_id ,
216: error_message ,

Line 300: UPDATE EAM_WORK_ORDER_IMPORT

296: AND wip_entity_id = p_eam_op_tbl(counter_op).wip_entity_id
297: AND operation_seq_num = p_eam_op_tbl(counter_op).operation_seq_num;
298: END LOOP;
299:
300: UPDATE EAM_WORK_ORDER_IMPORT
301: SET return_status = p_return_status,
302: last_update_date = sysdate,
303: last_updated_by = fnd_global.user_id,
304: last_update_login = fnd_global.login_id

Line 397: TYPE l_import_wo_records IS REF CURSOR RETURN EAM_WORK_ORDER_IMPORT%ROWTYPE;

393: l_resource_instance_index NUMBER;
394: l_conc_status BOOLEAN;
395: l_error_message VARCHAR2(4000);
396:
397: TYPE l_import_wo_records IS REF CURSOR RETURN EAM_WORK_ORDER_IMPORT%ROWTYPE;
398: l_import_wo l_import_wo_records;
399: l_import_wo_record EAM_WORK_ORDER_IMPORT%ROWTYPE;
400:
401: l_wo_relationship_exc_tbl EAM_PROCESS_WO_PUB.wo_relationship_exc_tbl_type;

Line 399: l_import_wo_record EAM_WORK_ORDER_IMPORT%ROWTYPE;

395: l_error_message VARCHAR2(4000);
396:
397: TYPE l_import_wo_records IS REF CURSOR RETURN EAM_WORK_ORDER_IMPORT%ROWTYPE;
398: l_import_wo l_import_wo_records;
399: l_import_wo_record EAM_WORK_ORDER_IMPORT%ROWTYPE;
400:
401: l_wo_relationship_exc_tbl EAM_PROCESS_WO_PUB.wo_relationship_exc_tbl_type;
402:
403: l_msg_data VARCHAR2(4000);

Line 444: UPDATE EAM_WORK_ORDER_IMPORT

440: l_error_message :='No error message ';
441: l_group_id:= P_GROUP_ID;
442:
443: -- Update the status of work order from Pending to Running
444: UPDATE EAM_WORK_ORDER_IMPORT
445: SET process_status = 2
446: WHERE group_id = l_group_id
447: AND process_status = 1 ;
448:

Line 450: DELETE EAM_WORK_ORDER_IMPORT_ERRORS

446: WHERE group_id = l_group_id
447: AND process_status = 1 ;
448:
449: -- Clear out any previously errored rows which are resubmitted
450: DELETE EAM_WORK_ORDER_IMPORT_ERRORS
451: WHERE header_id IN (
452: SELECT wip_entity_id
453: FROM EAM_WORK_ORDER_IMPORT
454: WHERE group_id = l_group_id

Line 453: FROM EAM_WORK_ORDER_IMPORT

449: -- Clear out any previously errored rows which are resubmitted
450: DELETE EAM_WORK_ORDER_IMPORT_ERRORS
451: WHERE header_id IN (
452: SELECT wip_entity_id
453: FROM EAM_WORK_ORDER_IMPORT
454: WHERE group_id = l_group_id
455: AND process_status =2
456: );
457:

Line 459: UPDATE EAM_WORK_ORDER_IMPORT ewoi

455: AND process_status =2
456: );
457:
458: -- Update the rows and set the value of top_wip_entity_id
459: UPDATE EAM_WORK_ORDER_IMPORT ewoi
460: SET top_wip_entity_id = (
461: SELECT distinct wsr.top_level_object_id
462: FROM WIP_SCHED_RELATIONSHIPS wsr
463: WHERE wsr.relationship_type =1

Line 476: FROM EAM_WORK_ORDER_IMPORT

472: -- Open Cursor
473: IF NOT l_import_wo%ISOPEN THEN
474: OPEN l_import_wo FOR
475: SELECT *
476: FROM EAM_WORK_ORDER_IMPORT
477: WHERE group_id = l_group_id
478: AND process_status = 2
479: ORDER BY top_wip_entity_id ASC;
480: END IF;

Line 582: FROM EAM_WORK_ORDER_IMPORT

578: -- if it succedds we need to purge data
579: -- Purge this import record and associated records from the child tables.
580:
581: FOR log_counter IN ( SELECT wip_entity_id
582: FROM EAM_WORK_ORDER_IMPORT
583: WHERE group_id = l_group_id
584: AND top_wip_entity_id = l_old_top_wip_entity_id) LOOP
585: fnd_file.put_line(FND_FILE.LOG,'Status Sucess for work order --' || log_counter.wip_entity_id);
586: END LOOP;

Line 593: FROM EAM_WORK_ORDER_IMPORT

589: FROM EAM_RESOURCE_INSTANCE_IMPORT
590: WHERE group_id = l_group_id
591: AND wip_entity_id IN (
592: SELECT wip_entity_id
593: FROM EAM_WORK_ORDER_IMPORT
594: WHERE group_id = l_group_id
595: AND top_wip_entity_id = l_old_top_wip_entity_id
596: );
597:

Line 603: FROM EAM_WORK_ORDER_IMPORT

599: FROM EAM_RESOURCE_USAGE_IMPORT
600: WHERE group_id = l_group_id
601: AND wip_entity_id IN (
602: SELECT wip_entity_id
603: FROM EAM_WORK_ORDER_IMPORT
604: WHERE group_id = l_group_id
605: AND top_wip_entity_id = l_old_top_wip_entity_id
606: );
607:

Line 613: FROM EAM_WORK_ORDER_IMPORT

609: FROM EAM_RESOURCE_IMPORT
610: WHERE group_id = l_group_id
611: AND wip_entity_id IN (
612: SELECT wip_entity_id
613: FROM EAM_WORK_ORDER_IMPORT
614: WHERE group_id = l_group_id
615: AND top_wip_entity_id = l_old_top_wip_entity_id
616: );
617:

Line 623: FROM EAM_WORK_ORDER_IMPORT

619: FROM EAM_MATERIAL_IMPORT
620: WHERE group_id = l_group_id
621: AND wip_entity_id IN (
622: SELECT wip_entity_id
623: FROM EAM_WORK_ORDER_IMPORT
624: WHERE group_id = l_group_id
625: AND top_wip_entity_id = l_old_top_wip_entity_id
626: );
627:

Line 633: FROM EAM_WORK_ORDER_IMPORT

629: FROM EAM_OPERATION_IMPORT
630: WHERE group_id = l_group_id
631: AND wip_entity_id IN (
632: SELECT wip_entity_id
633: FROM EAM_WORK_ORDER_IMPORT
634: WHERE group_id = l_group_id
635: AND top_wip_entity_id = l_old_top_wip_entity_id
636: );
637:

Line 639: FROM EAM_WORK_ORDER_IMPORT

635: AND top_wip_entity_id = l_old_top_wip_entity_id
636: );
637:
638: DELETE
639: FROM EAM_WORK_ORDER_IMPORT
640: WHERE group_id = l_group_id
641: AND top_wip_entity_id = l_old_top_wip_entity_id;
642:
643: COMMIT;

Line 1054: FROM EAM_WORK_ORDER_IMPORT

1050: WHERE group_id = l_group_id
1051: AND wip_entity_id = l_import_wo_record.wip_entity_id;
1052:
1053: DELETE
1054: FROM EAM_WORK_ORDER_IMPORT
1055: WHERE group_id = l_group_id
1056: AND wip_entity_id = l_import_wo_record.wip_entity_id;
1057:
1058: