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 192: raise fnd_api.g_exc_unexpected_error;

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

Line 195: x_return_status := FND_API.G_RET_STS_SUCCESS;

191: if(l_disable_date < sysdate) then
192: raise fnd_api.g_exc_unexpected_error;
193: end if;
194:
195: x_return_status := FND_API.G_RET_STS_SUCCESS;
196:
197: exception
198: when others then
199: l_token_tbl(1).token_name := 'Organization Id';

Line 211: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 233: x_return_status := FND_API.G_RET_STS_SUCCESS;

229: from mtl_parameters mp
230: where mp.eam_enabled_flag = 'Y'
231: and mp.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: l_token_tbl(1).token_name := 'Organization Id';

Line 249: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 264: x_return_status := FND_API.G_RET_STS_SUCCESS;

260: where wep.organization_id = mp.organization_id
261: and mp.eam_enabled_flag = 'Y'
262: and wep.organization_id = p_eam_wo_rec.organization_id;
263:
264: x_return_status := FND_API.G_RET_STS_SUCCESS;
265:
266: exception
267: when no_data_found then
268:

Line 281: x_return_status := FND_API.G_RET_STS_ERROR;

277: , x_mesg_token_tbl => l_out_mesg_token_tbl
278: );
279: l_mesg_token_tbl := l_out_mesg_token_tbl;
280:
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: x_mesg_token_tbl := l_mesg_token_tbl ;
283: return;
284:
285: end;

Line 297: p_eam_wo_rec.maintenance_object_source = fnd_api.g_miss_num

293:
294: begin
295:
296: if p_eam_wo_rec.maintenance_object_source is null or
297: p_eam_wo_rec.maintenance_object_source = fnd_api.g_miss_num
298: then
299: raise fnd_api.g_exc_error;
300: end if;
301:

Line 299: raise fnd_api.g_exc_error;

295:
296: if p_eam_wo_rec.maintenance_object_source is null or
297: p_eam_wo_rec.maintenance_object_source = fnd_api.g_miss_num
298: then
299: raise fnd_api.g_exc_error;
300: end if;
301:
302: select 1 into g_dummy from
303: mfg_lookups where lookup_type = g_obj_source

Line 306: x_return_status := FND_API.G_RET_STS_SUCCESS;

302: select 1 into g_dummy from
303: mfg_lookups where lookup_type = g_obj_source
304: and lookup_code = p_eam_wo_rec.maintenance_object_source;
305:
306: x_return_status := FND_API.G_RET_STS_SUCCESS;
307:
308: exception
309: when fnd_api.g_exc_error then
310:

Line 309: when fnd_api.g_exc_error then

305:
306: x_return_status := FND_API.G_RET_STS_SUCCESS;
307:
308: exception
309: when fnd_api.g_exc_error then
310:
311: l_token_tbl(1).token_name := 'Object Source';
312: l_token_tbl(1).token_value := p_eam_wo_rec.maintenance_object_source;
313:

Line 323: x_return_status := FND_API.G_RET_STS_ERROR;

319: , x_mesg_token_tbl => l_out_mesg_token_tbl
320: );
321: l_mesg_token_tbl := l_out_mesg_token_tbl;
322:
323: x_return_status := FND_API.G_RET_STS_ERROR;
324: x_mesg_token_tbl := l_mesg_token_tbl ;
325: return;
326:
327: when no_data_found then

Line 341: x_return_status := FND_API.G_RET_STS_ERROR;

337: , x_mesg_token_tbl => l_out_mesg_token_tbl
338: );
339: l_mesg_token_tbl := l_out_mesg_token_tbl;
340:
341: x_return_status := FND_API.G_RET_STS_ERROR;
342: x_mesg_token_tbl := l_mesg_token_tbl ;
343: return;
344:
345: end;

Line 354: p_eam_wo_rec.maintenance_object_type = fnd_api.g_miss_num or

350:
351: begin
352:
353: if p_eam_wo_rec.maintenance_object_type is null or
354: p_eam_wo_rec.maintenance_object_type = fnd_api.g_miss_num or
355: p_eam_wo_rec.maintenance_object_type = 1
356: then
357: raise fnd_api.g_exc_error;
358: end if;

Line 357: raise fnd_api.g_exc_error;

353: if p_eam_wo_rec.maintenance_object_type is null or
354: p_eam_wo_rec.maintenance_object_type = fnd_api.g_miss_num or
355: p_eam_wo_rec.maintenance_object_type = 1
356: then
357: raise fnd_api.g_exc_error;
358: end if;
359:
360: select 1 into g_dummy from
361: mfg_lookups where lookup_type = g_obj_type

Line 364: x_return_status := FND_API.G_RET_STS_SUCCESS;

360: select 1 into g_dummy from
361: mfg_lookups where lookup_type = g_obj_type
362: and lookup_code = p_eam_wo_rec.maintenance_object_type;
363:
364: x_return_status := FND_API.G_RET_STS_SUCCESS;
365:
366: exception
367: when fnd_api.g_exc_error then
368:

Line 367: when fnd_api.g_exc_error then

363:
364: x_return_status := FND_API.G_RET_STS_SUCCESS;
365:
366: exception
367: when fnd_api.g_exc_error then
368:
369: l_token_tbl(1).token_name := 'Object Type';
370: l_token_tbl(1).token_value := p_eam_wo_rec.maintenance_object_type;
371:

Line 381: x_return_status := FND_API.G_RET_STS_ERROR;

377: , x_mesg_token_tbl => l_out_mesg_token_tbl
378: );
379: l_mesg_token_tbl := l_out_mesg_token_tbl;
380:
381: x_return_status := FND_API.G_RET_STS_ERROR;
382: x_mesg_token_tbl := l_mesg_token_tbl ;
383: return;
384:
385: when no_data_found then

Line 399: x_return_status := FND_API.G_RET_STS_ERROR;

395: , x_mesg_token_tbl => l_out_mesg_token_tbl
396: );
397: l_mesg_token_tbl := l_out_mesg_token_tbl;
398:
399: x_return_status := FND_API.G_RET_STS_ERROR;
400: x_mesg_token_tbl := l_mesg_token_tbl ;
401: return;
402:
403: end;

Line 412: p_eam_wo_rec.maintenance_object_id = fnd_api.g_miss_num

408:
409: begin
410:
411: if p_eam_wo_rec.maintenance_object_id is null or
412: p_eam_wo_rec.maintenance_object_id = fnd_api.g_miss_num
413: then
414: raise fnd_api.g_exc_error;
415: end if;
416:

Line 414: raise fnd_api.g_exc_error;

410:
411: if p_eam_wo_rec.maintenance_object_id is null or
412: p_eam_wo_rec.maintenance_object_id = fnd_api.g_miss_num
413: then
414: raise fnd_api.g_exc_error;
415: end if;
416:
417: IF p_eam_wo_rec.maintenance_object_type = 3 then
418: --CMRO does not use the EAM family of maintenance orgs concept.

Line 456: x_return_status := FND_API.G_RET_STS_SUCCESS;

452: and inventory_item_id = p_eam_wo_rec.maintenance_object_id;
453: end if;
454: END IF;
455:
456: x_return_status := FND_API.G_RET_STS_SUCCESS;
457:
458: exception
459: when fnd_api.g_exc_error then
460:

Line 459: when fnd_api.g_exc_error then

455:
456: x_return_status := FND_API.G_RET_STS_SUCCESS;
457:
458: exception
459: when fnd_api.g_exc_error then
460:
461: l_token_tbl(1).token_name := 'Object Id';
462: l_token_tbl(1).token_value := p_eam_wo_rec.maintenance_object_id;
463:

Line 473: x_return_status := FND_API.G_RET_STS_ERROR;

469: , x_mesg_token_tbl => l_out_mesg_token_tbl
470: );
471: l_mesg_token_tbl := l_out_mesg_token_tbl;
472:
473: x_return_status := FND_API.G_RET_STS_ERROR;
474: x_mesg_token_tbl := l_mesg_token_tbl ;
475: return;
476:
477: when others then

Line 491: x_return_status := FND_API.G_RET_STS_ERROR;

487: , x_mesg_token_tbl => l_out_mesg_token_tbl
488: );
489: l_mesg_token_tbl := l_out_mesg_token_tbl;
490:
491: x_return_status := FND_API.G_RET_STS_ERROR;
492: x_mesg_token_tbl := l_mesg_token_tbl ;
493: return;
494:
495: end;

Line 507: raise fnd_api.g_exc_error;

503: -- for CMRO work orders, the rebuild_item_id cannot be null.
504: if p_eam_wo_rec.maintenance_object_source = 2 and
505: p_eam_wo_rec.rebuild_item_id is null
506: then
507: raise fnd_api.g_exc_error;
508: end if;
509:
510: x_return_status := FND_API.G_RET_STS_SUCCESS;
511:

Line 510: x_return_status := FND_API.G_RET_STS_SUCCESS;

506: then
507: raise fnd_api.g_exc_error;
508: end if;
509:
510: x_return_status := FND_API.G_RET_STS_SUCCESS;
511:
512: exception
513:
514: when fnd_api.g_exc_error then

Line 514: when fnd_api.g_exc_error then

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

Line 528: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 544: raise fnd_api.g_exc_error;

540: -- rebuild_item_id and asset_group_id cannot both be null.
541: if p_eam_wo_rec.asset_group_id is null and
542: p_eam_wo_rec.rebuild_item_id is null
543: then
544: raise fnd_api.g_exc_error;
545: end if;
546:
547: x_return_status := FND_API.G_RET_STS_SUCCESS;
548:

Line 547: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 550: when fnd_api.g_exc_error then

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

Line 564: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 580: raise fnd_api.g_exc_error;

576:
577: if p_eam_wo_rec.wip_entity_id is not null and
578: p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PUB.G_OPR_CREATE
579: then
580: raise fnd_api.g_exc_error;
581: end if;
582:
583: x_return_status := FND_API.G_RET_STS_SUCCESS;
584:

Line 583: x_return_status := FND_API.G_RET_STS_SUCCESS;

579: then
580: raise fnd_api.g_exc_error;
581: end if;
582:
583: x_return_status := FND_API.G_RET_STS_SUCCESS;
584:
585: exception
586: when fnd_api.g_exc_error then
587:

Line 586: when fnd_api.g_exc_error then

582:
583: x_return_status := FND_API.G_RET_STS_SUCCESS;
584:
585: exception
586: when fnd_api.g_exc_error then
587:
588: l_token_tbl(1).token_name := 'Wip Entity Id';
589: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_id;
590:

Line 600: x_return_status := FND_API.G_RET_STS_ERROR;

596: , x_mesg_token_tbl => l_out_mesg_token_tbl
597: );
598: l_mesg_token_tbl := l_out_mesg_token_tbl;
599:
600: x_return_status := FND_API.G_RET_STS_ERROR;
601: x_mesg_token_tbl := l_mesg_token_tbl ;
602: return;
603:
604: end;

Line 623: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

619: ) ;
620: l_mesg_token_tbl := l_out_mesg_token_tbl;
621:
622: -- Return the status and message table.
623: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
624: x_mesg_token_tbl := l_mesg_token_tbl ;
625:
626: END Check_Attributes_b4_Defaulting;
627:

Line 662: x_return_status := FND_API.G_RET_STS_SUCCESS;

658: l_wo_asset_activity_err EXCEPTION;
659:
660: BEGIN
661: l_mo_err_flag:= '';
662: x_return_status := FND_API.G_RET_STS_SUCCESS;
663:
664: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes . . . '); END IF;
665:
666:

Line 685: raise fnd_api.g_exc_unexpected_error;

681: from hr_organization_units hou
682: where organization_id = p_eam_wo_rec.organization_id;
683:
684: if(l_disable_date < sysdate) then
685: raise fnd_api.g_exc_unexpected_error;
686: end if;
687:
688: x_return_status := FND_API.G_RET_STS_SUCCESS;
689:

Line 688: x_return_status := FND_API.G_RET_STS_SUCCESS;

684: if(l_disable_date < sysdate) then
685: raise fnd_api.g_exc_unexpected_error;
686: end if;
687:
688: x_return_status := FND_API.G_RET_STS_SUCCESS;
689:
690: exception
691:
692: when fnd_api.g_exc_unexpected_error then

Line 692: when fnd_api.g_exc_unexpected_error then

688: x_return_status := FND_API.G_RET_STS_SUCCESS;
689:
690: exception
691:
692: when fnd_api.g_exc_unexpected_error then
693: l_token_tbl(1).token_name := 'Organization Id';
694: l_token_tbl(1).token_value := p_eam_wo_rec.organization_id;
695:
696: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 705: x_return_status := FND_API.G_RET_STS_ERROR;

701: , x_mesg_token_tbl => l_out_mesg_token_tbl
702: );
703: l_mesg_token_tbl := l_out_mesg_token_tbl;
704:
705: x_return_status := FND_API.G_RET_STS_ERROR;
706: x_mesg_token_tbl := l_mesg_token_tbl ;
707: return;
708:
709: when no_data_found then

Line 723: x_return_status := FND_API.G_RET_STS_ERROR;

719: , x_mesg_token_tbl => l_out_mesg_token_tbl
720: );
721: l_mesg_token_tbl := l_out_mesg_token_tbl;
722:
723: x_return_status := FND_API.G_RET_STS_ERROR;
724: x_mesg_token_tbl := l_mesg_token_tbl ;
725: return;
726:
727:

Line 749: x_return_status := FND_API.G_RET_STS_SUCCESS;

745: from mtl_parameters mp
746: where mp.eam_enabled_flag = 'Y'
747: and mp.organization_id = p_eam_wo_rec.organization_id;
748:
749: x_return_status := FND_API.G_RET_STS_SUCCESS;
750:
751: exception
752:
753: when no_data_found then

Line 766: x_return_status := FND_API.G_RET_STS_ERROR;

762: , x_mesg_token_tbl => l_out_mesg_token_tbl
763: );
764: l_mesg_token_tbl := l_out_mesg_token_tbl;
765:
766: x_return_status := FND_API.G_RET_STS_ERROR;
767: x_mesg_token_tbl := l_mesg_token_tbl ;
768: return;
769:
770: end;

Line 781: x_return_status := FND_API.G_RET_STS_SUCCESS;

777: where wep.organization_id = mp.organization_id
778: and mp.eam_enabled_flag = 'Y'
779: and wep.organization_id = p_eam_wo_rec.organization_id;
780:
781: x_return_status := FND_API.G_RET_STS_SUCCESS;
782:
783: exception
784: when no_data_found then
785:

Line 798: x_return_status := FND_API.G_RET_STS_ERROR;

794: , x_mesg_token_tbl => l_out_mesg_token_tbl
795: );
796: l_mesg_token_tbl := l_out_mesg_token_tbl;
797:
798: x_return_status := FND_API.G_RET_STS_ERROR;
799: x_mesg_token_tbl := l_mesg_token_tbl ;
800: return;
801:
802: end;

Line 819: x_return_status := FND_API.G_RET_STS_SUCCESS;

815: from mfg_lookups
816: where lookup_type = g_obj_type
817: and lookup_code = p_eam_wo_rec.maintenance_object_type;
818:
819: x_return_status := FND_API.G_RET_STS_SUCCESS;
820:
821: end if;
822:
823: exception

Line 837: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 865: x_return_status := FND_API.G_RET_STS_SUCCESS;

861: and mp.maint_organization_id = p_eam_wo_rec.organization_id
862: and cii.instance_id = p_eam_wo_rec.maintenance_object_id;
863: END IF;
864:
865: x_return_status := FND_API.G_RET_STS_SUCCESS;
866:
867: elsif (p_eam_wo_rec.maintenance_object_type = 2) then
868: if (p_eam_wo_rec.maintenance_object_source = 1) then
869: select 1

Line 884: x_return_status := FND_API.G_RET_STS_SUCCESS;

880: where organization_id = p_eam_wo_rec.organization_id
881: and inventory_item_id = p_eam_wo_rec.maintenance_object_id;
882: end if;
883:
884: x_return_status := FND_API.G_RET_STS_SUCCESS;
885:
886: end if;
887:
888: end if;

Line 904: x_return_status := FND_API.G_RET_STS_ERROR;

900: , x_mesg_token_tbl => l_out_mesg_token_tbl
901: );
902: l_mesg_token_tbl := l_out_mesg_token_tbl;
903:
904: x_return_status := FND_API.G_RET_STS_ERROR;
905: x_mesg_token_tbl := l_mesg_token_tbl ;
906: return;
907:
908: end;

Line 919: raise fnd_api.g_exc_unexpected_error;

915: begin
916:
917: if (p_eam_wo_rec.asset_group_id is not null) and (p_eam_wo_rec.rebuild_item_id is not null) then
918:
919: raise fnd_api.g_exc_unexpected_error;
920:
921: end if;
922:
923: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 923: x_return_status := FND_API.G_RET_STS_SUCCESS;

919: raise fnd_api.g_exc_unexpected_error;
920:
921: end if;
922:
923: x_return_status := FND_API.G_RET_STS_SUCCESS;
924:
925: exception
926: when fnd_api.g_exc_unexpected_error then
927:

Line 926: when fnd_api.g_exc_unexpected_error then

922:
923: x_return_status := FND_API.G_RET_STS_SUCCESS;
924:
925: exception
926: when fnd_api.g_exc_unexpected_error then
927:
928: l_token_tbl(1).token_name := 'Asset Group';
929: l_token_tbl(1).token_value := p_eam_wo_rec.asset_group_id;
930:

Line 940: x_return_status := FND_API.G_RET_STS_ERROR;

936: , x_mesg_token_tbl => l_out_mesg_token_tbl
937: );
938: l_mesg_token_tbl := l_out_mesg_token_tbl;
939:
940: x_return_status := FND_API.G_RET_STS_ERROR;
941: x_mesg_token_tbl := l_mesg_token_tbl ;
942: return;
943:
944: end;

Line 955: raise fnd_api.g_exc_unexpected_error;

951: 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
952:
953: if(p_eam_wo_rec.asset_number is null)
954: then
955: raise fnd_api.g_exc_unexpected_error;
956: end if;
957:
958: select 1
959: into g_dummy

Line 971: x_return_status := FND_API.G_RET_STS_SUCCESS;

967: and msi.eam_item_type = 1
968: and ROWNUM =1 ;
969: end if;
970:
971: x_return_status := FND_API.G_RET_STS_SUCCESS;
972:
973: exception
974: when others then
975:

Line 988: x_return_status := FND_API.G_RET_STS_ERROR;

984: , x_mesg_token_tbl => l_out_mesg_token_tbl
985: );
986: l_mesg_token_tbl := l_out_mesg_token_tbl;
987:
988: x_return_status := FND_API.G_RET_STS_ERROR;
989: x_mesg_token_tbl := l_mesg_token_tbl ;
990: return;
991:
992: end;

Line 1013: x_return_status := FND_API.G_RET_STS_SUCCESS;

1009: and nvl(cii.active_end_date, sysdate+1) >= sysdate ;
1010:
1011: end if;
1012:
1013: x_return_status := FND_API.G_RET_STS_SUCCESS;
1014:
1015: exception
1016: when no_data_found then
1017:

Line 1030: x_return_status := FND_API.G_RET_STS_ERROR;

1026: , x_mesg_token_tbl => l_out_mesg_token_tbl
1027: );
1028: l_mesg_token_tbl := l_out_mesg_token_tbl;
1029:
1030: x_return_status := FND_API.G_RET_STS_ERROR;
1031: x_mesg_token_tbl := l_mesg_token_tbl ;
1032: return;
1033:
1034: end;

Line 1054: x_return_status := FND_API.G_RET_STS_SUCCESS;

1050: where eam_linear_id = p_eam_wo_rec.eam_linear_location_id;
1051:
1052: end if;
1053:
1054: x_return_status := FND_API.G_RET_STS_SUCCESS;
1055:
1056: exception
1057: when no_data_found then
1058:

Line 1071: x_return_status := FND_API.G_RET_STS_ERROR;

1067: , x_mesg_token_tbl => l_out_mesg_token_tbl
1068: );
1069: l_mesg_token_tbl := l_out_mesg_token_tbl;
1070:
1071: x_return_status := FND_API.G_RET_STS_ERROR;
1072: x_mesg_token_tbl := l_mesg_token_tbl ;
1073: return;
1074:
1075: end;

Line 1108: x_return_status := FND_API.G_RET_STS_SUCCESS;

1104: and rownum = 1;
1105: end if;
1106: end if;
1107:
1108: x_return_status := FND_API.G_RET_STS_SUCCESS;
1109:
1110: exception
1111: when no_data_found then
1112:

Line 1125: x_return_status := FND_API.G_RET_STS_ERROR;

1121: , x_mesg_token_tbl => l_out_mesg_token_tbl
1122: );
1123: l_mesg_token_tbl := l_out_mesg_token_tbl;
1124:
1125: x_return_status := FND_API.G_RET_STS_ERROR;
1126: x_mesg_token_tbl := l_mesg_token_tbl ;
1127: return;
1128:
1129: end;

Line 1139: raise fnd_api.g_exc_unexpected_error;

1135: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
1136:
1137: if(p_eam_wo_rec.rebuild_item_id is null and
1138: p_eam_wo_rec.rebuild_serial_number is not null) then
1139: raise fnd_api.g_exc_unexpected_error;
1140: end if;
1141:
1142: if(p_eam_wo_rec.rebuild_item_id is not null and
1143: p_eam_wo_rec.rebuild_serial_number is not null) then

Line 1187: raise fnd_api.g_exc_unexpected_error;

1183: X_Ent_Type=> 6,
1184: X_Return_Status=>l_trans_exist);
1185:
1186: IF(l_trans_exist='F') THEN
1187: raise fnd_api.g_exc_unexpected_error;
1188: END IF;
1189: END IF;
1190: END IF;
1191:

Line 1194: x_return_status := FND_API.G_RET_STS_SUCCESS;

1190: END IF;
1191:
1192:
1193:
1194: x_return_status := FND_API.G_RET_STS_SUCCESS;
1195:
1196: exception
1197: when others then
1198:

Line 1211: x_return_status := FND_API.G_RET_STS_ERROR;

1207: , x_mesg_token_tbl => l_out_mesg_token_tbl
1208: );
1209: l_mesg_token_tbl := l_out_mesg_token_tbl;
1210:
1211: x_return_status := FND_API.G_RET_STS_ERROR;
1212: x_mesg_token_tbl := l_mesg_token_tbl ;
1213: return;
1214:
1215: end;

Line 1239: raise fnd_api.g_exc_unexpected_error;

1235: and msi.organization_id = mp.organization_id
1236: and mp.maint_organization_id = p_eam_wo_rec.organization_id and rownum = 1;
1237:
1238: if g_dummy <> 1 then
1239: raise fnd_api.g_exc_unexpected_error;
1240: end if ;
1241:
1242: END IF;
1243:

Line 1244: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 1261: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1325: x_return_status := FND_API.G_RET_STS_SUCCESS;

1321: END IF;
1322: END IF;
1323: end if;
1324:
1325: x_return_status := FND_API.G_RET_STS_SUCCESS;
1326:
1327: exception
1328: when others then
1329:

Line 1342: x_return_status := FND_API.G_RET_STS_ERROR;

1338: , x_mesg_token_tbl => l_out_mesg_token_tbl
1339: );
1340: l_mesg_token_tbl := l_out_mesg_token_tbl;
1341:
1342: x_return_status := FND_API.G_RET_STS_ERROR;
1343: x_mesg_token_tbl := l_mesg_token_tbl ;
1344: return;
1345:
1346: end;

Line 1364: raise fnd_api.g_exc_unexpected_error;

1360: X_Ent_Type=> 6,
1361: X_Return_Status=>l_trans_exist);
1362:
1363: IF(l_trans_exist='F') THEN
1364: raise fnd_api.g_exc_unexpected_error;
1365: END IF;
1366: END IF;
1367:
1368: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1368: x_return_status := FND_API.G_RET_STS_SUCCESS;

1364: raise fnd_api.g_exc_unexpected_error;
1365: END IF;
1366: END IF;
1367:
1368: x_return_status := FND_API.G_RET_STS_SUCCESS;
1369:
1370: exception
1371: when others then
1372:

Line 1385: x_return_status := FND_API.G_RET_STS_ERROR;

1381: , x_mesg_token_tbl => l_out_mesg_token_tbl
1382: );
1383: l_mesg_token_tbl := l_out_mesg_token_tbl;
1384:
1385: x_return_status := FND_API.G_RET_STS_ERROR;
1386: x_mesg_token_tbl := l_mesg_token_tbl ;
1387: return;
1388:
1389: end;

Line 1410: raise fnd_api.g_exc_unexpected_error;

1406: where wip_entity_name = p_eam_wo_rec.wip_entity_name
1407: and organization_id = p_eam_wo_rec.organization_id;
1408:
1409: if(l_count > 0) then
1410: raise fnd_api.g_exc_unexpected_error;
1411: end if;
1412:
1413: end if;
1414:

Line 1415: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 1418: when fnd_api.g_exc_unexpected_error then

1414:
1415: x_return_status := FND_API.G_RET_STS_SUCCESS;
1416:
1417: exception
1418: when fnd_api.g_exc_unexpected_error then
1419:
1420: l_token_tbl(1).token_name := 'Wip Entity Name';
1421: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
1422:

Line 1432: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1454: raise fnd_api.g_exc_unexpected_error;

1450: from wip_entities
1451: where wip_entity_id = p_eam_wo_rec.wip_entity_id;
1452:
1453: if(l_count > 0) then
1454: raise fnd_api.g_exc_unexpected_error;
1455: end if;
1456: end if;
1457:
1458: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1458: x_return_status := FND_API.G_RET_STS_SUCCESS;

1454: raise fnd_api.g_exc_unexpected_error;
1455: end if;
1456: end if;
1457:
1458: x_return_status := FND_API.G_RET_STS_SUCCESS;
1459:
1460: exception
1461: when fnd_api.g_exc_unexpected_error then
1462:

Line 1461: when fnd_api.g_exc_unexpected_error then

1457:
1458: x_return_status := FND_API.G_RET_STS_SUCCESS;
1459:
1460: exception
1461: when fnd_api.g_exc_unexpected_error then
1462:
1463: l_token_tbl(1).token_name := 'Wip Entity Id';
1464: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_id;
1465:

Line 1475: x_return_status := FND_API.G_RET_STS_ERROR;

1471: , x_mesg_token_tbl => l_out_mesg_token_tbl
1472: );
1473: l_mesg_token_tbl := l_out_mesg_token_tbl;
1474:
1475: x_return_status := FND_API.G_RET_STS_ERROR;
1476: x_mesg_token_tbl := l_mesg_token_tbl ;
1477: return;
1478:
1479: end;

Line 1489: raise fnd_api.g_exc_unexpected_error;

1485: begin
1486:
1487: if p_eam_wo_rec.firm_planned_flag not in (wip_constants.yes, wip_constants.no) then
1488:
1489: raise fnd_api.g_exc_unexpected_error;
1490:
1491: end if;
1492:
1493: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1493: x_return_status := FND_API.G_RET_STS_SUCCESS;

1489: raise fnd_api.g_exc_unexpected_error;
1490:
1491: end if;
1492:
1493: x_return_status := FND_API.G_RET_STS_SUCCESS;
1494:
1495: exception
1496: when fnd_api.g_exc_unexpected_error then
1497:

Line 1496: when fnd_api.g_exc_unexpected_error then

1492:
1493: x_return_status := FND_API.G_RET_STS_SUCCESS;
1494:
1495: exception
1496: when fnd_api.g_exc_unexpected_error then
1497:
1498: l_token_tbl(1).token_name := 'Firm Planned Flag';
1499: l_token_tbl(1).token_value := p_eam_wo_rec.firm_planned_flag;
1500:

Line 1510: x_return_status := FND_API.G_RET_STS_ERROR;

1506: , x_mesg_token_tbl => l_out_mesg_token_tbl
1507: );
1508: l_mesg_token_tbl := l_out_mesg_token_tbl;
1509:
1510: x_return_status := FND_API.G_RET_STS_ERROR;
1511: x_mesg_token_tbl := l_mesg_token_tbl ;
1512: return;
1513:
1514: end;

Line 1527: raise fnd_api.g_exc_unexpected_error;

1523: begin
1524:
1525: if upper(p_eam_wo_rec.issue_zero_cost_flag) not in ('Y','N') then
1526:
1527: raise fnd_api.g_exc_unexpected_error;
1528:
1529: end if;
1530:
1531: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1531: x_return_status := FND_API.G_RET_STS_SUCCESS;

1527: raise fnd_api.g_exc_unexpected_error;
1528:
1529: end if;
1530:
1531: x_return_status := FND_API.G_RET_STS_SUCCESS;
1532:
1533: exception
1534: when fnd_api.g_exc_unexpected_error then
1535:

Line 1534: when fnd_api.g_exc_unexpected_error then

1530:
1531: x_return_status := FND_API.G_RET_STS_SUCCESS;
1532:
1533: exception
1534: when fnd_api.g_exc_unexpected_error then
1535:
1536: l_token_tbl(1).token_name := 'ISSUE_ZERO_FLAG';
1537: l_token_tbl(1).token_value := p_eam_wo_rec.issue_zero_cost_flag;
1538:

Line 1548: x_return_status := FND_API.G_RET_STS_ERROR;

1544: , x_mesg_token_tbl => l_out_mesg_token_tbl
1545: );
1546: l_mesg_token_tbl := l_out_mesg_token_tbl;
1547:
1548: x_return_status := FND_API.G_RET_STS_ERROR;
1549: x_mesg_token_tbl := l_mesg_token_tbl ;
1550: return;
1551:
1552: end;

Line 1569: x_return_status := FND_API.G_RET_STS_SUCCESS;

1565: where schedule_group_id = p_eam_wo_rec.schedule_group_id
1566: and organization_id = p_eam_wo_rec.organization_id;
1567: end if;
1568:
1569: x_return_status := FND_API.G_RET_STS_SUCCESS;
1570:
1571: exception
1572: when no_data_found then
1573:

Line 1586: x_return_status := FND_API.G_RET_STS_ERROR;

1582: , x_mesg_token_tbl => l_out_mesg_token_tbl
1583: );
1584: l_mesg_token_tbl := l_out_mesg_token_tbl;
1585:
1586: x_return_status := FND_API.G_RET_STS_ERROR;
1587: x_mesg_token_tbl := l_mesg_token_tbl ;
1588: return;
1589:
1590: end;

Line 1677: raise fnd_api.g_exc_unexpected_error;

1673: OR p_eam_wo_rec.attribute15<>p_old_eam_wo_rec.attribute15
1674: OR p_eam_wo_rec.material_issue_by_mo<>p_old_eam_wo_rec.material_issue_by_mo
1675: OR p_eam_wo_rec.issue_zero_cost_flag<>p_old_eam_wo_rec.issue_zero_cost_flag
1676: ) THEN
1677: raise fnd_api.g_exc_unexpected_error;
1678: END IF;
1679: exception
1680: when fnd_api.g_exc_unexpected_error then
1681: l_token_tbl(1).token_name := 'STATUS_TYPE';

Line 1680: when fnd_api.g_exc_unexpected_error then

1676: ) THEN
1677: raise fnd_api.g_exc_unexpected_error;
1678: END IF;
1679: exception
1680: when fnd_api.g_exc_unexpected_error then
1681: l_token_tbl(1).token_name := 'STATUS_TYPE';
1682: l_token_tbl(1).token_value := p_eam_wo_rec.status_type;
1683:
1684: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 1693: x_return_status := FND_API.G_RET_STS_ERROR;

1689: , x_mesg_token_tbl => l_out_mesg_token_tbl
1690: );
1691: l_mesg_token_tbl := l_out_mesg_token_tbl;
1692:
1693: x_return_status := FND_API.G_RET_STS_ERROR;
1694: x_mesg_token_tbl := l_mesg_token_tbl ;
1695: return;
1696: end;
1697:

Line 1718: raise fnd_api.g_exc_unexpected_error;

1714:
1715: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and
1716: p_eam_wo_rec.status_type not in (wip_constants.unreleased, wip_constants.released, wip_constants.hold, wip_constants.draft)) then
1717:
1718: raise fnd_api.g_exc_unexpected_error;
1719:
1720: elsif (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE) then
1721: 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,
1722: wip_constants.hold, wip_constants.cancelled, wip_constants.pend_sched, wip_constants.draft)

Line 1734: raise fnd_api.g_exc_unexpected_error;

1730: OR (p_eam_wo_rec.status_type=wip_constants.comp_nochrg
1731: AND p_old_eam_wo_rec.status_type NOT IN
1732: (wip_constants.comp_chrg, wip_constants.comp_nochrg,wip_constants.closed,wip_constants.fail_close))) then
1733:
1734: raise fnd_api.g_exc_unexpected_error;
1735:
1736: end if;
1737:
1738: end if;

Line 1741: x_return_status := FND_API.G_RET_STS_SUCCESS;

1737:
1738: end if;
1739:
1740:
1741: x_return_status := FND_API.G_RET_STS_SUCCESS;
1742:
1743: exception
1744:
1745: when fnd_api.g_exc_unexpected_error then

Line 1745: when fnd_api.g_exc_unexpected_error then

1741: x_return_status := FND_API.G_RET_STS_SUCCESS;
1742:
1743: exception
1744:
1745: when fnd_api.g_exc_unexpected_error then
1746:
1747: l_token_tbl(1).token_name := 'Status type';
1748: l_token_tbl(1).token_value := p_eam_wo_rec.status_type;
1749:

Line 1759: x_return_status := FND_API.G_RET_STS_ERROR;

1755: , x_mesg_token_tbl => l_out_mesg_token_tbl
1756: );
1757: l_mesg_token_tbl := l_out_mesg_token_tbl;
1758:
1759: x_return_status := FND_API.G_RET_STS_ERROR;
1760: x_mesg_token_tbl := l_mesg_token_tbl ;
1761: return;
1762:
1763: end;

Line 1772: raise fnd_api.g_exc_unexpected_error;

1768:
1769: begin
1770:
1771: if(p_eam_wo_rec.job_quantity <> 1) then
1772: raise fnd_api.g_exc_unexpected_error;
1773: end if;
1774:
1775: x_return_status := FND_API.G_RET_STS_SUCCESS;
1776:

Line 1775: x_return_status := FND_API.G_RET_STS_SUCCESS;

1771: if(p_eam_wo_rec.job_quantity <> 1) then
1772: raise fnd_api.g_exc_unexpected_error;
1773: end if;
1774:
1775: x_return_status := FND_API.G_RET_STS_SUCCESS;
1776:
1777: exception
1778: when fnd_api.g_exc_unexpected_error then
1779:

Line 1778: when fnd_api.g_exc_unexpected_error then

1774:
1775: x_return_status := FND_API.G_RET_STS_SUCCESS;
1776:
1777: exception
1778: when fnd_api.g_exc_unexpected_error then
1779:
1780: l_token_tbl(1).token_name := 'Job Quantity';
1781: l_token_tbl(1).token_value := p_eam_wo_rec.job_quantity;
1782:

Line 1792: x_return_status := FND_API.G_RET_STS_ERROR;

1788: , x_mesg_token_tbl => l_out_mesg_token_tbl
1789: );
1790: l_mesg_token_tbl := l_out_mesg_token_tbl;
1791:
1792: x_return_status := FND_API.G_RET_STS_ERROR;
1793: x_mesg_token_tbl := l_mesg_token_tbl ;
1794: return;
1795:
1796: end;

Line 1811: 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

1807:
1808: ACTIVITY_WO_EXISTS EXCEPTION;
1809: begin
1810: -- # 3436679 code added to prevent the defaulting of the asset activity if user removes it while updating work order
1811: 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
1812:
1813: select 1
1814: into g_dummy
1815: from mtl_system_items

Line 1832: raise fnd_api.g_exc_unexpected_error;

1828: p_eam_op_tbl => l_eam_op_tbl
1829: ,p_wip_entity_id => p_eam_wo_rec.wip_entity_id
1830: ,p_organization_id => p_eam_wo_rec.organization_id) = false
1831: or l_mat_req_exists <> 0) then
1832: raise fnd_api.g_exc_unexpected_error;
1833: end if;
1834:
1835:
1836: end if;

Line 1838: x_return_status := FND_API.G_RET_STS_SUCCESS;

1834:
1835:
1836: end if;
1837:
1838: x_return_status := FND_API.G_RET_STS_SUCCESS;
1839:
1840: exception
1841: when fnd_api.g_exc_unexpected_error then
1842:

Line 1841: when fnd_api.g_exc_unexpected_error then

1837:
1838: x_return_status := FND_API.G_RET_STS_SUCCESS;
1839:
1840: exception
1841: when fnd_api.g_exc_unexpected_error then
1842:
1843: l_out_mesg_token_tbl := l_mesg_token_tbl;
1844: EAM_ERROR_MESSAGE_PVT.Add_Error_Token
1845: ( p_message_name => 'EAM_CANT_UPDATE_ACTIVITY'

Line 1852: x_return_status := FND_API.G_RET_STS_ERROR;

1848: , x_mesg_token_tbl => l_out_mesg_token_tbl
1849: );
1850: l_mesg_token_tbl := l_out_mesg_token_tbl;
1851:
1852: x_return_status := FND_API.G_RET_STS_ERROR;
1853: x_mesg_token_tbl := l_mesg_token_tbl ;
1854: return;
1855:
1856: when ACTIVITY_WO_EXISTS then

Line 1867: x_return_status := FND_API.G_RET_STS_ERROR;

1863: , x_mesg_token_tbl => l_out_mesg_token_tbl
1864: );
1865: l_mesg_token_tbl := l_out_mesg_token_tbl;
1866:
1867: x_return_status := FND_API.G_RET_STS_ERROR;
1868: x_mesg_token_tbl := l_mesg_token_tbl ;
1869: return;
1870:
1871: when others then

Line 1885: x_return_status := FND_API.G_RET_STS_ERROR;

1881: , x_mesg_token_tbl => l_out_mesg_token_tbl
1882: );
1883: l_mesg_token_tbl := l_out_mesg_token_tbl;
1884:
1885: x_return_status := FND_API.G_RET_STS_ERROR;
1886: x_mesg_token_tbl := l_mesg_token_tbl ;
1887: return;
1888:
1889: end;

Line 1903: 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

1899: l_end_date DATE;
1900:
1901: begin
1902: -- # 3436679 code added to prevent the defaulting of the asset activity if user removes it while updating work order
1903: 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
1904:
1905: if (p_eam_wo_rec.maintenance_object_type = 3) then
1906:
1907: select meaa.start_date_active, meaa.end_date_active

Line 1946: x_return_status := FND_API.G_RET_STS_SUCCESS;

1942: end if;
1943:
1944: end if;
1945:
1946: x_return_status := FND_API.G_RET_STS_SUCCESS;
1947:
1948: exception
1949: WHEN l_wo_asset_activity_err THEN
1950:

Line 1960: x_return_status := FND_API.G_RET_STS_ERROR;

1956: , x_mesg_token_tbl => l_out_mesg_token_tbl
1957: );
1958: l_mesg_token_tbl := l_out_mesg_token_tbl;
1959:
1960: x_return_status := FND_API.G_RET_STS_ERROR;
1961: x_mesg_token_tbl := l_mesg_token_tbl ;
1962: return;
1963:
1964: when others then

Line 1978: x_return_status := FND_API.G_RET_STS_ERROR;

1974: , x_mesg_token_tbl => l_out_mesg_token_tbl
1975: );
1976: l_mesg_token_tbl := l_out_mesg_token_tbl;
1977:
1978: x_return_status := FND_API.G_RET_STS_ERROR;
1979: x_mesg_token_tbl := l_mesg_token_tbl ;
1980: return;
1981:
1982: end;

Line 1993: raise fnd_api.g_exc_unexpected_error;

1989:
1990: 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
1991: --not a valid supply type
1992:
1993: raise fnd_api.g_exc_unexpected_error;
1994:
1995: end if;
1996:
1997: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1997: x_return_status := FND_API.G_RET_STS_SUCCESS;

1993: raise fnd_api.g_exc_unexpected_error;
1994:
1995: end if;
1996:
1997: x_return_status := FND_API.G_RET_STS_SUCCESS;
1998:
1999: exception
2000: when fnd_api.g_exc_unexpected_error then
2001:

Line 2000: when fnd_api.g_exc_unexpected_error then

1996:
1997: x_return_status := FND_API.G_RET_STS_SUCCESS;
1998:
1999: exception
2000: when fnd_api.g_exc_unexpected_error then
2001:
2002: l_token_tbl(1).token_name := 'Wip Supply Type';
2003: l_token_tbl(1).token_value := p_eam_wo_rec.wip_supply_type;
2004:

Line 2014: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 2038: x_return_status := FND_API.G_RET_STS_SUCCESS;

2034: and routing_type = 1;
2035:
2036: end if;
2037:
2038: x_return_status := FND_API.G_RET_STS_SUCCESS;
2039:
2040: exception
2041: when no_data_found then
2042:

Line 2055: x_return_status := FND_API.G_RET_STS_ERROR;

2051: , x_mesg_token_tbl => l_out_mesg_token_tbl
2052: );
2053: l_mesg_token_tbl := l_out_mesg_token_tbl;
2054:
2055: x_return_status := FND_API.G_RET_STS_ERROR;
2056: x_mesg_token_tbl := l_mesg_token_tbl ;
2057: return;
2058:
2059: end;

Line 2078: x_return_status := FND_API.G_RET_STS_SUCCESS;

2074: and assembly_type = 1;
2075:
2076: end if;
2077:
2078: x_return_status := FND_API.G_RET_STS_SUCCESS;
2079:
2080: exception
2081: when no_data_found then
2082:

Line 2095: x_return_status := FND_API.G_RET_STS_ERROR;

2091: , x_mesg_token_tbl => l_out_mesg_token_tbl
2092: );
2093: l_mesg_token_tbl := l_out_mesg_token_tbl;
2094:
2095: x_return_status := FND_API.G_RET_STS_ERROR;
2096: x_mesg_token_tbl := l_mesg_token_tbl ;
2097: return;
2098:
2099: end;

Line 2140: x_return_status := FND_API.G_RET_STS_SUCCESS;

2136: AND (ppp.end_date_active IS NULL OR trunc(ppp.end_date_active) >= trunc(l_min_date));
2137: /* Added for bug#5346213 End */
2138:
2139: END IF;
2140: x_return_status := FND_API.G_RET_STS_SUCCESS;
2141:
2142: exception
2143: when no_data_found then
2144:

Line 2157: x_return_status := FND_API.G_RET_STS_ERROR;

2153: , x_mesg_token_tbl => l_out_mesg_token_tbl
2154: );
2155: l_mesg_token_tbl := l_out_mesg_token_tbl;
2156:
2157: x_return_status := FND_API.G_RET_STS_ERROR;
2158: x_mesg_token_tbl := l_mesg_token_tbl ;
2159: return;
2160:
2161: end;

Line 2200: x_return_status := FND_API.G_RET_STS_SUCCESS;

2196:
2197: END IF;
2198:
2199: END IF;
2200: x_return_status := FND_API.G_RET_STS_SUCCESS;
2201:
2202: exception
2203: when no_data_found then
2204:

Line 2217: x_return_status := FND_API.G_RET_STS_ERROR;

2213: , x_mesg_token_tbl => l_out_mesg_token_tbl
2214: );
2215: l_mesg_token_tbl := l_out_mesg_token_tbl;
2216:
2217: x_return_status := FND_API.G_RET_STS_ERROR;
2218: x_mesg_token_tbl := l_mesg_token_tbl ;
2219: return;
2220:
2221: end;

Line 2234: raise fnd_api.g_exc_unexpected_error;

2230:
2231: if p_eam_wo_rec.pm_suggested_start_date is not null and
2232: p_eam_wo_rec.pm_suggested_end_date is not null then
2233:
2234: raise fnd_api.g_exc_unexpected_error;
2235:
2236: end if;
2237:
2238: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2238: x_return_status := FND_API.G_RET_STS_SUCCESS;

2234: raise fnd_api.g_exc_unexpected_error;
2235:
2236: end if;
2237:
2238: x_return_status := FND_API.G_RET_STS_SUCCESS;
2239:
2240: exception
2241: when fnd_api.g_exc_unexpected_error then
2242:

Line 2241: when fnd_api.g_exc_unexpected_error then

2237:
2238: x_return_status := FND_API.G_RET_STS_SUCCESS;
2239:
2240: exception
2241: when fnd_api.g_exc_unexpected_error then
2242:
2243: l_token_tbl(1).token_name := 'Wip Entity Name';
2244: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
2245:

Line 2255: x_return_status := FND_API.G_RET_STS_ERROR;

2251: , x_mesg_token_tbl => l_out_mesg_token_tbl
2252: );
2253: l_mesg_token_tbl := l_out_mesg_token_tbl;
2254:
2255: x_return_status := FND_API.G_RET_STS_ERROR;
2256: x_mesg_token_tbl := l_mesg_token_tbl ;
2257: return;
2258:
2259: end;

Line 2271: raise fnd_api.g_exc_unexpected_error;

2267:
2268: if p_eam_wo_rec.due_date is not null and
2269: p_eam_wo_rec.requested_start_date is not null then
2270:
2271: raise fnd_api.g_exc_unexpected_error;
2272:
2273: end if;
2274:
2275: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2275: x_return_status := FND_API.G_RET_STS_SUCCESS;

2271: raise fnd_api.g_exc_unexpected_error;
2272:
2273: end if;
2274:
2275: x_return_status := FND_API.G_RET_STS_SUCCESS;
2276:
2277: exception
2278: when fnd_api.g_exc_unexpected_error then
2279:

Line 2278: when fnd_api.g_exc_unexpected_error then

2274:
2275: x_return_status := FND_API.G_RET_STS_SUCCESS;
2276:
2277: exception
2278: when fnd_api.g_exc_unexpected_error then
2279:
2280: l_token_tbl(1).token_name := 'Wip Entity Name';
2281: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
2282:

Line 2292: x_return_status := FND_API.G_RET_STS_ERROR;

2288: , x_mesg_token_tbl => l_out_mesg_token_tbl
2289: );
2290: l_mesg_token_tbl := l_out_mesg_token_tbl;
2291:
2292: x_return_status := FND_API.G_RET_STS_ERROR;
2293: x_mesg_token_tbl := l_mesg_token_tbl ;
2294: return;
2295:
2296: end;

Line 2308: raise fnd_api.g_exc_unexpected_error;

2304:
2305: if p_eam_wo_rec.due_date is null and
2306: p_eam_wo_rec.requested_start_date is null then
2307:
2308: raise fnd_api.g_exc_unexpected_error;
2309:
2310: end if;
2311:
2312: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2312: x_return_status := FND_API.G_RET_STS_SUCCESS;

2308: raise fnd_api.g_exc_unexpected_error;
2309:
2310: end if;
2311:
2312: x_return_status := FND_API.G_RET_STS_SUCCESS;
2313:
2314: exception
2315: when fnd_api.g_exc_unexpected_error then
2316:

Line 2315: when fnd_api.g_exc_unexpected_error then

2311:
2312: x_return_status := FND_API.G_RET_STS_SUCCESS;
2313:
2314: exception
2315: when fnd_api.g_exc_unexpected_error then
2316:
2317: l_token_tbl(1).token_name := 'Wip Entity Name';
2318: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
2319:

Line 2329: x_return_status := FND_API.G_RET_STS_ERROR;

2325: , x_mesg_token_tbl => l_out_mesg_token_tbl
2326: );
2327: l_mesg_token_tbl := l_out_mesg_token_tbl;
2328:
2329: x_return_status := FND_API.G_RET_STS_ERROR;
2330: x_mesg_token_tbl := l_mesg_token_tbl ;
2331: return;
2332:
2333: end;

Line 2354: raise fnd_api.g_exc_unexpected_error;

2350: end if;
2351:
2352: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and l_date_count = 0) then
2353: --all job creations must have at least one date
2354: raise fnd_api.g_exc_unexpected_error;
2355: end if;
2356:
2357: if p_eam_wo_rec.requested_start_date is not null then
2358:

Line 2378: x_return_status := FND_API.G_RET_STS_SUCCESS;

2374: and mp.calendar_exception_set_id = bcd.exception_set_id
2375: and bcd.calendar_date = trunc(p_eam_wo_rec.due_date);
2376: end if;
2377:
2378: x_return_status := FND_API.G_RET_STS_SUCCESS;
2379:
2380: exception
2381: when others then
2382:

Line 2395: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 2405: raise fnd_api.g_exc_unexpected_error;

2401: begin
2402: IF(p_eam_wo_rec.scheduled_start_date IS NOT NULL)
2403: AND (p_eam_wo_rec.scheduled_completion_date IS NOT NULL)
2404: AND (p_eam_wo_rec.scheduled_start_date > p_eam_wo_rec.scheduled_completion_date) THEN
2405: raise fnd_api.g_exc_unexpected_error;
2406: END IF;
2407: exception
2408: when fnd_api.g_exc_unexpected_error then
2409: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 2408: when fnd_api.g_exc_unexpected_error then

2404: AND (p_eam_wo_rec.scheduled_start_date > p_eam_wo_rec.scheduled_completion_date) THEN
2405: raise fnd_api.g_exc_unexpected_error;
2406: END IF;
2407: exception
2408: when fnd_api.g_exc_unexpected_error then
2409: l_out_mesg_token_tbl := l_mesg_token_tbl;
2410: EAM_ERROR_MESSAGE_PVT.Add_Error_Token
2411: ( p_message_name => 'EAM_WO_SCHEDULE_DATE_MORE'
2412: , p_token_tbl => l_token_tbl

Line 2418: x_return_status := FND_API.G_RET_STS_ERROR;

2414: , x_mesg_token_tbl => l_out_mesg_token_tbl
2415: );
2416: l_mesg_token_tbl := l_out_mesg_token_tbl;
2417:
2418: x_return_status := FND_API.G_RET_STS_ERROR;
2419: x_mesg_token_tbl := l_mesg_token_tbl ;
2420: return;
2421: end;
2422: --end of fix for 3396136

Line 2456: x_return_status := FND_API.G_RET_STS_SUCCESS;

2452: and mp.organization_id = p_eam_wo_rec.organization_id
2453: and mp.master_organization_id = pun.master_organization_id;
2454: end if;
2455:
2456: x_return_status := FND_API.G_RET_STS_SUCCESS;
2457:
2458: exception
2459: when too_many_rows then
2460: null; -- the query returning multiple rows is ok

Line 2476: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 2491: raise fnd_api.g_exc_unexpected_error;

2487: l_disable_date date;
2488: WO_CANT_CH_WIPACCT exception;
2489: begin
2490: if (p_eam_wo_rec.class_code is null) then
2491: raise fnd_api.g_exc_unexpected_error;
2492: end if;
2493:
2494: if p_eam_wo_rec.class_code is not null then
2495:

Line 2505: raise fnd_api.g_exc_unexpected_error;

2501: and organization_id = p_eam_wo_rec.organization_id;
2502:
2503: if(l_disable_date is not null and
2504: l_disable_date < nvl(p_eam_wo_rec.due_date, p_eam_wo_rec.requested_start_date)) then
2505: raise fnd_api.g_exc_unexpected_error;
2506: end if;
2507:
2508: end if;
2509:

Line 2525: x_return_status := FND_API.G_RET_STS_SUCCESS;

2521: raise WO_CANT_CH_WIPACCT;
2522: END IF;
2523: end if;
2524:
2525: x_return_status := FND_API.G_RET_STS_SUCCESS;
2526:
2527: exception
2528:
2529: when WO_CANT_CH_WIPACCT then

Line 2540: x_return_status := FND_API.G_RET_STS_ERROR;

2536: , x_mesg_token_tbl => l_out_mesg_token_tbl
2537: );
2538: l_mesg_token_tbl := l_out_mesg_token_tbl;
2539:
2540: x_return_status := FND_API.G_RET_STS_ERROR;
2541: x_mesg_token_tbl := l_mesg_token_tbl ;
2542: return;
2543:
2544: when others then

Line 2558: x_return_status := FND_API.G_RET_STS_ERROR;

2554: , x_mesg_token_tbl => l_out_mesg_token_tbl
2555: );
2556: l_mesg_token_tbl := l_out_mesg_token_tbl;
2557:
2558: x_return_status := FND_API.G_RET_STS_ERROR;
2559: x_mesg_token_tbl := l_mesg_token_tbl ;
2560: return;
2561:
2562: end;

Line 2580: x_return_status := FND_API.G_RET_STS_SUCCESS;

2576: p_revision => p_eam_wo_rec.bom_revision,
2577: p_revision_date => p_eam_wo_rec.bom_revision_date,
2578: p_start_date => l_start_date);
2579: */
2580: x_return_status := FND_API.G_RET_STS_SUCCESS;
2581:
2582: exception
2583: when others then
2584:

Line 2597: x_return_status := FND_API.G_RET_STS_ERROR;

2593: , x_mesg_token_tbl => l_out_mesg_token_tbl
2594: );
2595: l_mesg_token_tbl := l_out_mesg_token_tbl;
2596:
2597: x_return_status := FND_API.G_RET_STS_ERROR;
2598:
2599: x_mesg_token_tbl := l_mesg_token_tbl ;
2600: return;
2601:

Line 2632: x_return_status := FND_API.G_RET_STS_SUCCESS;

2628: p_start_date => l_start_date);
2629:
2630: end if;
2631: */
2632: x_return_status := FND_API.G_RET_STS_SUCCESS;
2633:
2634: exception
2635: when others then
2636:

Line 2649: x_return_status := FND_API.G_RET_STS_ERROR;

2645: , x_mesg_token_tbl => l_out_mesg_token_tbl
2646: );
2647: l_mesg_token_tbl := l_out_mesg_token_tbl;
2648:
2649: x_return_status := FND_API.G_RET_STS_ERROR;
2650: x_mesg_token_tbl := l_mesg_token_tbl ;
2651: return;
2652:
2653: end;

Line 2664: raise fnd_api.g_exc_unexpected_error;

2660: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
2661: if(p_eam_wo_rec.manual_rebuild_flag is not null and
2662: (p_eam_wo_rec.rebuild_item_id is null or
2663: p_eam_wo_rec.manual_rebuild_flag not in ('Y', 'N'))) then
2664: raise fnd_api.g_exc_unexpected_error;
2665: end if;
2666:
2667: if(p_eam_wo_rec.manual_rebuild_flag is null and
2668: p_eam_wo_rec.rebuild_item_id is not null) then

Line 2669: raise fnd_api.g_exc_unexpected_error;

2665: end if;
2666:
2667: if(p_eam_wo_rec.manual_rebuild_flag is null and
2668: p_eam_wo_rec.rebuild_item_id is not null) then
2669: raise fnd_api.g_exc_unexpected_error;
2670: end if;
2671: end if;
2672:
2673: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2673: x_return_status := FND_API.G_RET_STS_SUCCESS;

2669: raise fnd_api.g_exc_unexpected_error;
2670: end if;
2671: end if;
2672:
2673: x_return_status := FND_API.G_RET_STS_SUCCESS;
2674:
2675: exception
2676: when fnd_api.g_exc_unexpected_error then
2677:

Line 2676: when fnd_api.g_exc_unexpected_error then

2672:
2673: x_return_status := FND_API.G_RET_STS_SUCCESS;
2674:
2675: exception
2676: when fnd_api.g_exc_unexpected_error then
2677:
2678: l_token_tbl(1).token_name := 'Manual Rebuild Flag';
2679: l_token_tbl(1).token_value := p_eam_wo_rec.manual_rebuild_flag;
2680:

Line 2690: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 2713: raise fnd_api.g_exc_unexpected_error;

2709: and organization_id = p_eam_wo_rec.organization_id;
2710:
2711: if(l_disable_date is not null and
2712: l_disable_date < l_job_date) then
2713: raise fnd_api.g_exc_unexpected_error;
2714: end if;
2715: end if;
2716:
2717: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2717: x_return_status := FND_API.G_RET_STS_SUCCESS;

2713: raise fnd_api.g_exc_unexpected_error;
2714: end if;
2715: end if;
2716:
2717: x_return_status := FND_API.G_RET_STS_SUCCESS;
2718:
2719: exception
2720: when others then
2721:

Line 2740: x_return_status := FND_API.G_RET_STS_ERROR;

2736: , x_mesg_token_tbl => l_out_mesg_token_tbl
2737: );
2738: l_mesg_token_tbl := l_out_mesg_token_tbl;
2739:
2740: x_return_status := FND_API.G_RET_STS_ERROR;
2741: x_mesg_token_tbl := l_mesg_token_tbl ;
2742: return;
2743:
2744: end;

Line 2752: raise fnd_api.g_exc_unexpected_error;

2748:
2749: begin
2750: if (p_eam_wo_rec.notification_required is not null and
2751: p_eam_wo_rec.notification_required not in ('Y', 'N')) then
2752: raise fnd_api.g_exc_unexpected_error;
2753: end if;
2754:
2755: x_return_status := FND_API.G_RET_STS_SUCCESS;
2756:

Line 2755: x_return_status := FND_API.G_RET_STS_SUCCESS;

2751: p_eam_wo_rec.notification_required not in ('Y', 'N')) then
2752: raise fnd_api.g_exc_unexpected_error;
2753: end if;
2754:
2755: x_return_status := FND_API.G_RET_STS_SUCCESS;
2756:
2757: exception
2758: when fnd_api.g_exc_unexpected_error then
2759:

Line 2758: when fnd_api.g_exc_unexpected_error then

2754:
2755: x_return_status := FND_API.G_RET_STS_SUCCESS;
2756:
2757: exception
2758: when fnd_api.g_exc_unexpected_error then
2759:
2760: l_token_tbl(1).token_name := 'Notification Required';
2761: l_token_tbl(1).token_value := p_eam_wo_rec.notification_required;
2762:

Line 2772: x_return_status := FND_API.G_RET_STS_ERROR;

2768: , x_mesg_token_tbl => l_out_mesg_token_tbl
2769: );
2770: l_mesg_token_tbl := l_out_mesg_token_tbl;
2771:
2772: x_return_status := FND_API.G_RET_STS_ERROR;
2773: x_mesg_token_tbl := l_mesg_token_tbl ;
2774: return;
2775:
2776: end;

Line 2791: x_return_status := FND_API.G_RET_STS_SUCCESS;

2787: and lookup_code = p_eam_wo_rec.shutdown_type
2788: and enabled_flag = 'Y';
2789: end if;
2790:
2791: x_return_status := FND_API.G_RET_STS_SUCCESS;
2792:
2793: exception
2794: when no_data_found then
2795:

Line 2808: x_return_status := FND_API.G_RET_STS_ERROR;

2804: , x_mesg_token_tbl => l_out_mesg_token_tbl
2805: );
2806: l_mesg_token_tbl := l_out_mesg_token_tbl;
2807:
2808: x_return_status := FND_API.G_RET_STS_ERROR;
2809: x_mesg_token_tbl := l_mesg_token_tbl ;
2810: return;
2811:
2812: end;

Line 2820: raise fnd_api.g_exc_unexpected_error;

2816:
2817: begin
2818: if (p_eam_wo_rec.tagout_required is not null and
2819: p_eam_wo_rec.tagout_required not in ('Y', 'N')) then
2820: raise fnd_api.g_exc_unexpected_error;
2821: end if;
2822:
2823: x_return_status := FND_API.G_RET_STS_SUCCESS;
2824:

Line 2823: x_return_status := FND_API.G_RET_STS_SUCCESS;

2819: p_eam_wo_rec.tagout_required not in ('Y', 'N')) then
2820: raise fnd_api.g_exc_unexpected_error;
2821: end if;
2822:
2823: x_return_status := FND_API.G_RET_STS_SUCCESS;
2824:
2825: exception
2826: when fnd_api.g_exc_unexpected_error then
2827:

Line 2826: when fnd_api.g_exc_unexpected_error then

2822:
2823: x_return_status := FND_API.G_RET_STS_SUCCESS;
2824:
2825: exception
2826: when fnd_api.g_exc_unexpected_error then
2827:
2828: l_token_tbl(1).token_name := 'Tagout Required';
2829: l_token_tbl(1).token_value := p_eam_wo_rec.tagout_required;
2830:

Line 2840: x_return_status := FND_API.G_RET_STS_ERROR;

2836: , x_mesg_token_tbl => l_out_mesg_token_tbl
2837: );
2838: l_mesg_token_tbl := l_out_mesg_token_tbl;
2839:
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841: x_mesg_token_tbl := l_mesg_token_tbl ;
2842: return;
2843:
2844: end;

Line 2852: raise fnd_api.g_exc_unexpected_error;

2848:
2849: begin
2850: if p_eam_wo_rec.plan_maintenance is not null and
2851: p_eam_wo_rec.plan_maintenance not in ('Y', 'N') then
2852: raise fnd_api.g_exc_unexpected_error;
2853: end if;
2854:
2855: x_return_status := FND_API.G_RET_STS_SUCCESS;
2856:

Line 2855: x_return_status := FND_API.G_RET_STS_SUCCESS;

2851: p_eam_wo_rec.plan_maintenance not in ('Y', 'N') then
2852: raise fnd_api.g_exc_unexpected_error;
2853: end if;
2854:
2855: x_return_status := FND_API.G_RET_STS_SUCCESS;
2856:
2857: exception
2858: when fnd_api.g_exc_unexpected_error then
2859:

Line 2858: when fnd_api.g_exc_unexpected_error then

2854:
2855: x_return_status := FND_API.G_RET_STS_SUCCESS;
2856:
2857: exception
2858: when fnd_api.g_exc_unexpected_error then
2859:
2860: l_token_tbl(1).token_name := 'Plan Maintenance';
2861: l_token_tbl(1).token_value := p_eam_wo_rec.plan_maintenance;
2862:

Line 2872: x_return_status := FND_API.G_RET_STS_ERROR;

2868: , x_mesg_token_tbl => l_out_mesg_token_tbl
2869: );
2870: l_mesg_token_tbl := l_out_mesg_token_tbl;
2871:
2872: x_return_status := FND_API.G_RET_STS_ERROR;
2873: x_mesg_token_tbl := l_mesg_token_tbl ;
2874: return;
2875:
2876: end;

Line 2891: x_return_status := FND_API.G_RET_STS_SUCCESS;

2887: and lookup_code = p_eam_wo_rec.work_order_type
2888: and enabled_flag = 'Y';
2889: end if;
2890:
2891: x_return_status := FND_API.G_RET_STS_SUCCESS;
2892:
2893: exception
2894: when no_data_found then
2895:

Line 2908: x_return_status := FND_API.G_RET_STS_ERROR;

2904: , x_mesg_token_tbl => l_out_mesg_token_tbl
2905: );
2906: l_mesg_token_tbl := l_out_mesg_token_tbl;
2907:
2908: x_return_status := FND_API.G_RET_STS_ERROR;
2909: x_mesg_token_tbl := l_mesg_token_tbl ;
2910: return;
2911:
2912: end;

Line 2927: x_return_status := FND_API.G_RET_STS_SUCCESS;

2923: and lookup_code = p_eam_wo_rec.activity_type
2924: and enabled_flag = 'Y';
2925: end if;
2926:
2927: x_return_status := FND_API.G_RET_STS_SUCCESS;
2928:
2929: exception
2930: when no_data_found then
2931:

Line 2944: x_return_status := FND_API.G_RET_STS_ERROR;

2940: , x_mesg_token_tbl => l_out_mesg_token_tbl
2941: );
2942: l_mesg_token_tbl := l_out_mesg_token_tbl;
2943:
2944: x_return_status := FND_API.G_RET_STS_ERROR;
2945: x_mesg_token_tbl := l_mesg_token_tbl ;
2946: return;
2947:
2948: end;

Line 2963: x_return_status := FND_API.G_RET_STS_SUCCESS;

2959: and lookup_code = p_eam_wo_rec.activity_cause
2960: and enabled_flag = 'Y';
2961: end if;
2962:
2963: x_return_status := FND_API.G_RET_STS_SUCCESS;
2964:
2965: exception
2966: when no_data_found then
2967:

Line 2980: x_return_status := FND_API.G_RET_STS_ERROR;

2976: , x_mesg_token_tbl => l_out_mesg_token_tbl
2977: );
2978: l_mesg_token_tbl := l_out_mesg_token_tbl;
2979:
2980: x_return_status := FND_API.G_RET_STS_ERROR;
2981: x_mesg_token_tbl := l_mesg_token_tbl ;
2982: return;
2983:
2984: end;

Line 3001: x_return_status := FND_API.G_RET_STS_SUCCESS;

2997: and lookup_code = p_eam_wo_rec.activity_source
2998: and enabled_flag = 'Y';
2999: end if;
3000:
3001: x_return_status := FND_API.G_RET_STS_SUCCESS;
3002:
3003: exception
3004: when no_data_found then
3005:

Line 3018: x_return_status := FND_API.G_RET_STS_ERROR;

3014: , x_mesg_token_tbl => l_out_mesg_token_tbl
3015: );
3016: l_mesg_token_tbl := l_out_mesg_token_tbl;
3017:
3018: x_return_status := FND_API.G_RET_STS_ERROR;
3019: x_mesg_token_tbl := l_mesg_token_tbl ;
3020: return;
3021:
3022: end;

Line 3068: x_return_status := FND_API.G_RET_STS_SUCCESS;

3064: and trunc(l_date_released_calc)
3065: between period_start_date and schedule_close_date
3066: and period_close_date is NULL;
3067:
3068: x_return_status := FND_API.G_RET_STS_SUCCESS;
3069:
3070: end if;
3071:
3072:

Line 3087: x_return_status := FND_API.G_RET_STS_ERROR;

3083: , x_mesg_token_tbl => l_out_mesg_token_tbl
3084: );
3085: l_mesg_token_tbl := l_out_mesg_token_tbl;
3086:
3087: x_return_status := FND_API.G_RET_STS_ERROR;
3088: x_mesg_token_tbl := l_mesg_token_tbl ;
3089: return;
3090:
3091: end;

Line 3108: x_return_status := FND_API.G_RET_STS_SUCCESS;

3104: from mfg_lookups
3105: where lookup_type = g_obj_source
3106: and lookup_code = p_eam_wo_rec.maintenance_object_source;
3107:
3108: x_return_status := FND_API.G_RET_STS_SUCCESS;
3109:
3110: end if;
3111:
3112: exception

Line 3126: x_return_status := FND_API.G_RET_STS_ERROR;

3122: , x_mesg_token_tbl => l_out_mesg_token_tbl
3123: );
3124: l_mesg_token_tbl := l_out_mesg_token_tbl;
3125:
3126: x_return_status := FND_API.G_RET_STS_ERROR;
3127: x_mesg_token_tbl := l_mesg_token_tbl ;
3128: return;
3129:
3130: end;

Line 3146: x_return_status := FND_API.G_RET_STS_SUCCESS;

3142: into g_dummy
3143: from fnd_user
3144: where user_id = p_eam_wo_rec.user_id;
3145:
3146: x_return_status := FND_API.G_RET_STS_SUCCESS;
3147:
3148: end if;
3149:
3150: exception

Line 3164: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 3184: x_return_status := FND_API.G_RET_STS_SUCCESS;

3180: into g_dummy
3181: from fnd_responsibility
3182: where responsibility_id = p_eam_wo_rec.responsibility_id;
3183:
3184: x_return_status := FND_API.G_RET_STS_SUCCESS;
3185:
3186: end if;*/
3187:
3188: -- Fix for 10354583 / 9398568

Line 3193: x_return_status := FND_API.G_RET_STS_SUCCESS;

3189:
3190: if (p_eam_wo_rec.responsibility_id is not null) then
3191:
3192: if (p_eam_wo_rec.responsibility_id = -1) then
3193: x_return_status := FND_API.G_RET_STS_SUCCESS;
3194: else
3195: select 1
3196: into g_dummy
3197: from fnd_responsibility

Line 3200: x_return_status := FND_API.G_RET_STS_SUCCESS;

3196: into g_dummy
3197: from fnd_responsibility
3198: where responsibility_id = p_eam_wo_rec.responsibility_id;
3199:
3200: x_return_status := FND_API.G_RET_STS_SUCCESS;
3201: end if;
3202: end if;
3203:
3204: exception

Line 3218: x_return_status := FND_API.G_RET_STS_ERROR;

3214: , x_mesg_token_tbl => l_out_mesg_token_tbl
3215: );
3216: l_mesg_token_tbl := l_out_mesg_token_tbl;
3217:
3218: x_return_status := FND_API.G_RET_STS_ERROR;
3219: x_mesg_token_tbl := l_mesg_token_tbl ;
3220: return;
3221:
3222: end;

Line 3239: RAISE fnd_api.g_exc_error;

3235: FROM EAM_WO_STATUSES_B
3236: WHERE status_id = p_eam_wo_rec.user_defined_status_id;
3237:
3238: IF l_enabled_flag <> 'Y' THEN
3239: RAISE fnd_api.g_exc_error;
3240: END IF;
3241:
3242: END IF;
3243:

Line 3245: when fnd_api.g_exc_error then

3241:
3242: END IF;
3243:
3244: exception
3245: when fnd_api.g_exc_error then
3246: l_token_tbl(1).token_name := 'USER_DEFINED_STATUS_ID';
3247: l_token_tbl(1).token_value := p_eam_wo_rec.user_defined_status_id;
3248:
3249: l_out_mesg_token_tbl := l_mesg_token_tbl;

Line 3258: x_return_status := FND_API.G_RET_STS_ERROR;

3254: , x_mesg_token_tbl => l_out_mesg_token_tbl
3255: );
3256: l_mesg_token_tbl := l_out_mesg_token_tbl;
3257:
3258: x_return_status := FND_API.G_RET_STS_ERROR;
3259: x_mesg_token_tbl := l_mesg_token_tbl ;
3260: return;
3261:
3262: end;

Line 3271: raise fnd_api.g_exc_unexpected_error;

3267:
3268: begin
3269:
3270: if (p_eam_wo_rec.material_issue_by_mo is null) then
3271: raise fnd_api.g_exc_unexpected_error;
3272: else
3273: x_return_status := FND_API.G_RET_STS_SUCCESS;
3274: end if;
3275:

Line 3273: x_return_status := FND_API.G_RET_STS_SUCCESS;

3269:
3270: if (p_eam_wo_rec.material_issue_by_mo is null) then
3271: raise fnd_api.g_exc_unexpected_error;
3272: else
3273: x_return_status := FND_API.G_RET_STS_SUCCESS;
3274: end if;
3275:
3276:
3277:

Line 3297: if x_return_status<> FND_API.G_RET_STS_SUCCESS then

3293: X_Line_Id => -1,
3294: X_Ent_Type=> 6 ,
3295: x_return_status =>x_return_status);
3296:
3297: if x_return_status<> FND_API.G_RET_STS_SUCCESS then
3298: l_mo_err_flag := '2';
3299: raise fnd_api.g_exc_error;
3300: end if;
3301: else

Line 3299: raise fnd_api.g_exc_error;

3295: x_return_status =>x_return_status);
3296:
3297: if x_return_status<> FND_API.G_RET_STS_SUCCESS then
3298: l_mo_err_flag := '2';
3299: raise fnd_api.g_exc_error;
3300: end if;
3301: else
3302: l_mo_err_flag := '1';
3303: raise fnd_api.g_exc_error;

Line 3303: raise fnd_api.g_exc_error;

3299: raise fnd_api.g_exc_error;
3300: end if;
3301: else
3302: l_mo_err_flag := '1';
3303: raise fnd_api.g_exc_error;
3304: end if;
3305: end if;
3306: exception
3307: when fnd_api.g_exc_error then

Line 3307: when fnd_api.g_exc_error then

3303: raise fnd_api.g_exc_error;
3304: end if;
3305: end if;
3306: exception
3307: when fnd_api.g_exc_error then
3308: l_out_mesg_token_tbl := l_mesg_token_tbl;
3309:
3310: If l_mo_err_flag = '1' Then
3311: EAM_ERROR_MESSAGE_PVT.Add_Error_Token

Line 3329: x_return_status := FND_API.G_RET_STS_ERROR;

3325:
3326:
3327: l_mesg_token_tbl := l_out_mesg_token_tbl;
3328:
3329: x_return_status := FND_API.G_RET_STS_ERROR;
3330: x_mesg_token_tbl := l_mesg_token_tbl ;
3331: return;
3332:
3333: when others then

Line 3344: x_return_status := FND_API.G_RET_STS_ERROR;

3340: , x_mesg_token_tbl => l_out_mesg_token_tbl
3341: );
3342: l_mesg_token_tbl := l_out_mesg_token_tbl;
3343:
3344: x_return_status := FND_API.G_RET_STS_ERROR;
3345: x_mesg_token_tbl := l_mesg_token_tbl ;
3346: return;
3347:
3348: end;

Line 3366: x_return_status := FND_API.G_RET_STS_ERROR;

3362: , p_mesg_token_tbl => l_mesg_token_tbl
3363: , x_mesg_token_tbl => l_out_mesg_token_tbl
3364: );
3365: l_mesg_token_tbl := l_out_mesg_token_tbl;
3366: x_return_status := FND_API.G_RET_STS_ERROR;
3367: x_mesg_token_tbl := l_mesg_token_tbl ;
3368: return;
3369: else
3370: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3370: x_return_status := FND_API.G_RET_STS_SUCCESS;

3366: x_return_status := FND_API.G_RET_STS_ERROR;
3367: x_mesg_token_tbl := l_mesg_token_tbl ;
3368: return;
3369: else
3370: x_return_status := FND_API.G_RET_STS_SUCCESS;
3371: end if;
3372:
3373: EXCEPTION
3374: WHEN OTHERS THEN

Line 3389: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

3385: ) ;
3386: l_mesg_token_tbl := l_out_mesg_token_tbl;
3387:
3388: -- Return the status and message table.
3389: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3390: x_mesg_token_tbl := l_mesg_token_tbl ;
3391:
3392: END Check_Attributes;
3393:

Line 3413: x_return_status := FND_API.G_RET_STS_SUCCESS;

3409: l_out_Mesg_Token_Tbl EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type;
3410: l_Token_Tbl EAM_ERROR_MESSAGE_PVT.Token_Tbl_Type;
3411: BEGIN
3412:
3413: x_return_status := FND_API.G_RET_STS_SUCCESS;
3414:
3415: IF p_eam_wo_rec.organization_id IS NULL
3416: THEN
3417: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';

Line 3429: x_return_status := FND_API.G_RET_STS_ERROR;

3425: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3426: );
3427: l_mesg_token_tbl := l_out_mesg_token_tbl;
3428:
3429: x_return_status := FND_API.G_RET_STS_ERROR;
3430:
3431: END IF;
3432:
3433: IF (p_eam_wo_rec.asset_number IS NULL) AND

Line 3449: x_return_status := FND_API.G_RET_STS_ERROR;

3445: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3446: );
3447: l_mesg_token_tbl := l_out_mesg_token_tbl;
3448:
3449: x_return_status := FND_API.G_RET_STS_ERROR;
3450:
3451: END IF;
3452:
3453:

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

3450:
3451: END IF;
3452:
3453:
3454: IF p_eam_wo_rec.class_code IS NULL AND p_eam_wo_rec.class_code = FND_API.G_MISS_CHAR
3455: THEN
3456: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';
3457: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
3458:

Line 3468: x_return_status := FND_API.G_RET_STS_ERROR;

3464: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3465: );
3466: l_mesg_token_tbl := l_out_mesg_token_tbl;
3467:
3468: x_return_status := FND_API.G_RET_STS_ERROR;
3469:
3470: END IF;
3471:
3472:

Line 3493: x_return_status := FND_API.G_RET_STS_ERROR;

3489: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3490: );
3491: l_mesg_token_tbl := l_out_mesg_token_tbl;
3492:
3493: x_return_status := FND_API.G_RET_STS_ERROR;
3494:
3495: END IF;
3496: END IF;
3497:

Line 3513: x_return_status := FND_API.G_RET_STS_ERROR;

3509: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3510: );
3511: l_mesg_token_tbl := l_out_mesg_token_tbl;
3512:
3513: x_return_status := FND_API.G_RET_STS_ERROR;
3514:
3515: END IF;
3516:
3517: IF p_eam_wo_rec.wip_entity_name IS NULL

Line 3531: x_return_status := FND_API.G_RET_STS_ERROR;

3527: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3528: );
3529: l_mesg_token_tbl := l_out_mesg_token_tbl;
3530:
3531: x_return_status := FND_API.G_RET_STS_ERROR;
3532:
3533: END IF;
3534:
3535: IF p_eam_wo_rec.status_type IS NULL

Line 3549: x_return_status := FND_API.G_RET_STS_ERROR;

3545: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3546: );
3547: l_mesg_token_tbl := l_out_mesg_token_tbl;
3548:
3549: x_return_status := FND_API.G_RET_STS_ERROR;
3550:
3551: END IF;
3552:
3553:

Line 3568: x_return_status := FND_API.G_RET_STS_ERROR;

3564: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3565: );
3566: l_mesg_token_tbl := l_out_mesg_token_tbl;
3567:
3568: x_return_status := FND_API.G_RET_STS_ERROR;
3569:
3570: END IF;
3571:
3572:

Line 3587: x_return_status := FND_API.G_RET_STS_ERROR;

3583: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3584: );
3585: l_mesg_token_tbl := l_out_mesg_token_tbl;
3586:
3587: x_return_status := FND_API.G_RET_STS_ERROR;
3588:
3589: END IF;
3590:
3591: IF p_eam_wo_rec.wip_supply_type IS NULL

Line 3605: x_return_status := FND_API.G_RET_STS_ERROR;

3601: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3602: );
3603: l_mesg_token_tbl := l_out_mesg_token_tbl;
3604:
3605: x_return_status := FND_API.G_RET_STS_ERROR;
3606:
3607: END IF;
3608:
3609: IF p_eam_wo_rec.scheduled_start_date IS NULL

Line 3623: x_return_status := FND_API.G_RET_STS_ERROR;

3619: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3620: );
3621: l_mesg_token_tbl := l_out_mesg_token_tbl;
3622:
3623: x_return_status := FND_API.G_RET_STS_ERROR;
3624:
3625: END IF;
3626:
3627: IF p_eam_wo_rec.scheduled_completion_date IS NULL

Line 3641: x_return_status := FND_API.G_RET_STS_ERROR;

3637: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3638: );
3639: l_mesg_token_tbl := l_out_mesg_token_tbl;
3640:
3641: x_return_status := FND_API.G_RET_STS_ERROR;
3642:
3643: END IF;
3644:
3645: IF p_eam_wo_rec.due_date IS NULL AND p_eam_wo_rec.requested_start_date IS NULL

Line 3659: x_return_status := FND_API.G_RET_STS_ERROR;

3655: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3656: );
3657: l_mesg_token_tbl := l_out_mesg_token_tbl;
3658:
3659: x_return_status := FND_API.G_RET_STS_ERROR;
3660:
3661: END IF;
3662:
3663: IF p_eam_wo_rec.maintenance_object_source IS NULL

Line 3677: x_return_status := FND_API.G_RET_STS_ERROR;

3673: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3674: );
3675: l_mesg_token_tbl := l_out_mesg_token_tbl;
3676:
3677: x_return_status := FND_API.G_RET_STS_ERROR;
3678:
3679: END IF;
3680:
3681:

Line 3697: x_return_status := FND_API.G_RET_STS_ERROR;

3693: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3694: );
3695: l_mesg_token_tbl := l_out_mesg_token_tbl;
3696:
3697: x_return_status := FND_API.G_RET_STS_ERROR;
3698:
3699: END IF;
3700:
3701:

Line 3717: x_return_status := FND_API.G_RET_STS_ERROR;

3713: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3714: );
3715: l_mesg_token_tbl := l_out_mesg_token_tbl;
3716:
3717: x_return_status := FND_API.G_RET_STS_ERROR;
3718:
3719: END IF;
3720:
3721:

Line 3739: x_return_status := FND_API.G_RET_STS_ERROR;

3735: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3736: );
3737: l_mesg_token_tbl := l_out_mesg_token_tbl;
3738:
3739: x_return_status := FND_API.G_RET_STS_ERROR;
3740:
3741: END IF;
3742:
3743: /* Added the validation that rebuild serial number is mandatory in status Released */

Line 3762: x_return_status := FND_API.G_RET_STS_ERROR;

3758: , x_Mesg_Token_Tbl => l_out_Mesg_Token_Tbl
3759: );
3760: l_mesg_token_tbl := l_out_mesg_token_tbl;
3761:
3762: x_return_status := FND_API.G_RET_STS_ERROR;
3763: END IF;
3764:
3765:
3766: