DBA Data[Home] [Help]

APPS.EAM_WO_VALIDATE_PVT dependencies on FND_API

Line 93: l_return_status := FND_API.G_RET_STS_ERROR;

89: , p_token_tbl => l_token_tbl
90: );
91: l_mesg_token_tbl := l_out_mesg_token_tbl;
92:
93: l_return_status := FND_API.G_RET_STS_ERROR;
94:
95: ELSIF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_NOT_FOUND AND
96: p_eam_wo_rec.transaction_type IN
97: (EAM_PROCESS_WO_PVT.G_OPR_UPDATE, EAM_PROCESS_WO_PVT.G_OPR_DELETE)

Line 111: l_return_status := FND_API.G_RET_STS_ERROR;

107: , p_token_tbl => l_token_tbl
108: );
109: l_mesg_token_tbl := l_out_mesg_token_tbl;
110:
111: l_return_status := FND_API.G_RET_STS_ERROR;
112:
113: ELSIF l_Return_status = FND_API.G_RET_STS_UNEXP_ERROR
114: THEN
115: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 113: ELSIF l_Return_status = FND_API.G_RET_STS_UNEXP_ERROR

109: l_mesg_token_tbl := l_out_mesg_token_tbl;
110:
111: l_return_status := FND_API.G_RET_STS_ERROR;
112:
113: ELSIF l_Return_status = FND_API.G_RET_STS_UNEXP_ERROR
114: THEN
115: l_out_mesg_token_tbl := l_mesg_token_tbl;
116: EAM_ERROR_MESSAGE_PVT.Add_Error_Token
117: ( x_Mesg_token_tbl => l_out_Mesg_Token_Tbl

Line 123: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

119: , p_message_name => NULL
120: , p_message_text => 'Unexpected error while existence verification of ' || 'EAM WO '|| p_eam_wo_rec.wip_entity_name , p_token_tbl => l_token_tbl
121: );
122: l_mesg_token_tbl := l_out_mesg_token_tbl;
123: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
124:
125: ELSE /* Assign the relevant transaction type for SYNC operations */
126: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_SYNC THEN
127: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND THEN

Line 133: l_return_status := FND_API.G_RET_STS_SUCCESS;

129: ELSE
130: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;
131: END IF;
132: END IF;
133: l_return_status := FND_API.G_RET_STS_SUCCESS;
134:
135: END IF;
136:
137: x_return_status := l_return_status;

Line 169: x_return_status := FND_API.G_RET_STS_SUCCESS;

165: l_old_eam_wo_moid NUMBER := 0;
166:
167: BEGIN
168:
169: x_return_status := FND_API.G_RET_STS_SUCCESS;
170:
171: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes b4 Defaulting . . . '); END IF;
172:
173:

Line 193: raise fnd_api.g_exc_unexpected_error;

189: from hr_organization_units hou
190: where organization_id = p_eam_wo_rec.organization_id;
191:
192: if(l_disable_date < sysdate) then
193: raise fnd_api.g_exc_unexpected_error;
194: end if;
195:
196: x_return_status := FND_API.G_RET_STS_SUCCESS;
197:

Line 196: x_return_status := FND_API.G_RET_STS_SUCCESS;

192: if(l_disable_date < sysdate) then
193: raise fnd_api.g_exc_unexpected_error;
194: end if;
195:
196: x_return_status := FND_API.G_RET_STS_SUCCESS;
197:
198: exception
199: when others then
200:

Line 213: x_return_status := FND_API.G_RET_STS_ERROR;

209: , x_mesg_token_tbl => l_out_mesg_token_tbl
210: );
211: l_mesg_token_tbl := l_out_mesg_token_tbl;
212:
213: x_return_status := FND_API.G_RET_STS_ERROR;
214: x_mesg_token_tbl := l_mesg_token_tbl ;
215: return;
216:
217: end;

Line 233: x_return_status := FND_API.G_RET_STS_SUCCESS;

229: where wep.organization_id = mp.organization_id
230: and mp.eam_enabled_flag = 'Y'
231: and wep.organization_id = p_eam_wo_rec.organization_id;
232:
233: x_return_status := FND_API.G_RET_STS_SUCCESS;
234:
235: exception
236: when no_data_found then
237:

Line 250: x_return_status := FND_API.G_RET_STS_ERROR;

246: , x_mesg_token_tbl => l_out_mesg_token_tbl
247: );
248: l_mesg_token_tbl := l_out_mesg_token_tbl;
249:
250: x_return_status := FND_API.G_RET_STS_ERROR;
251: x_mesg_token_tbl := l_mesg_token_tbl ;
252: return;
253:
254: end;

Line 263: p_eam_wo_rec.maintenance_object_source = fnd_api.g_miss_num

259:
260: begin
261:
262: if p_eam_wo_rec.maintenance_object_source is null or
263: p_eam_wo_rec.maintenance_object_source = fnd_api.g_miss_num
264: then
265: raise fnd_api.g_exc_error;
266: end if;
267:

Line 265: raise fnd_api.g_exc_error;

261:
262: if p_eam_wo_rec.maintenance_object_source is null or
263: p_eam_wo_rec.maintenance_object_source = fnd_api.g_miss_num
264: then
265: raise fnd_api.g_exc_error;
266: end if;
267:
268: select 1 into g_dummy from
269: mfg_lookups where lookup_type = g_obj_source

Line 272: x_return_status := FND_API.G_RET_STS_SUCCESS;

268: select 1 into g_dummy from
269: mfg_lookups where lookup_type = g_obj_source
270: and lookup_code = p_eam_wo_rec.maintenance_object_source;
271:
272: x_return_status := FND_API.G_RET_STS_SUCCESS;
273:
274: exception
275: when fnd_api.g_exc_error then
276:

Line 275: when fnd_api.g_exc_error then

271:
272: x_return_status := FND_API.G_RET_STS_SUCCESS;
273:
274: exception
275: when fnd_api.g_exc_error then
276:
277: l_token_tbl(1).token_name := 'Object Source';
278: l_token_tbl(1).token_value := p_eam_wo_rec.maintenance_object_source;
279:

Line 289: x_return_status := FND_API.G_RET_STS_ERROR;

285: , x_mesg_token_tbl => l_out_mesg_token_tbl
286: );
287: l_mesg_token_tbl := l_out_mesg_token_tbl;
288:
289: x_return_status := FND_API.G_RET_STS_ERROR;
290: x_mesg_token_tbl := l_mesg_token_tbl ;
291: return;
292:
293: when no_data_found then

Line 307: x_return_status := FND_API.G_RET_STS_ERROR;

303: , x_mesg_token_tbl => l_out_mesg_token_tbl
304: );
305: l_mesg_token_tbl := l_out_mesg_token_tbl;
306:
307: x_return_status := FND_API.G_RET_STS_ERROR;
308: x_mesg_token_tbl := l_mesg_token_tbl ;
309: return;
310:
311: end;

Line 320: p_eam_wo_rec.maintenance_object_type = fnd_api.g_miss_num or

316:
317: begin
318:
319: if p_eam_wo_rec.maintenance_object_type is null or
320: p_eam_wo_rec.maintenance_object_type = fnd_api.g_miss_num or
321: p_eam_wo_rec.maintenance_object_type = 1
322: then
323: raise fnd_api.g_exc_error;
324: end if;

Line 323: raise fnd_api.g_exc_error;

319: if p_eam_wo_rec.maintenance_object_type is null or
320: p_eam_wo_rec.maintenance_object_type = fnd_api.g_miss_num or
321: p_eam_wo_rec.maintenance_object_type = 1
322: then
323: raise fnd_api.g_exc_error;
324: end if;
325:
326: select 1 into g_dummy from
327: mfg_lookups where lookup_type = g_obj_type

Line 330: x_return_status := FND_API.G_RET_STS_SUCCESS;

326: select 1 into g_dummy from
327: mfg_lookups where lookup_type = g_obj_type
328: and lookup_code = p_eam_wo_rec.maintenance_object_type;
329:
330: x_return_status := FND_API.G_RET_STS_SUCCESS;
331:
332: exception
333: when fnd_api.g_exc_error then
334:

Line 333: when fnd_api.g_exc_error then

329:
330: x_return_status := FND_API.G_RET_STS_SUCCESS;
331:
332: exception
333: when fnd_api.g_exc_error then
334:
335: l_token_tbl(1).token_name := 'Object Type';
336: l_token_tbl(1).token_value := p_eam_wo_rec.maintenance_object_type;
337:

Line 347: x_return_status := FND_API.G_RET_STS_ERROR;

343: , x_mesg_token_tbl => l_out_mesg_token_tbl
344: );
345: l_mesg_token_tbl := l_out_mesg_token_tbl;
346:
347: x_return_status := FND_API.G_RET_STS_ERROR;
348: x_mesg_token_tbl := l_mesg_token_tbl ;
349: return;
350:
351: when no_data_found then

Line 365: x_return_status := FND_API.G_RET_STS_ERROR;

361: , x_mesg_token_tbl => l_out_mesg_token_tbl
362: );
363: l_mesg_token_tbl := l_out_mesg_token_tbl;
364:
365: x_return_status := FND_API.G_RET_STS_ERROR;
366: x_mesg_token_tbl := l_mesg_token_tbl ;
367: return;
368:
369: end;

Line 378: p_eam_wo_rec.maintenance_object_id = fnd_api.g_miss_num

374:
375: begin
376:
377: if p_eam_wo_rec.maintenance_object_id is null or
378: p_eam_wo_rec.maintenance_object_id = fnd_api.g_miss_num
379: then
380: raise fnd_api.g_exc_error;
381: end if;
382:

Line 380: raise fnd_api.g_exc_error;

376:
377: if p_eam_wo_rec.maintenance_object_id is null or
378: p_eam_wo_rec.maintenance_object_id = fnd_api.g_miss_num
379: then
380: raise fnd_api.g_exc_error;
381: end if;
382:
383: IF p_eam_wo_rec.maintenance_object_type = 3 then
384: --CMRO does not use the EAM family of maintenance orgs concept.

Line 422: x_return_status := FND_API.G_RET_STS_SUCCESS;

418: and inventory_item_id = p_eam_wo_rec.maintenance_object_id;
419: end if;
420: END IF;
421:
422: x_return_status := FND_API.G_RET_STS_SUCCESS;
423:
424: exception
425: when fnd_api.g_exc_error then
426:

Line 425: when fnd_api.g_exc_error then

421:
422: x_return_status := FND_API.G_RET_STS_SUCCESS;
423:
424: exception
425: when fnd_api.g_exc_error then
426:
427: l_token_tbl(1).token_name := 'Object Id';
428: l_token_tbl(1).token_value := p_eam_wo_rec.maintenance_object_id;
429:

Line 439: x_return_status := FND_API.G_RET_STS_ERROR;

435: , x_mesg_token_tbl => l_out_mesg_token_tbl
436: );
437: l_mesg_token_tbl := l_out_mesg_token_tbl;
438:
439: x_return_status := FND_API.G_RET_STS_ERROR;
440: x_mesg_token_tbl := l_mesg_token_tbl ;
441: return;
442:
443: when others then

Line 457: x_return_status := FND_API.G_RET_STS_ERROR;

453: , x_mesg_token_tbl => l_out_mesg_token_tbl
454: );
455: l_mesg_token_tbl := l_out_mesg_token_tbl;
456:
457: x_return_status := FND_API.G_RET_STS_ERROR;
458: x_mesg_token_tbl := l_mesg_token_tbl ;
459: return;
460:
461: end;

Line 473: raise fnd_api.g_exc_error;

469: -- for CMRO work orders, the rebuild_item_id cannot be null.
470: if p_eam_wo_rec.maintenance_object_source = 2 and
471: p_eam_wo_rec.rebuild_item_id is null
472: then
473: raise fnd_api.g_exc_error;
474: end if;
475:
476: x_return_status := FND_API.G_RET_STS_SUCCESS;
477:

Line 476: x_return_status := FND_API.G_RET_STS_SUCCESS;

472: then
473: raise fnd_api.g_exc_error;
474: end if;
475:
476: x_return_status := FND_API.G_RET_STS_SUCCESS;
477:
478: exception
479:
480: when fnd_api.g_exc_error then

Line 480: when fnd_api.g_exc_error then

476: x_return_status := FND_API.G_RET_STS_SUCCESS;
477:
478: exception
479:
480: when fnd_api.g_exc_error then
481:
482: l_token_tbl(1).token_name := 'Wip Id';
483: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_id;
484:

Line 494: x_return_status := FND_API.G_RET_STS_ERROR;

490: , x_mesg_token_tbl => l_out_mesg_token_tbl
491: );
492: l_mesg_token_tbl := l_out_mesg_token_tbl;
493:
494: x_return_status := FND_API.G_RET_STS_ERROR;
495: x_mesg_token_tbl := l_mesg_token_tbl ;
496: return;
497:
498: end;

Line 510: raise fnd_api.g_exc_error;

506: -- rebuild_item_id and asset_group_id cannot both be null.
507: if p_eam_wo_rec.asset_group_id is null and
508: p_eam_wo_rec.rebuild_item_id is null
509: then
510: raise fnd_api.g_exc_error;
511: end if;
512:
513: x_return_status := FND_API.G_RET_STS_SUCCESS;
514:

Line 513: x_return_status := FND_API.G_RET_STS_SUCCESS;

509: then
510: raise fnd_api.g_exc_error;
511: end if;
512:
513: x_return_status := FND_API.G_RET_STS_SUCCESS;
514:
515: exception
516: when fnd_api.g_exc_error then
517:

Line 516: when fnd_api.g_exc_error then

512:
513: x_return_status := FND_API.G_RET_STS_SUCCESS;
514:
515: exception
516: when fnd_api.g_exc_error then
517:
518: l_token_tbl(1).token_name := 'Wip Id';
519: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_id;
520:

Line 530: x_return_status := FND_API.G_RET_STS_ERROR;

526: , x_mesg_token_tbl => l_out_mesg_token_tbl
527: );
528: l_mesg_token_tbl := l_out_mesg_token_tbl;
529:
530: x_return_status := FND_API.G_RET_STS_ERROR;
531: x_mesg_token_tbl := l_mesg_token_tbl ;
532: return;
533:
534: end;

Line 546: raise fnd_api.g_exc_error;

542:
543: if p_eam_wo_rec.wip_entity_id is not null and
544: p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PUB.G_OPR_CREATE
545: then
546: raise fnd_api.g_exc_error;
547: end if;
548:
549: x_return_status := FND_API.G_RET_STS_SUCCESS;
550:

Line 549: x_return_status := FND_API.G_RET_STS_SUCCESS;

545: then
546: raise fnd_api.g_exc_error;
547: end if;
548:
549: x_return_status := FND_API.G_RET_STS_SUCCESS;
550:
551: exception
552: when fnd_api.g_exc_error then
553:

Line 552: when fnd_api.g_exc_error then

548:
549: x_return_status := FND_API.G_RET_STS_SUCCESS;
550:
551: exception
552: when fnd_api.g_exc_error then
553:
554: l_token_tbl(1).token_name := 'Wip Entity Id';
555: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_id;
556:

Line 566: x_return_status := FND_API.G_RET_STS_ERROR;

562: , x_mesg_token_tbl => l_out_mesg_token_tbl
563: );
564: l_mesg_token_tbl := l_out_mesg_token_tbl;
565:
566: x_return_status := FND_API.G_RET_STS_ERROR;
567: x_mesg_token_tbl := l_mesg_token_tbl ;
568: return;
569:
570: end;

Line 589: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

585: ) ;
586: l_mesg_token_tbl := l_out_mesg_token_tbl;
587:
588: -- Return the status and message table.
589: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
590: x_mesg_token_tbl := l_mesg_token_tbl ;
591:
592: END Check_Attributes_b4_Defaulting;
593:

Line 628: x_return_status := FND_API.G_RET_STS_SUCCESS;

624: l_wo_asset_activity_err EXCEPTION;
625:
626: BEGIN
627: l_mo_err_flag:= '';
628: x_return_status := FND_API.G_RET_STS_SUCCESS;
629:
630: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes . . . '); END IF;
631:
632:

Line 652: raise fnd_api.g_exc_unexpected_error;

648: from hr_organization_units hou
649: where organization_id = p_eam_wo_rec.organization_id;
650:
651: if(l_disable_date < sysdate) then
652: raise fnd_api.g_exc_unexpected_error;
653: end if;
654:
655: x_return_status := FND_API.G_RET_STS_SUCCESS;
656:

Line 655: x_return_status := FND_API.G_RET_STS_SUCCESS;

651: if(l_disable_date < sysdate) then
652: raise fnd_api.g_exc_unexpected_error;
653: end if;
654:
655: x_return_status := FND_API.G_RET_STS_SUCCESS;
656:
657: exception
658: when fnd_api.g_exc_unexpected_error then
659:

Line 658: when fnd_api.g_exc_unexpected_error then

654:
655: x_return_status := FND_API.G_RET_STS_SUCCESS;
656:
657: exception
658: when fnd_api.g_exc_unexpected_error then
659:
660: l_token_tbl(1).token_name := 'Organization Id';
661: l_token_tbl(1).token_value := p_eam_wo_rec.organization_id;
662:

Line 672: x_return_status := FND_API.G_RET_STS_ERROR;

668: , x_mesg_token_tbl => l_out_mesg_token_tbl
669: );
670: l_mesg_token_tbl := l_out_mesg_token_tbl;
671:
672: x_return_status := FND_API.G_RET_STS_ERROR;
673: x_mesg_token_tbl := l_mesg_token_tbl ;
674: return;
675:
676: when no_data_found then

Line 690: x_return_status := FND_API.G_RET_STS_ERROR;

686: , x_mesg_token_tbl => l_out_mesg_token_tbl
687: );
688: l_mesg_token_tbl := l_out_mesg_token_tbl;
689:
690: x_return_status := FND_API.G_RET_STS_ERROR;
691: x_mesg_token_tbl := l_mesg_token_tbl ;
692: return;
693:
694:

Line 715: x_return_status := FND_API.G_RET_STS_SUCCESS;

711: where wep.organization_id = mp.organization_id
712: and mp.eam_enabled_flag = 'Y'
713: and wep.organization_id = p_eam_wo_rec.organization_id;
714:
715: x_return_status := FND_API.G_RET_STS_SUCCESS;
716:
717: exception
718: when no_data_found then
719:

Line 732: x_return_status := FND_API.G_RET_STS_ERROR;

728: , x_mesg_token_tbl => l_out_mesg_token_tbl
729: );
730: l_mesg_token_tbl := l_out_mesg_token_tbl;
731:
732: x_return_status := FND_API.G_RET_STS_ERROR;
733: x_mesg_token_tbl := l_mesg_token_tbl ;
734: return;
735:
736: end;

Line 753: x_return_status := FND_API.G_RET_STS_SUCCESS;

749: from mfg_lookups
750: where lookup_type = g_obj_type
751: and lookup_code = p_eam_wo_rec.maintenance_object_type;
752:
753: x_return_status := FND_API.G_RET_STS_SUCCESS;
754:
755: end if;
756:
757: exception

Line 771: x_return_status := FND_API.G_RET_STS_ERROR;

767: , x_mesg_token_tbl => l_out_mesg_token_tbl
768: );
769: l_mesg_token_tbl := l_out_mesg_token_tbl;
770:
771: x_return_status := FND_API.G_RET_STS_ERROR;
772: x_mesg_token_tbl := l_mesg_token_tbl ;
773: return;
774:
775: end;

Line 799: x_return_status := FND_API.G_RET_STS_SUCCESS;

795: and mp.maint_organization_id = p_eam_wo_rec.organization_id
796: and cii.instance_id = p_eam_wo_rec.maintenance_object_id;
797: END IF;
798:
799: x_return_status := FND_API.G_RET_STS_SUCCESS;
800:
801: elsif (p_eam_wo_rec.maintenance_object_type = 2) then
802: if (p_eam_wo_rec.maintenance_object_source = 1) then
803: select 1

Line 818: x_return_status := FND_API.G_RET_STS_SUCCESS;

814: where organization_id = p_eam_wo_rec.organization_id
815: and inventory_item_id = p_eam_wo_rec.maintenance_object_id;
816: end if;
817:
818: x_return_status := FND_API.G_RET_STS_SUCCESS;
819:
820: end if;
821:
822: end if;

Line 838: x_return_status := FND_API.G_RET_STS_ERROR;

834: , x_mesg_token_tbl => l_out_mesg_token_tbl
835: );
836: l_mesg_token_tbl := l_out_mesg_token_tbl;
837:
838: x_return_status := FND_API.G_RET_STS_ERROR;
839: x_mesg_token_tbl := l_mesg_token_tbl ;
840: return;
841:
842: end;

Line 853: raise fnd_api.g_exc_unexpected_error;

849: begin
850:
851: if (p_eam_wo_rec.asset_group_id is not null) and (p_eam_wo_rec.rebuild_item_id is not null) then
852:
853: raise fnd_api.g_exc_unexpected_error;
854:
855: end if;
856:
857: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 857: x_return_status := FND_API.G_RET_STS_SUCCESS;

853: raise fnd_api.g_exc_unexpected_error;
854:
855: end if;
856:
857: x_return_status := FND_API.G_RET_STS_SUCCESS;
858:
859: exception
860: when fnd_api.g_exc_unexpected_error then
861:

Line 860: when fnd_api.g_exc_unexpected_error then

856:
857: x_return_status := FND_API.G_RET_STS_SUCCESS;
858:
859: exception
860: when fnd_api.g_exc_unexpected_error then
861:
862: l_token_tbl(1).token_name := 'Asset Group';
863: l_token_tbl(1).token_value := p_eam_wo_rec.asset_group_id;
864:

Line 874: x_return_status := FND_API.G_RET_STS_ERROR;

870: , x_mesg_token_tbl => l_out_mesg_token_tbl
871: );
872: l_mesg_token_tbl := l_out_mesg_token_tbl;
873:
874: x_return_status := FND_API.G_RET_STS_ERROR;
875: x_mesg_token_tbl := l_mesg_token_tbl ;
876: return;
877:
878: end;

Line 889: raise fnd_api.g_exc_unexpected_error;

885: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.asset_group_id is not null) then
886:
887: if(p_eam_wo_rec.asset_number is null)
888: then
889: raise fnd_api.g_exc_unexpected_error;
890: end if;
891:
892: select 1
893: into g_dummy

Line 905: x_return_status := FND_API.G_RET_STS_SUCCESS;

901: and msi.eam_item_type = 1
902: and ROWNUM =1 ;
903: end if;
904:
905: x_return_status := FND_API.G_RET_STS_SUCCESS;
906:
907: exception
908: when others then
909:

Line 922: x_return_status := FND_API.G_RET_STS_ERROR;

918: , x_mesg_token_tbl => l_out_mesg_token_tbl
919: );
920: l_mesg_token_tbl := l_out_mesg_token_tbl;
921:
922: x_return_status := FND_API.G_RET_STS_ERROR;
923: x_mesg_token_tbl := l_mesg_token_tbl ;
924: return;
925:
926: end;

Line 947: x_return_status := FND_API.G_RET_STS_SUCCESS;

943: and nvl(cii.active_end_date, sysdate+1) >= sysdate ;
944:
945: end if;
946:
947: x_return_status := FND_API.G_RET_STS_SUCCESS;
948:
949: exception
950: when no_data_found then
951:

Line 964: x_return_status := FND_API.G_RET_STS_ERROR;

960: , x_mesg_token_tbl => l_out_mesg_token_tbl
961: );
962: l_mesg_token_tbl := l_out_mesg_token_tbl;
963:
964: x_return_status := FND_API.G_RET_STS_ERROR;
965: x_mesg_token_tbl := l_mesg_token_tbl ;
966: return;
967:
968: end;

Line 988: x_return_status := FND_API.G_RET_STS_SUCCESS;

984: where eam_linear_id = p_eam_wo_rec.eam_linear_location_id;
985:
986: end if;
987:
988: x_return_status := FND_API.G_RET_STS_SUCCESS;
989:
990: exception
991: when no_data_found then
992:

Line 1005: x_return_status := FND_API.G_RET_STS_ERROR;

1001: , x_mesg_token_tbl => l_out_mesg_token_tbl
1002: );
1003: l_mesg_token_tbl := l_out_mesg_token_tbl;
1004:
1005: x_return_status := FND_API.G_RET_STS_ERROR;
1006: x_mesg_token_tbl := l_mesg_token_tbl ;
1007: return;
1008:
1009: end;

Line 1028: x_return_status := FND_API.G_RET_STS_SUCCESS;

1024: and msi.eam_item_type = 3
1025: and rownum = 1;
1026: end if;
1027:
1028: x_return_status := FND_API.G_RET_STS_SUCCESS;
1029:
1030: exception
1031: when no_data_found then
1032:

Line 1045: x_return_status := FND_API.G_RET_STS_ERROR;

1041: , x_mesg_token_tbl => l_out_mesg_token_tbl
1042: );
1043: l_mesg_token_tbl := l_out_mesg_token_tbl;
1044:
1045: x_return_status := FND_API.G_RET_STS_ERROR;
1046: x_mesg_token_tbl := l_mesg_token_tbl ;
1047: return;
1048:
1049: end;

Line 1059: raise fnd_api.g_exc_unexpected_error;

1055: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
1056:
1057: if(p_eam_wo_rec.rebuild_item_id is null and
1058: p_eam_wo_rec.rebuild_serial_number is not null) then
1059: raise fnd_api.g_exc_unexpected_error;
1060: end if;
1061:
1062: if(p_eam_wo_rec.rebuild_item_id is not null and
1063: p_eam_wo_rec.rebuild_serial_number is not null) then

Line 1107: raise fnd_api.g_exc_unexpected_error;

1103: X_Ent_Type=> 6,
1104: X_Return_Status=>l_trans_exist);
1105:
1106: IF(l_trans_exist='F') THEN
1107: raise fnd_api.g_exc_unexpected_error;
1108: END IF;
1109: END IF;
1110: END IF;
1111:

Line 1114: x_return_status := FND_API.G_RET_STS_SUCCESS;

1110: END IF;
1111:
1112:
1113:
1114: x_return_status := FND_API.G_RET_STS_SUCCESS;
1115:
1116: exception
1117: when others then
1118:

Line 1131: x_return_status := FND_API.G_RET_STS_ERROR;

1127: , x_mesg_token_tbl => l_out_mesg_token_tbl
1128: );
1129: l_mesg_token_tbl := l_out_mesg_token_tbl;
1130:
1131: x_return_status := FND_API.G_RET_STS_ERROR;
1132: x_mesg_token_tbl := l_mesg_token_tbl ;
1133: return;
1134:
1135: end;

Line 1159: raise fnd_api.g_exc_unexpected_error;

1155: and msi.organization_id = mp.organization_id
1156: and mp.maint_organization_id = p_eam_wo_rec.organization_id and rownum = 1;
1157:
1158: if g_dummy <> 1 then
1159: raise fnd_api.g_exc_unexpected_error;
1160: end if ;
1161:
1162: END IF;
1163:

Line 1164: x_return_status := FND_API.G_RET_STS_SUCCESS;

1160: end if ;
1161:
1162: END IF;
1163:
1164: x_return_status := FND_API.G_RET_STS_SUCCESS;
1165:
1166: exception
1167: when others then
1168:

Line 1181: x_return_status := FND_API.G_RET_STS_ERROR;

1177: , x_mesg_token_tbl => l_out_mesg_token_tbl
1178: );
1179: l_mesg_token_tbl := l_out_mesg_token_tbl;
1180:
1181: x_return_status := FND_API.G_RET_STS_ERROR;
1182: x_mesg_token_tbl := l_mesg_token_tbl ;
1183: return;
1184:
1185: end ;

Line 1245: x_return_status := FND_API.G_RET_STS_SUCCESS;

1241: END IF;
1242: END IF;
1243: end if;
1244:
1245: x_return_status := FND_API.G_RET_STS_SUCCESS;
1246:
1247: exception
1248: when others then
1249:

Line 1262: x_return_status := FND_API.G_RET_STS_ERROR;

1258: , x_mesg_token_tbl => l_out_mesg_token_tbl
1259: );
1260: l_mesg_token_tbl := l_out_mesg_token_tbl;
1261:
1262: x_return_status := FND_API.G_RET_STS_ERROR;
1263: x_mesg_token_tbl := l_mesg_token_tbl ;
1264: return;
1265:
1266: end;

Line 1284: raise fnd_api.g_exc_unexpected_error;

1280: X_Ent_Type=> 6,
1281: X_Return_Status=>l_trans_exist);
1282:
1283: IF(l_trans_exist='F') THEN
1284: raise fnd_api.g_exc_unexpected_error;
1285: END IF;
1286: END IF;
1287:
1288: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1288: x_return_status := FND_API.G_RET_STS_SUCCESS;

1284: raise fnd_api.g_exc_unexpected_error;
1285: END IF;
1286: END IF;
1287:
1288: x_return_status := FND_API.G_RET_STS_SUCCESS;
1289:
1290: exception
1291: when others then
1292:

Line 1305: x_return_status := FND_API.G_RET_STS_ERROR;

1301: , x_mesg_token_tbl => l_out_mesg_token_tbl
1302: );
1303: l_mesg_token_tbl := l_out_mesg_token_tbl;
1304:
1305: x_return_status := FND_API.G_RET_STS_ERROR;
1306: x_mesg_token_tbl := l_mesg_token_tbl ;
1307: return;
1308:
1309: end;

Line 1330: raise fnd_api.g_exc_unexpected_error;

1326: where wip_entity_name = p_eam_wo_rec.wip_entity_name
1327: and organization_id = p_eam_wo_rec.organization_id;
1328:
1329: if(l_count > 0) then
1330: raise fnd_api.g_exc_unexpected_error;
1331: end if;
1332:
1333: end if;
1334:

Line 1335: x_return_status := FND_API.G_RET_STS_SUCCESS;

1331: end if;
1332:
1333: end if;
1334:
1335: x_return_status := FND_API.G_RET_STS_SUCCESS;
1336:
1337: exception
1338: when fnd_api.g_exc_unexpected_error then
1339:

Line 1338: when fnd_api.g_exc_unexpected_error then

1334:
1335: x_return_status := FND_API.G_RET_STS_SUCCESS;
1336:
1337: exception
1338: when fnd_api.g_exc_unexpected_error then
1339:
1340: l_token_tbl(1).token_name := 'Wip Entity Name';
1341: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
1342:

Line 1352: x_return_status := FND_API.G_RET_STS_ERROR;

1348: , x_mesg_token_tbl => l_out_mesg_token_tbl
1349: );
1350: l_mesg_token_tbl := l_out_mesg_token_tbl;
1351:
1352: x_return_status := FND_API.G_RET_STS_ERROR;
1353: x_mesg_token_tbl := l_mesg_token_tbl ;
1354: return;
1355:
1356: end;

Line 1374: raise fnd_api.g_exc_unexpected_error;

1370: from wip_entities
1371: where wip_entity_id = p_eam_wo_rec.wip_entity_id;
1372:
1373: if(l_count > 0) then
1374: raise fnd_api.g_exc_unexpected_error;
1375: end if;
1376: end if;
1377:
1378: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1378: x_return_status := FND_API.G_RET_STS_SUCCESS;

1374: raise fnd_api.g_exc_unexpected_error;
1375: end if;
1376: end if;
1377:
1378: x_return_status := FND_API.G_RET_STS_SUCCESS;
1379:
1380: exception
1381: when fnd_api.g_exc_unexpected_error then
1382:

Line 1381: when fnd_api.g_exc_unexpected_error then

1377:
1378: x_return_status := FND_API.G_RET_STS_SUCCESS;
1379:
1380: exception
1381: when fnd_api.g_exc_unexpected_error then
1382:
1383: l_token_tbl(1).token_name := 'Wip Entity Id';
1384: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_id;
1385:

Line 1395: x_return_status := FND_API.G_RET_STS_ERROR;

1391: , x_mesg_token_tbl => l_out_mesg_token_tbl
1392: );
1393: l_mesg_token_tbl := l_out_mesg_token_tbl;
1394:
1395: x_return_status := FND_API.G_RET_STS_ERROR;
1396: x_mesg_token_tbl := l_mesg_token_tbl ;
1397: return;
1398:
1399: end;

Line 1409: raise fnd_api.g_exc_unexpected_error;

1405: begin
1406:
1407: if p_eam_wo_rec.firm_planned_flag not in (wip_constants.yes, wip_constants.no) then
1408:
1409: raise fnd_api.g_exc_unexpected_error;
1410:
1411: end if;
1412:
1413: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1413: x_return_status := FND_API.G_RET_STS_SUCCESS;

1409: raise fnd_api.g_exc_unexpected_error;
1410:
1411: end if;
1412:
1413: x_return_status := FND_API.G_RET_STS_SUCCESS;
1414:
1415: exception
1416: when fnd_api.g_exc_unexpected_error then
1417:

Line 1416: when fnd_api.g_exc_unexpected_error then

1412:
1413: x_return_status := FND_API.G_RET_STS_SUCCESS;
1414:
1415: exception
1416: when fnd_api.g_exc_unexpected_error then
1417:
1418: l_token_tbl(1).token_name := 'Firm Planned Flag';
1419: l_token_tbl(1).token_value := p_eam_wo_rec.firm_planned_flag;
1420:

Line 1430: x_return_status := FND_API.G_RET_STS_ERROR;

1426: , x_mesg_token_tbl => l_out_mesg_token_tbl
1427: );
1428: l_mesg_token_tbl := l_out_mesg_token_tbl;
1429:
1430: x_return_status := FND_API.G_RET_STS_ERROR;
1431: x_mesg_token_tbl := l_mesg_token_tbl ;
1432: return;
1433:
1434: end;

Line 1447: raise fnd_api.g_exc_unexpected_error;

1443: begin
1444:
1445: if upper(p_eam_wo_rec.issue_zero_cost_flag) not in ('Y','N') then
1446:
1447: raise fnd_api.g_exc_unexpected_error;
1448:
1449: end if;
1450:
1451: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1451: x_return_status := FND_API.G_RET_STS_SUCCESS;

1447: raise fnd_api.g_exc_unexpected_error;
1448:
1449: end if;
1450:
1451: x_return_status := FND_API.G_RET_STS_SUCCESS;
1452:
1453: exception
1454: when fnd_api.g_exc_unexpected_error then
1455:

Line 1454: when fnd_api.g_exc_unexpected_error then

1450:
1451: x_return_status := FND_API.G_RET_STS_SUCCESS;
1452:
1453: exception
1454: when fnd_api.g_exc_unexpected_error then
1455:
1456: l_token_tbl(1).token_name := 'ISSUE_ZERO_FLAG';
1457: l_token_tbl(1).token_value := p_eam_wo_rec.issue_zero_cost_flag;
1458:

Line 1468: x_return_status := FND_API.G_RET_STS_ERROR;

1464: , x_mesg_token_tbl => l_out_mesg_token_tbl
1465: );
1466: l_mesg_token_tbl := l_out_mesg_token_tbl;
1467:
1468: x_return_status := FND_API.G_RET_STS_ERROR;
1469: x_mesg_token_tbl := l_mesg_token_tbl ;
1470: return;
1471:
1472: end;

Line 1489: x_return_status := FND_API.G_RET_STS_SUCCESS;

1485: where schedule_group_id = p_eam_wo_rec.schedule_group_id
1486: and organization_id = p_eam_wo_rec.organization_id;
1487: end if;
1488:
1489: x_return_status := FND_API.G_RET_STS_SUCCESS;
1490:
1491: exception
1492: when no_data_found then
1493:

Line 1506: x_return_status := FND_API.G_RET_STS_ERROR;

1502: , x_mesg_token_tbl => l_out_mesg_token_tbl
1503: );
1504: l_mesg_token_tbl := l_out_mesg_token_tbl;
1505:
1506: x_return_status := FND_API.G_RET_STS_ERROR;
1507: x_mesg_token_tbl := l_mesg_token_tbl ;
1508: return;
1509:
1510: end;

Line 1597: raise fnd_api.g_exc_unexpected_error;

1593: OR p_eam_wo_rec.attribute15<>p_old_eam_wo_rec.attribute15
1594: OR p_eam_wo_rec.material_issue_by_mo<>p_old_eam_wo_rec.material_issue_by_mo
1595: OR p_eam_wo_rec.issue_zero_cost_flag<>p_old_eam_wo_rec.issue_zero_cost_flag
1596: ) THEN
1597: raise fnd_api.g_exc_unexpected_error;
1598: END IF;
1599: exception
1600: when fnd_api.g_exc_unexpected_error then
1601: l_token_tbl(1).token_name := 'STATUS_TYPE';

Line 1600: when fnd_api.g_exc_unexpected_error then

1596: ) THEN
1597: raise fnd_api.g_exc_unexpected_error;
1598: END IF;
1599: exception
1600: when fnd_api.g_exc_unexpected_error then
1601: l_token_tbl(1).token_name := 'STATUS_TYPE';
1602: l_token_tbl(1).token_value := p_eam_wo_rec.status_type;
1603:
1604: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 1613: x_return_status := FND_API.G_RET_STS_ERROR;

1609: , x_mesg_token_tbl => l_out_mesg_token_tbl
1610: );
1611: l_mesg_token_tbl := l_out_mesg_token_tbl;
1612:
1613: x_return_status := FND_API.G_RET_STS_ERROR;
1614: x_mesg_token_tbl := l_mesg_token_tbl ;
1615: return;
1616: end;
1617:

Line 1638: raise fnd_api.g_exc_unexpected_error;

1634:
1635: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and
1636: p_eam_wo_rec.status_type not in (wip_constants.unreleased, wip_constants.released, wip_constants.hold, wip_constants.draft)) then
1637:
1638: raise fnd_api.g_exc_unexpected_error;
1639:
1640: elsif (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE) then
1641: if(p_eam_wo_rec.status_type not in (wip_constants.unreleased, wip_constants.released, wip_constants.comp_chrg,wip_constants.comp_nochrg, wip_constants.closed,
1642: wip_constants.hold, wip_constants.cancelled, wip_constants.pend_sched, wip_constants.draft)

Line 1654: raise fnd_api.g_exc_unexpected_error;

1650: OR (p_eam_wo_rec.status_type=wip_constants.comp_nochrg
1651: AND p_old_eam_wo_rec.status_type NOT IN
1652: (wip_constants.comp_chrg, wip_constants.comp_nochrg,wip_constants.closed,wip_constants.fail_close))) then
1653:
1654: raise fnd_api.g_exc_unexpected_error;
1655:
1656: end if;
1657:
1658: end if;

Line 1661: x_return_status := FND_API.G_RET_STS_SUCCESS;

1657:
1658: end if;
1659:
1660:
1661: x_return_status := FND_API.G_RET_STS_SUCCESS;
1662:
1663: exception
1664:
1665: when fnd_api.g_exc_unexpected_error then

Line 1665: when fnd_api.g_exc_unexpected_error then

1661: x_return_status := FND_API.G_RET_STS_SUCCESS;
1662:
1663: exception
1664:
1665: when fnd_api.g_exc_unexpected_error then
1666:
1667: l_token_tbl(1).token_name := 'Status type';
1668: l_token_tbl(1).token_value := p_eam_wo_rec.status_type;
1669:

Line 1679: x_return_status := FND_API.G_RET_STS_ERROR;

1675: , x_mesg_token_tbl => l_out_mesg_token_tbl
1676: );
1677: l_mesg_token_tbl := l_out_mesg_token_tbl;
1678:
1679: x_return_status := FND_API.G_RET_STS_ERROR;
1680: x_mesg_token_tbl := l_mesg_token_tbl ;
1681: return;
1682:
1683: end;

Line 1692: raise fnd_api.g_exc_unexpected_error;

1688:
1689: begin
1690:
1691: if(p_eam_wo_rec.job_quantity <> 1) then
1692: raise fnd_api.g_exc_unexpected_error;
1693: end if;
1694:
1695: x_return_status := FND_API.G_RET_STS_SUCCESS;
1696:

Line 1695: x_return_status := FND_API.G_RET_STS_SUCCESS;

1691: if(p_eam_wo_rec.job_quantity <> 1) then
1692: raise fnd_api.g_exc_unexpected_error;
1693: end if;
1694:
1695: x_return_status := FND_API.G_RET_STS_SUCCESS;
1696:
1697: exception
1698: when fnd_api.g_exc_unexpected_error then
1699:

Line 1698: when fnd_api.g_exc_unexpected_error then

1694:
1695: x_return_status := FND_API.G_RET_STS_SUCCESS;
1696:
1697: exception
1698: when fnd_api.g_exc_unexpected_error then
1699:
1700: l_token_tbl(1).token_name := 'Job Quantity';
1701: l_token_tbl(1).token_value := p_eam_wo_rec.job_quantity;
1702:

Line 1712: x_return_status := FND_API.G_RET_STS_ERROR;

1708: , x_mesg_token_tbl => l_out_mesg_token_tbl
1709: );
1710: l_mesg_token_tbl := l_out_mesg_token_tbl;
1711:
1712: x_return_status := FND_API.G_RET_STS_ERROR;
1713: x_mesg_token_tbl := l_mesg_token_tbl ;
1714: return;
1715:
1716: end;

Line 1731: if p_eam_wo_rec.asset_activity_id is not null and p_eam_wo_rec.asset_activity_id <> FND_API.G_MISS_NUM then

1727:
1728: ACTIVITY_WO_EXISTS EXCEPTION;
1729: begin
1730: -- # 3436679 code added to prevent the defaulting of the asset activity if user removes it while updating work order
1731: if p_eam_wo_rec.asset_activity_id is not null and p_eam_wo_rec.asset_activity_id <> FND_API.G_MISS_NUM then
1732:
1733: select 1
1734: into g_dummy
1735: from mtl_system_items

Line 1752: raise fnd_api.g_exc_unexpected_error;

1748: p_eam_op_tbl => l_eam_op_tbl
1749: ,p_wip_entity_id => p_eam_wo_rec.wip_entity_id
1750: ,p_organization_id => p_eam_wo_rec.organization_id) = false
1751: or l_mat_req_exists <> 0) then
1752: raise fnd_api.g_exc_unexpected_error;
1753: end if;
1754:
1755:
1756: end if;

Line 1758: x_return_status := FND_API.G_RET_STS_SUCCESS;

1754:
1755:
1756: end if;
1757:
1758: x_return_status := FND_API.G_RET_STS_SUCCESS;
1759:
1760: exception
1761: when fnd_api.g_exc_unexpected_error then
1762:

Line 1761: when fnd_api.g_exc_unexpected_error then

1757:
1758: x_return_status := FND_API.G_RET_STS_SUCCESS;
1759:
1760: exception
1761: when fnd_api.g_exc_unexpected_error then
1762:
1763: l_out_mesg_token_tbl := l_mesg_token_tbl;
1764: EAM_ERROR_MESSAGE_PVT.Add_Error_Token
1765: ( p_message_name => 'EAM_CANT_UPDATE_ACTIVITY'

Line 1772: x_return_status := FND_API.G_RET_STS_ERROR;

1768: , x_mesg_token_tbl => l_out_mesg_token_tbl
1769: );
1770: l_mesg_token_tbl := l_out_mesg_token_tbl;
1771:
1772: x_return_status := FND_API.G_RET_STS_ERROR;
1773: x_mesg_token_tbl := l_mesg_token_tbl ;
1774: return;
1775:
1776: when ACTIVITY_WO_EXISTS then

Line 1787: x_return_status := FND_API.G_RET_STS_ERROR;

1783: , x_mesg_token_tbl => l_out_mesg_token_tbl
1784: );
1785: l_mesg_token_tbl := l_out_mesg_token_tbl;
1786:
1787: x_return_status := FND_API.G_RET_STS_ERROR;
1788: x_mesg_token_tbl := l_mesg_token_tbl ;
1789: return;
1790:
1791: when others then

Line 1805: x_return_status := FND_API.G_RET_STS_ERROR;

1801: , x_mesg_token_tbl => l_out_mesg_token_tbl
1802: );
1803: l_mesg_token_tbl := l_out_mesg_token_tbl;
1804:
1805: x_return_status := FND_API.G_RET_STS_ERROR;
1806: x_mesg_token_tbl := l_mesg_token_tbl ;
1807: return;
1808:
1809: end;

Line 1823: if (p_eam_wo_rec.asset_activity_id is not null and p_eam_wo_rec.asset_activity_id <> FND_API.G_MISS_NUM and p_eam_wo_rec.maintenance_object_source = 1) then

1819: l_end_date DATE;
1820:
1821: begin
1822: -- # 3436679 code added to prevent the defaulting of the asset activity if user removes it while updating work order
1823: if (p_eam_wo_rec.asset_activity_id is not null and p_eam_wo_rec.asset_activity_id <> FND_API.G_MISS_NUM and p_eam_wo_rec.maintenance_object_source = 1) then
1824:
1825: if (p_eam_wo_rec.maintenance_object_type = 3) then
1826:
1827: select meaa.start_date_active, meaa.end_date_active

Line 1866: x_return_status := FND_API.G_RET_STS_SUCCESS;

1862: end if;
1863:
1864: end if;
1865:
1866: x_return_status := FND_API.G_RET_STS_SUCCESS;
1867:
1868: exception
1869: WHEN l_wo_asset_activity_err THEN
1870:

Line 1880: x_return_status := FND_API.G_RET_STS_ERROR;

1876: , x_mesg_token_tbl => l_out_mesg_token_tbl
1877: );
1878: l_mesg_token_tbl := l_out_mesg_token_tbl;
1879:
1880: x_return_status := FND_API.G_RET_STS_ERROR;
1881: x_mesg_token_tbl := l_mesg_token_tbl ;
1882: return;
1883:
1884: when others then

Line 1898: x_return_status := FND_API.G_RET_STS_ERROR;

1894: , x_mesg_token_tbl => l_out_mesg_token_tbl
1895: );
1896: l_mesg_token_tbl := l_out_mesg_token_tbl;
1897:
1898: x_return_status := FND_API.G_RET_STS_ERROR;
1899: x_mesg_token_tbl := l_mesg_token_tbl ;
1900: return;
1901:
1902: end;

Line 1913: raise fnd_api.g_exc_unexpected_error;

1909:
1910: if(p_eam_wo_rec.wip_supply_type is not null and p_eam_wo_rec.wip_supply_type not in (wip_constants.push, wip_constants.bulk, wip_constants.based_on_bom)) then
1911: --not a valid supply type
1912:
1913: raise fnd_api.g_exc_unexpected_error;
1914:
1915: end if;
1916:
1917: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1917: x_return_status := FND_API.G_RET_STS_SUCCESS;

1913: raise fnd_api.g_exc_unexpected_error;
1914:
1915: end if;
1916:
1917: x_return_status := FND_API.G_RET_STS_SUCCESS;
1918:
1919: exception
1920: when fnd_api.g_exc_unexpected_error then
1921:

Line 1920: when fnd_api.g_exc_unexpected_error then

1916:
1917: x_return_status := FND_API.G_RET_STS_SUCCESS;
1918:
1919: exception
1920: when fnd_api.g_exc_unexpected_error then
1921:
1922: l_token_tbl(1).token_name := 'Wip Supply Type';
1923: l_token_tbl(1).token_value := p_eam_wo_rec.wip_supply_type;
1924:

Line 1934: x_return_status := FND_API.G_RET_STS_ERROR;

1930: , x_mesg_token_tbl => l_out_mesg_token_tbl
1931: );
1932: l_mesg_token_tbl := l_out_mesg_token_tbl;
1933:
1934: x_return_status := FND_API.G_RET_STS_ERROR;
1935: x_mesg_token_tbl := l_mesg_token_tbl ;
1936: return;
1937:
1938: end;

Line 1958: x_return_status := FND_API.G_RET_STS_SUCCESS;

1954: and routing_type = 1;
1955:
1956: end if;
1957:
1958: x_return_status := FND_API.G_RET_STS_SUCCESS;
1959:
1960: exception
1961: when no_data_found then
1962:

Line 1975: x_return_status := FND_API.G_RET_STS_ERROR;

1971: , x_mesg_token_tbl => l_out_mesg_token_tbl
1972: );
1973: l_mesg_token_tbl := l_out_mesg_token_tbl;
1974:
1975: x_return_status := FND_API.G_RET_STS_ERROR;
1976: x_mesg_token_tbl := l_mesg_token_tbl ;
1977: return;
1978:
1979: end;

Line 1998: x_return_status := FND_API.G_RET_STS_SUCCESS;

1994: and assembly_type = 1;
1995:
1996: end if;
1997:
1998: x_return_status := FND_API.G_RET_STS_SUCCESS;
1999:
2000: exception
2001: when no_data_found then
2002:

Line 2015: x_return_status := FND_API.G_RET_STS_ERROR;

2011: , x_mesg_token_tbl => l_out_mesg_token_tbl
2012: );
2013: l_mesg_token_tbl := l_out_mesg_token_tbl;
2014:
2015: x_return_status := FND_API.G_RET_STS_ERROR;
2016: x_mesg_token_tbl := l_mesg_token_tbl ;
2017: return;
2018:
2019: end;

Line 2060: x_return_status := FND_API.G_RET_STS_SUCCESS;

2056: AND (ppp.end_date_active IS NULL OR trunc(ppp.end_date_active) >= trunc(l_min_date));
2057: /* Added for bug#5346213 End */
2058:
2059: END IF;
2060: x_return_status := FND_API.G_RET_STS_SUCCESS;
2061:
2062: exception
2063: when no_data_found then
2064:

Line 2077: x_return_status := FND_API.G_RET_STS_ERROR;

2073: , x_mesg_token_tbl => l_out_mesg_token_tbl
2074: );
2075: l_mesg_token_tbl := l_out_mesg_token_tbl;
2076:
2077: x_return_status := FND_API.G_RET_STS_ERROR;
2078: x_mesg_token_tbl := l_mesg_token_tbl ;
2079: return;
2080:
2081: end;

Line 2120: x_return_status := FND_API.G_RET_STS_SUCCESS;

2116:
2117: END IF;
2118:
2119: END IF;
2120: x_return_status := FND_API.G_RET_STS_SUCCESS;
2121:
2122: exception
2123: when no_data_found then
2124:

Line 2137: x_return_status := FND_API.G_RET_STS_ERROR;

2133: , x_mesg_token_tbl => l_out_mesg_token_tbl
2134: );
2135: l_mesg_token_tbl := l_out_mesg_token_tbl;
2136:
2137: x_return_status := FND_API.G_RET_STS_ERROR;
2138: x_mesg_token_tbl := l_mesg_token_tbl ;
2139: return;
2140:
2141: end;

Line 2154: raise fnd_api.g_exc_unexpected_error;

2150:
2151: if p_eam_wo_rec.pm_suggested_start_date is not null and
2152: p_eam_wo_rec.pm_suggested_end_date is not null then
2153:
2154: raise fnd_api.g_exc_unexpected_error;
2155:
2156: end if;
2157:
2158: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2158: x_return_status := FND_API.G_RET_STS_SUCCESS;

2154: raise fnd_api.g_exc_unexpected_error;
2155:
2156: end if;
2157:
2158: x_return_status := FND_API.G_RET_STS_SUCCESS;
2159:
2160: exception
2161: when fnd_api.g_exc_unexpected_error then
2162:

Line 2161: when fnd_api.g_exc_unexpected_error then

2157:
2158: x_return_status := FND_API.G_RET_STS_SUCCESS;
2159:
2160: exception
2161: when fnd_api.g_exc_unexpected_error then
2162:
2163: l_token_tbl(1).token_name := 'Wip Entity Name';
2164: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
2165:

Line 2175: x_return_status := FND_API.G_RET_STS_ERROR;

2171: , x_mesg_token_tbl => l_out_mesg_token_tbl
2172: );
2173: l_mesg_token_tbl := l_out_mesg_token_tbl;
2174:
2175: x_return_status := FND_API.G_RET_STS_ERROR;
2176: x_mesg_token_tbl := l_mesg_token_tbl ;
2177: return;
2178:
2179: end;

Line 2191: raise fnd_api.g_exc_unexpected_error;

2187:
2188: if p_eam_wo_rec.due_date is not null and
2189: p_eam_wo_rec.requested_start_date is not null then
2190:
2191: raise fnd_api.g_exc_unexpected_error;
2192:
2193: end if;
2194:
2195: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2195: x_return_status := FND_API.G_RET_STS_SUCCESS;

2191: raise fnd_api.g_exc_unexpected_error;
2192:
2193: end if;
2194:
2195: x_return_status := FND_API.G_RET_STS_SUCCESS;
2196:
2197: exception
2198: when fnd_api.g_exc_unexpected_error then
2199:

Line 2198: when fnd_api.g_exc_unexpected_error then

2194:
2195: x_return_status := FND_API.G_RET_STS_SUCCESS;
2196:
2197: exception
2198: when fnd_api.g_exc_unexpected_error then
2199:
2200: l_token_tbl(1).token_name := 'Wip Entity Name';
2201: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
2202:

Line 2212: x_return_status := FND_API.G_RET_STS_ERROR;

2208: , x_mesg_token_tbl => l_out_mesg_token_tbl
2209: );
2210: l_mesg_token_tbl := l_out_mesg_token_tbl;
2211:
2212: x_return_status := FND_API.G_RET_STS_ERROR;
2213: x_mesg_token_tbl := l_mesg_token_tbl ;
2214: return;
2215:
2216: end;

Line 2228: raise fnd_api.g_exc_unexpected_error;

2224:
2225: if p_eam_wo_rec.due_date is null and
2226: p_eam_wo_rec.requested_start_date is null then
2227:
2228: raise fnd_api.g_exc_unexpected_error;
2229:
2230: end if;
2231:
2232: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2232: x_return_status := FND_API.G_RET_STS_SUCCESS;

2228: raise fnd_api.g_exc_unexpected_error;
2229:
2230: end if;
2231:
2232: x_return_status := FND_API.G_RET_STS_SUCCESS;
2233:
2234: exception
2235: when fnd_api.g_exc_unexpected_error then
2236:

Line 2235: when fnd_api.g_exc_unexpected_error then

2231:
2232: x_return_status := FND_API.G_RET_STS_SUCCESS;
2233:
2234: exception
2235: when fnd_api.g_exc_unexpected_error then
2236:
2237: l_token_tbl(1).token_name := 'Wip Entity Name';
2238: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
2239:

Line 2249: x_return_status := FND_API.G_RET_STS_ERROR;

2245: , x_mesg_token_tbl => l_out_mesg_token_tbl
2246: );
2247: l_mesg_token_tbl := l_out_mesg_token_tbl;
2248:
2249: x_return_status := FND_API.G_RET_STS_ERROR;
2250: x_mesg_token_tbl := l_mesg_token_tbl ;
2251: return;
2252:
2253: end;

Line 2274: raise fnd_api.g_exc_unexpected_error;

2270: end if;
2271:
2272: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and l_date_count = 0) then
2273: --all job creations must have at least one date
2274: raise fnd_api.g_exc_unexpected_error;
2275: end if;
2276:
2277: if p_eam_wo_rec.requested_start_date is not null then
2278:

Line 2298: x_return_status := FND_API.G_RET_STS_SUCCESS;

2294: and mp.calendar_exception_set_id = bcd.exception_set_id
2295: and bcd.calendar_date = trunc(p_eam_wo_rec.due_date);
2296: end if;
2297:
2298: x_return_status := FND_API.G_RET_STS_SUCCESS;
2299:
2300: exception
2301: when others then
2302:

Line 2315: x_return_status := FND_API.G_RET_STS_ERROR;

2311: , x_mesg_token_tbl => l_out_mesg_token_tbl
2312: );
2313: l_mesg_token_tbl := l_out_mesg_token_tbl;
2314:
2315: x_return_status := FND_API.G_RET_STS_ERROR;
2316: x_mesg_token_tbl := l_mesg_token_tbl ;
2317: return;
2318:
2319: end;

Line 2325: raise fnd_api.g_exc_unexpected_error;

2321: begin
2322: IF(p_eam_wo_rec.scheduled_start_date IS NOT NULL)
2323: AND (p_eam_wo_rec.scheduled_completion_date IS NOT NULL)
2324: AND (p_eam_wo_rec.scheduled_start_date > p_eam_wo_rec.scheduled_completion_date) THEN
2325: raise fnd_api.g_exc_unexpected_error;
2326: END IF;
2327: exception
2328: when fnd_api.g_exc_unexpected_error then
2329: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 2328: when fnd_api.g_exc_unexpected_error then

2324: AND (p_eam_wo_rec.scheduled_start_date > p_eam_wo_rec.scheduled_completion_date) THEN
2325: raise fnd_api.g_exc_unexpected_error;
2326: END IF;
2327: exception
2328: when fnd_api.g_exc_unexpected_error then
2329: l_out_mesg_token_tbl := l_mesg_token_tbl;
2330: EAM_ERROR_MESSAGE_PVT.Add_Error_Token
2331: ( p_message_name => 'EAM_WO_SCHEDULE_DATE_MORE'
2332: , p_token_tbl => l_token_tbl

Line 2338: x_return_status := FND_API.G_RET_STS_ERROR;

2334: , x_mesg_token_tbl => l_out_mesg_token_tbl
2335: );
2336: l_mesg_token_tbl := l_out_mesg_token_tbl;
2337:
2338: x_return_status := FND_API.G_RET_STS_ERROR;
2339: x_mesg_token_tbl := l_mesg_token_tbl ;
2340: return;
2341: end;
2342: --end of fix for 3396136

Line 2376: x_return_status := FND_API.G_RET_STS_SUCCESS;

2372: and mp.organization_id = p_eam_wo_rec.organization_id
2373: and mp.master_organization_id = pun.master_organization_id;
2374: end if;
2375:
2376: x_return_status := FND_API.G_RET_STS_SUCCESS;
2377:
2378: exception
2379: when too_many_rows then
2380: null; -- the query returning multiple rows is ok

Line 2396: x_return_status := FND_API.G_RET_STS_ERROR;

2392: , x_mesg_token_tbl => l_out_mesg_token_tbl
2393: );
2394: l_mesg_token_tbl := l_out_mesg_token_tbl;
2395:
2396: x_return_status := FND_API.G_RET_STS_ERROR;
2397: x_mesg_token_tbl := l_mesg_token_tbl ;
2398: return;
2399:
2400: end;

Line 2411: raise fnd_api.g_exc_unexpected_error;

2407: l_disable_date date;
2408: WO_CANT_CH_WIPACCT exception;
2409: begin
2410: if (p_eam_wo_rec.class_code is null) then
2411: raise fnd_api.g_exc_unexpected_error;
2412: end if;
2413:
2414: if p_eam_wo_rec.class_code is not null then
2415:

Line 2425: raise fnd_api.g_exc_unexpected_error;

2421: and organization_id = p_eam_wo_rec.organization_id;
2422:
2423: if(l_disable_date is not null and
2424: l_disable_date < nvl(p_eam_wo_rec.due_date, p_eam_wo_rec.requested_start_date)) then
2425: raise fnd_api.g_exc_unexpected_error;
2426: end if;
2427:
2428: end if;
2429:

Line 2445: x_return_status := FND_API.G_RET_STS_SUCCESS;

2441: raise WO_CANT_CH_WIPACCT;
2442: END IF;
2443: end if;
2444:
2445: x_return_status := FND_API.G_RET_STS_SUCCESS;
2446:
2447: exception
2448:
2449: when WO_CANT_CH_WIPACCT then

Line 2460: x_return_status := FND_API.G_RET_STS_ERROR;

2456: , x_mesg_token_tbl => l_out_mesg_token_tbl
2457: );
2458: l_mesg_token_tbl := l_out_mesg_token_tbl;
2459:
2460: x_return_status := FND_API.G_RET_STS_ERROR;
2461: x_mesg_token_tbl := l_mesg_token_tbl ;
2462: return;
2463:
2464: when others then

Line 2478: x_return_status := FND_API.G_RET_STS_ERROR;

2474: , x_mesg_token_tbl => l_out_mesg_token_tbl
2475: );
2476: l_mesg_token_tbl := l_out_mesg_token_tbl;
2477:
2478: x_return_status := FND_API.G_RET_STS_ERROR;
2479: x_mesg_token_tbl := l_mesg_token_tbl ;
2480: return;
2481:
2482: end;

Line 2500: x_return_status := FND_API.G_RET_STS_SUCCESS;

2496: p_revision => p_eam_wo_rec.bom_revision,
2497: p_revision_date => p_eam_wo_rec.bom_revision_date,
2498: p_start_date => l_start_date);
2499: */
2500: x_return_status := FND_API.G_RET_STS_SUCCESS;
2501:
2502: exception
2503: when others then
2504:

Line 2517: x_return_status := FND_API.G_RET_STS_ERROR;

2513: , x_mesg_token_tbl => l_out_mesg_token_tbl
2514: );
2515: l_mesg_token_tbl := l_out_mesg_token_tbl;
2516:
2517: x_return_status := FND_API.G_RET_STS_ERROR;
2518:
2519: x_mesg_token_tbl := l_mesg_token_tbl ;
2520: return;
2521:

Line 2552: x_return_status := FND_API.G_RET_STS_SUCCESS;

2548: p_start_date => l_start_date);
2549:
2550: end if;
2551: */
2552: x_return_status := FND_API.G_RET_STS_SUCCESS;
2553:
2554: exception
2555: when others then
2556:

Line 2569: x_return_status := FND_API.G_RET_STS_ERROR;

2565: , x_mesg_token_tbl => l_out_mesg_token_tbl
2566: );
2567: l_mesg_token_tbl := l_out_mesg_token_tbl;
2568:
2569: x_return_status := FND_API.G_RET_STS_ERROR;
2570: x_mesg_token_tbl := l_mesg_token_tbl ;
2571: return;
2572:
2573: end;

Line 2584: raise fnd_api.g_exc_unexpected_error;

2580: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
2581: if(p_eam_wo_rec.manual_rebuild_flag is not null and
2582: (p_eam_wo_rec.rebuild_item_id is null or
2583: p_eam_wo_rec.manual_rebuild_flag not in ('Y', 'N'))) then
2584: raise fnd_api.g_exc_unexpected_error;
2585: end if;
2586:
2587: if(p_eam_wo_rec.manual_rebuild_flag is null and
2588: p_eam_wo_rec.rebuild_item_id is not null) then

Line 2589: raise fnd_api.g_exc_unexpected_error;

2585: end if;
2586:
2587: if(p_eam_wo_rec.manual_rebuild_flag is null and
2588: p_eam_wo_rec.rebuild_item_id is not null) then
2589: raise fnd_api.g_exc_unexpected_error;
2590: end if;
2591: end if;
2592:
2593: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2593: x_return_status := FND_API.G_RET_STS_SUCCESS;

2589: raise fnd_api.g_exc_unexpected_error;
2590: end if;
2591: end if;
2592:
2593: x_return_status := FND_API.G_RET_STS_SUCCESS;
2594:
2595: exception
2596: when fnd_api.g_exc_unexpected_error then
2597:

Line 2596: when fnd_api.g_exc_unexpected_error then

2592:
2593: x_return_status := FND_API.G_RET_STS_SUCCESS;
2594:
2595: exception
2596: when fnd_api.g_exc_unexpected_error then
2597:
2598: l_token_tbl(1).token_name := 'Manual Rebuild Flag';
2599: l_token_tbl(1).token_value := p_eam_wo_rec.manual_rebuild_flag;
2600:

Line 2610: x_return_status := FND_API.G_RET_STS_ERROR;

2606: , x_mesg_token_tbl => l_out_mesg_token_tbl
2607: );
2608: l_mesg_token_tbl := l_out_mesg_token_tbl;
2609:
2610: x_return_status := FND_API.G_RET_STS_ERROR;
2611: x_mesg_token_tbl := l_mesg_token_tbl ;
2612: return;
2613:
2614: end;

Line 2633: raise fnd_api.g_exc_unexpected_error;

2629: and organization_id = p_eam_wo_rec.organization_id;
2630:
2631: if(l_disable_date is not null and
2632: l_disable_date < l_job_date) then
2633: raise fnd_api.g_exc_unexpected_error;
2634: end if;
2635: end if;
2636:
2637: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2637: x_return_status := FND_API.G_RET_STS_SUCCESS;

2633: raise fnd_api.g_exc_unexpected_error;
2634: end if;
2635: end if;
2636:
2637: x_return_status := FND_API.G_RET_STS_SUCCESS;
2638:
2639: exception
2640: when others then
2641:

Line 2660: x_return_status := FND_API.G_RET_STS_ERROR;

2656: , x_mesg_token_tbl => l_out_mesg_token_tbl
2657: );
2658: l_mesg_token_tbl := l_out_mesg_token_tbl;
2659:
2660: x_return_status := FND_API.G_RET_STS_ERROR;
2661: x_mesg_token_tbl := l_mesg_token_tbl ;
2662: return;
2663:
2664: end;

Line 2672: raise fnd_api.g_exc_unexpected_error;

2668:
2669: begin
2670: if (p_eam_wo_rec.notification_required is not null and
2671: p_eam_wo_rec.notification_required not in ('Y', 'N')) then
2672: raise fnd_api.g_exc_unexpected_error;
2673: end if;
2674:
2675: x_return_status := FND_API.G_RET_STS_SUCCESS;
2676:

Line 2675: x_return_status := FND_API.G_RET_STS_SUCCESS;

2671: p_eam_wo_rec.notification_required not in ('Y', 'N')) then
2672: raise fnd_api.g_exc_unexpected_error;
2673: end if;
2674:
2675: x_return_status := FND_API.G_RET_STS_SUCCESS;
2676:
2677: exception
2678: when fnd_api.g_exc_unexpected_error then
2679:

Line 2678: when fnd_api.g_exc_unexpected_error then

2674:
2675: x_return_status := FND_API.G_RET_STS_SUCCESS;
2676:
2677: exception
2678: when fnd_api.g_exc_unexpected_error then
2679:
2680: l_token_tbl(1).token_name := 'Notification Required';
2681: l_token_tbl(1).token_value := p_eam_wo_rec.notification_required;
2682:

Line 2692: x_return_status := FND_API.G_RET_STS_ERROR;

2688: , x_mesg_token_tbl => l_out_mesg_token_tbl
2689: );
2690: l_mesg_token_tbl := l_out_mesg_token_tbl;
2691:
2692: x_return_status := FND_API.G_RET_STS_ERROR;
2693: x_mesg_token_tbl := l_mesg_token_tbl ;
2694: return;
2695:
2696: end;

Line 2711: x_return_status := FND_API.G_RET_STS_SUCCESS;

2707: and lookup_code = p_eam_wo_rec.shutdown_type
2708: and enabled_flag = 'Y';
2709: end if;
2710:
2711: x_return_status := FND_API.G_RET_STS_SUCCESS;
2712:
2713: exception
2714: when no_data_found then
2715:

Line 2728: x_return_status := FND_API.G_RET_STS_ERROR;

2724: , x_mesg_token_tbl => l_out_mesg_token_tbl
2725: );
2726: l_mesg_token_tbl := l_out_mesg_token_tbl;
2727:
2728: x_return_status := FND_API.G_RET_STS_ERROR;
2729: x_mesg_token_tbl := l_mesg_token_tbl ;
2730: return;
2731:
2732: end;

Line 2740: raise fnd_api.g_exc_unexpected_error;

2736:
2737: begin
2738: if (p_eam_wo_rec.tagout_required is not null and
2739: p_eam_wo_rec.tagout_required not in ('Y', 'N')) then
2740: raise fnd_api.g_exc_unexpected_error;
2741: end if;
2742:
2743: x_return_status := FND_API.G_RET_STS_SUCCESS;
2744:

Line 2743: x_return_status := FND_API.G_RET_STS_SUCCESS;

2739: p_eam_wo_rec.tagout_required not in ('Y', 'N')) then
2740: raise fnd_api.g_exc_unexpected_error;
2741: end if;
2742:
2743: x_return_status := FND_API.G_RET_STS_SUCCESS;
2744:
2745: exception
2746: when fnd_api.g_exc_unexpected_error then
2747:

Line 2746: when fnd_api.g_exc_unexpected_error then

2742:
2743: x_return_status := FND_API.G_RET_STS_SUCCESS;
2744:
2745: exception
2746: when fnd_api.g_exc_unexpected_error then
2747:
2748: l_token_tbl(1).token_name := 'Tagout Required';
2749: l_token_tbl(1).token_value := p_eam_wo_rec.tagout_required;
2750:

Line 2760: x_return_status := FND_API.G_RET_STS_ERROR;

2756: , x_mesg_token_tbl => l_out_mesg_token_tbl
2757: );
2758: l_mesg_token_tbl := l_out_mesg_token_tbl;
2759:
2760: x_return_status := FND_API.G_RET_STS_ERROR;
2761: x_mesg_token_tbl := l_mesg_token_tbl ;
2762: return;
2763:
2764: end;

Line 2772: raise fnd_api.g_exc_unexpected_error;

2768:
2769: begin
2770: if p_eam_wo_rec.plan_maintenance is not null and
2771: p_eam_wo_rec.plan_maintenance not in ('Y', 'N') then
2772: raise fnd_api.g_exc_unexpected_error;
2773: end if;
2774:
2775: x_return_status := FND_API.G_RET_STS_SUCCESS;
2776:

Line 2775: x_return_status := FND_API.G_RET_STS_SUCCESS;

2771: p_eam_wo_rec.plan_maintenance not in ('Y', 'N') then
2772: raise fnd_api.g_exc_unexpected_error;
2773: end if;
2774:
2775: x_return_status := FND_API.G_RET_STS_SUCCESS;
2776:
2777: exception
2778: when fnd_api.g_exc_unexpected_error then
2779:

Line 2778: when fnd_api.g_exc_unexpected_error then

2774:
2775: x_return_status := FND_API.G_RET_STS_SUCCESS;
2776:
2777: exception
2778: when fnd_api.g_exc_unexpected_error then
2779:
2780: l_token_tbl(1).token_name := 'Plan Maintenance';
2781: l_token_tbl(1).token_value := p_eam_wo_rec.plan_maintenance;
2782:

Line 2792: x_return_status := FND_API.G_RET_STS_ERROR;

2788: , x_mesg_token_tbl => l_out_mesg_token_tbl
2789: );
2790: l_mesg_token_tbl := l_out_mesg_token_tbl;
2791:
2792: x_return_status := FND_API.G_RET_STS_ERROR;
2793: x_mesg_token_tbl := l_mesg_token_tbl ;
2794: return;
2795:
2796: end;

Line 2811: x_return_status := FND_API.G_RET_STS_SUCCESS;

2807: and lookup_code = p_eam_wo_rec.work_order_type
2808: and enabled_flag = 'Y';
2809: end if;
2810:
2811: x_return_status := FND_API.G_RET_STS_SUCCESS;
2812:
2813: exception
2814: when no_data_found then
2815:

Line 2828: x_return_status := FND_API.G_RET_STS_ERROR;

2824: , x_mesg_token_tbl => l_out_mesg_token_tbl
2825: );
2826: l_mesg_token_tbl := l_out_mesg_token_tbl;
2827:
2828: x_return_status := FND_API.G_RET_STS_ERROR;
2829: x_mesg_token_tbl := l_mesg_token_tbl ;
2830: return;
2831:
2832: end;

Line 2847: x_return_status := FND_API.G_RET_STS_SUCCESS;

2843: and lookup_code = p_eam_wo_rec.activity_type
2844: and enabled_flag = 'Y';
2845: end if;
2846:
2847: x_return_status := FND_API.G_RET_STS_SUCCESS;
2848:
2849: exception
2850: when no_data_found then
2851:

Line 2864: x_return_status := FND_API.G_RET_STS_ERROR;

2860: , x_mesg_token_tbl => l_out_mesg_token_tbl
2861: );
2862: l_mesg_token_tbl := l_out_mesg_token_tbl;
2863:
2864: x_return_status := FND_API.G_RET_STS_ERROR;
2865: x_mesg_token_tbl := l_mesg_token_tbl ;
2866: return;
2867:
2868: end;

Line 2883: x_return_status := FND_API.G_RET_STS_SUCCESS;

2879: and lookup_code = p_eam_wo_rec.activity_cause
2880: and enabled_flag = 'Y';
2881: end if;
2882:
2883: x_return_status := FND_API.G_RET_STS_SUCCESS;
2884:
2885: exception
2886: when no_data_found then
2887:

Line 2900: x_return_status := FND_API.G_RET_STS_ERROR;

2896: , x_mesg_token_tbl => l_out_mesg_token_tbl
2897: );
2898: l_mesg_token_tbl := l_out_mesg_token_tbl;
2899:
2900: x_return_status := FND_API.G_RET_STS_ERROR;
2901: x_mesg_token_tbl := l_mesg_token_tbl ;
2902: return;
2903:
2904: end;

Line 2921: x_return_status := FND_API.G_RET_STS_SUCCESS;

2917: and lookup_code = p_eam_wo_rec.activity_source
2918: and enabled_flag = 'Y';
2919: end if;
2920:
2921: x_return_status := FND_API.G_RET_STS_SUCCESS;
2922:
2923: exception
2924: when no_data_found then
2925:

Line 2938: x_return_status := FND_API.G_RET_STS_ERROR;

2934: , x_mesg_token_tbl => l_out_mesg_token_tbl
2935: );
2936: l_mesg_token_tbl := l_out_mesg_token_tbl;
2937:
2938: x_return_status := FND_API.G_RET_STS_ERROR;
2939: x_mesg_token_tbl := l_mesg_token_tbl ;
2940: return;
2941:
2942: end;

Line 2988: x_return_status := FND_API.G_RET_STS_SUCCESS;

2984: and trunc(l_date_released_calc)
2985: between period_start_date and schedule_close_date
2986: and period_close_date is NULL;
2987:
2988: x_return_status := FND_API.G_RET_STS_SUCCESS;
2989:
2990: end if;
2991:
2992:

Line 3007: x_return_status := FND_API.G_RET_STS_ERROR;

3003: , x_mesg_token_tbl => l_out_mesg_token_tbl
3004: );
3005: l_mesg_token_tbl := l_out_mesg_token_tbl;
3006:
3007: x_return_status := FND_API.G_RET_STS_ERROR;
3008: x_mesg_token_tbl := l_mesg_token_tbl ;
3009: return;
3010:
3011: end;

Line 3028: x_return_status := FND_API.G_RET_STS_SUCCESS;

3024: from mfg_lookups
3025: where lookup_type = g_obj_source
3026: and lookup_code = p_eam_wo_rec.maintenance_object_source;
3027:
3028: x_return_status := FND_API.G_RET_STS_SUCCESS;
3029:
3030: end if;
3031:
3032: exception

Line 3046: x_return_status := FND_API.G_RET_STS_ERROR;

3042: , x_mesg_token_tbl => l_out_mesg_token_tbl
3043: );
3044: l_mesg_token_tbl := l_out_mesg_token_tbl;
3045:
3046: x_return_status := FND_API.G_RET_STS_ERROR;
3047: x_mesg_token_tbl := l_mesg_token_tbl ;
3048: return;
3049:
3050: end;

Line 3066: x_return_status := FND_API.G_RET_STS_SUCCESS;

3062: into g_dummy
3063: from fnd_user
3064: where user_id = p_eam_wo_rec.user_id;
3065:
3066: x_return_status := FND_API.G_RET_STS_SUCCESS;
3067:
3068: end if;
3069:
3070: exception

Line 3084: x_return_status := FND_API.G_RET_STS_ERROR;

3080: , x_mesg_token_tbl => l_out_mesg_token_tbl
3081: );
3082: l_mesg_token_tbl := l_out_mesg_token_tbl;
3083:
3084: x_return_status := FND_API.G_RET_STS_ERROR;
3085: x_mesg_token_tbl := l_mesg_token_tbl ;
3086: return;
3087:
3088: end;

Line 3104: x_return_status := FND_API.G_RET_STS_SUCCESS;

3100: into g_dummy
3101: from fnd_responsibility
3102: where responsibility_id = p_eam_wo_rec.responsibility_id;
3103:
3104: x_return_status := FND_API.G_RET_STS_SUCCESS;
3105:
3106: end if;
3107:
3108: exception

Line 3122: x_return_status := FND_API.G_RET_STS_ERROR;

3118: , x_mesg_token_tbl => l_out_mesg_token_tbl
3119: );
3120: l_mesg_token_tbl := l_out_mesg_token_tbl;
3121:
3122: x_return_status := FND_API.G_RET_STS_ERROR;
3123: x_mesg_token_tbl := l_mesg_token_tbl ;
3124: return;
3125:
3126: end;

Line 3143: RAISE fnd_api.g_exc_error;

3139: FROM EAM_WO_STATUSES_B
3140: WHERE status_id = p_eam_wo_rec.user_defined_status_id;
3141:
3142: IF l_enabled_flag <> 'Y' THEN
3143: RAISE fnd_api.g_exc_error;
3144: END IF;
3145:
3146: END IF;
3147:

Line 3149: when fnd_api.g_exc_error then

3145:
3146: END IF;
3147:
3148: exception
3149: when fnd_api.g_exc_error then
3150: l_token_tbl(1).token_name := 'USER_DEFINED_STATUS_ID';
3151: l_token_tbl(1).token_value := p_eam_wo_rec.user_defined_status_id;
3152:
3153: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 3162: x_return_status := FND_API.G_RET_STS_ERROR;

3158: , x_mesg_token_tbl => l_out_mesg_token_tbl
3159: );
3160: l_mesg_token_tbl := l_out_mesg_token_tbl;
3161:
3162: x_return_status := FND_API.G_RET_STS_ERROR;
3163: x_mesg_token_tbl := l_mesg_token_tbl ;
3164: return;
3165:
3166: end;

Line 3175: raise fnd_api.g_exc_unexpected_error;

3171:
3172: begin
3173:
3174: if (p_eam_wo_rec.material_issue_by_mo is null) then
3175: raise fnd_api.g_exc_unexpected_error;
3176: else
3177: x_return_status := FND_API.G_RET_STS_SUCCESS;
3178: end if;
3179:

Line 3177: x_return_status := FND_API.G_RET_STS_SUCCESS;

3173:
3174: if (p_eam_wo_rec.material_issue_by_mo is null) then
3175: raise fnd_api.g_exc_unexpected_error;
3176: else
3177: x_return_status := FND_API.G_RET_STS_SUCCESS;
3178: end if;
3179:
3180:
3181:

Line 3201: if x_return_status<> FND_API.G_RET_STS_SUCCESS then

3197: X_Line_Id => -1,
3198: X_Ent_Type=> 6 ,
3199: x_return_status =>x_return_status);
3200:
3201: if x_return_status<> FND_API.G_RET_STS_SUCCESS then
3202: l_mo_err_flag := '2';
3203: raise fnd_api.g_exc_error;
3204: end if;
3205: else

Line 3203: raise fnd_api.g_exc_error;

3199: x_return_status =>x_return_status);
3200:
3201: if x_return_status<> FND_API.G_RET_STS_SUCCESS then
3202: l_mo_err_flag := '2';
3203: raise fnd_api.g_exc_error;
3204: end if;
3205: else
3206: l_mo_err_flag := '1';
3207: raise fnd_api.g_exc_error;

Line 3207: raise fnd_api.g_exc_error;

3203: raise fnd_api.g_exc_error;
3204: end if;
3205: else
3206: l_mo_err_flag := '1';
3207: raise fnd_api.g_exc_error;
3208: end if;
3209: end if;
3210: exception
3211: when fnd_api.g_exc_error then

Line 3211: when fnd_api.g_exc_error then

3207: raise fnd_api.g_exc_error;
3208: end if;
3209: end if;
3210: exception
3211: when fnd_api.g_exc_error then
3212: l_out_mesg_token_tbl := l_mesg_token_tbl;
3213:
3214: If l_mo_err_flag = '1' Then
3215: EAM_ERROR_MESSAGE_PVT.Add_Error_Token

Line 3233: x_return_status := FND_API.G_RET_STS_ERROR;

3229:
3230:
3231: l_mesg_token_tbl := l_out_mesg_token_tbl;
3232:
3233: x_return_status := FND_API.G_RET_STS_ERROR;
3234: x_mesg_token_tbl := l_mesg_token_tbl ;
3235: return;
3236:
3237: when others then

Line 3248: x_return_status := FND_API.G_RET_STS_ERROR;

3244: , x_mesg_token_tbl => l_out_mesg_token_tbl
3245: );
3246: l_mesg_token_tbl := l_out_mesg_token_tbl;
3247:
3248: x_return_status := FND_API.G_RET_STS_ERROR;
3249: x_mesg_token_tbl := l_mesg_token_tbl ;
3250: return;
3251:
3252: end;

Line 3270: x_return_status := FND_API.G_RET_STS_ERROR;

3266: , p_mesg_token_tbl => l_mesg_token_tbl
3267: , x_mesg_token_tbl => l_out_mesg_token_tbl
3268: );
3269: l_mesg_token_tbl := l_out_mesg_token_tbl;
3270: x_return_status := FND_API.G_RET_STS_ERROR;
3271: x_mesg_token_tbl := l_mesg_token_tbl ;
3272: return;
3273: else
3274: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3274: x_return_status := FND_API.G_RET_STS_SUCCESS;

3270: x_return_status := FND_API.G_RET_STS_ERROR;
3271: x_mesg_token_tbl := l_mesg_token_tbl ;
3272: return;
3273: else
3274: x_return_status := FND_API.G_RET_STS_SUCCESS;
3275: end if;
3276:
3277: EXCEPTION
3278: WHEN OTHERS THEN

Line 3293: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

3289: ) ;
3290: l_mesg_token_tbl := l_out_mesg_token_tbl;
3291:
3292: -- Return the status and message table.
3293: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3294: x_mesg_token_tbl := l_mesg_token_tbl ;
3295:
3296: END Check_Attributes;
3297:

Line 3317: x_return_status := FND_API.G_RET_STS_SUCCESS;

3313: l_out_Mesg_Token_Tbl EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type;
3314: l_Token_Tbl EAM_ERROR_MESSAGE_PVT.Token_Tbl_Type;
3315: BEGIN
3316:
3317: x_return_status := FND_API.G_RET_STS_SUCCESS;
3318:
3319: IF p_eam_wo_rec.organization_id IS NULL
3320: THEN
3321: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';

Line 3333: x_return_status := FND_API.G_RET_STS_ERROR;

3329: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3330: );
3331: l_mesg_token_tbl := l_out_mesg_token_tbl;
3332:
3333: x_return_status := FND_API.G_RET_STS_ERROR;
3334:
3335: END IF;
3336:
3337: IF (p_eam_wo_rec.asset_number IS NULL) AND

Line 3353: x_return_status := FND_API.G_RET_STS_ERROR;

3349: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3350: );
3351: l_mesg_token_tbl := l_out_mesg_token_tbl;
3352:
3353: x_return_status := FND_API.G_RET_STS_ERROR;
3354:
3355: END IF;
3356:
3357:

Line 3358: IF p_eam_wo_rec.class_code IS NULL AND p_eam_wo_rec.class_code = FND_API.G_MISS_CHAR

3354:
3355: END IF;
3356:
3357:
3358: IF p_eam_wo_rec.class_code IS NULL AND p_eam_wo_rec.class_code = FND_API.G_MISS_CHAR
3359: THEN
3360: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';
3361: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
3362:

Line 3372: x_return_status := FND_API.G_RET_STS_ERROR;

3368: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3369: );
3370: l_mesg_token_tbl := l_out_mesg_token_tbl;
3371:
3372: x_return_status := FND_API.G_RET_STS_ERROR;
3373:
3374: END IF;
3375:
3376:

Line 3397: x_return_status := FND_API.G_RET_STS_ERROR;

3393: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3394: );
3395: l_mesg_token_tbl := l_out_mesg_token_tbl;
3396:
3397: x_return_status := FND_API.G_RET_STS_ERROR;
3398:
3399: END IF;
3400: END IF;
3401:

Line 3417: x_return_status := FND_API.G_RET_STS_ERROR;

3413: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3414: );
3415: l_mesg_token_tbl := l_out_mesg_token_tbl;
3416:
3417: x_return_status := FND_API.G_RET_STS_ERROR;
3418:
3419: END IF;
3420:
3421: IF p_eam_wo_rec.wip_entity_name IS NULL

Line 3435: x_return_status := FND_API.G_RET_STS_ERROR;

3431: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3432: );
3433: l_mesg_token_tbl := l_out_mesg_token_tbl;
3434:
3435: x_return_status := FND_API.G_RET_STS_ERROR;
3436:
3437: END IF;
3438:
3439: IF p_eam_wo_rec.status_type IS NULL

Line 3453: x_return_status := FND_API.G_RET_STS_ERROR;

3449: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3450: );
3451: l_mesg_token_tbl := l_out_mesg_token_tbl;
3452:
3453: x_return_status := FND_API.G_RET_STS_ERROR;
3454:
3455: END IF;
3456:
3457:

Line 3472: x_return_status := FND_API.G_RET_STS_ERROR;

3468: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3469: );
3470: l_mesg_token_tbl := l_out_mesg_token_tbl;
3471:
3472: x_return_status := FND_API.G_RET_STS_ERROR;
3473:
3474: END IF;
3475:
3476:

Line 3491: x_return_status := FND_API.G_RET_STS_ERROR;

3487: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3488: );
3489: l_mesg_token_tbl := l_out_mesg_token_tbl;
3490:
3491: x_return_status := FND_API.G_RET_STS_ERROR;
3492:
3493: END IF;
3494:
3495: IF p_eam_wo_rec.wip_supply_type IS NULL

Line 3509: x_return_status := FND_API.G_RET_STS_ERROR;

3505: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3506: );
3507: l_mesg_token_tbl := l_out_mesg_token_tbl;
3508:
3509: x_return_status := FND_API.G_RET_STS_ERROR;
3510:
3511: END IF;
3512:
3513: IF p_eam_wo_rec.scheduled_start_date IS NULL

Line 3527: x_return_status := FND_API.G_RET_STS_ERROR;

3523: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3524: );
3525: l_mesg_token_tbl := l_out_mesg_token_tbl;
3526:
3527: x_return_status := FND_API.G_RET_STS_ERROR;
3528:
3529: END IF;
3530:
3531: IF p_eam_wo_rec.scheduled_completion_date IS NULL

Line 3545: x_return_status := FND_API.G_RET_STS_ERROR;

3541: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3542: );
3543: l_mesg_token_tbl := l_out_mesg_token_tbl;
3544:
3545: x_return_status := FND_API.G_RET_STS_ERROR;
3546:
3547: END IF;
3548:
3549: IF p_eam_wo_rec.due_date IS NULL AND p_eam_wo_rec.requested_start_date IS NULL

Line 3563: x_return_status := FND_API.G_RET_STS_ERROR;

3559: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3560: );
3561: l_mesg_token_tbl := l_out_mesg_token_tbl;
3562:
3563: x_return_status := FND_API.G_RET_STS_ERROR;
3564:
3565: END IF;
3566:
3567: IF p_eam_wo_rec.maintenance_object_source IS NULL

Line 3581: x_return_status := FND_API.G_RET_STS_ERROR;

3577: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3578: );
3579: l_mesg_token_tbl := l_out_mesg_token_tbl;
3580:
3581: x_return_status := FND_API.G_RET_STS_ERROR;
3582:
3583: END IF;
3584:
3585:

Line 3601: x_return_status := FND_API.G_RET_STS_ERROR;

3597: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3598: );
3599: l_mesg_token_tbl := l_out_mesg_token_tbl;
3600:
3601: x_return_status := FND_API.G_RET_STS_ERROR;
3602:
3603: END IF;
3604:
3605:

Line 3621: x_return_status := FND_API.G_RET_STS_ERROR;

3617: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3618: );
3619: l_mesg_token_tbl := l_out_mesg_token_tbl;
3620:
3621: x_return_status := FND_API.G_RET_STS_ERROR;
3622:
3623: END IF;
3624:
3625:

Line 3643: x_return_status := FND_API.G_RET_STS_ERROR;

3639: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3640: );
3641: l_mesg_token_tbl := l_out_mesg_token_tbl;
3642:
3643: x_return_status := FND_API.G_RET_STS_ERROR;
3644:
3645: END IF;
3646:
3647: /* Added the validation that rebuild serial number is mandatory in status Released */

Line 3666: x_return_status := FND_API.G_RET_STS_ERROR;

3662: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3663: );
3664: l_mesg_token_tbl := l_out_mesg_token_tbl;
3665:
3666: x_return_status := FND_API.G_RET_STS_ERROR;
3667: END IF;
3668:
3669:
3670: