65:
66: -- Initialize message list.
67:
68: IF FND_API.to_Boolean(p_init_msg_list) THEN
69: FND_MSG_PUB.initialize;
70: END IF;
71:
72: -- Set Savepoint
73:
174: x_return_status := FND_API.G_RET_STS_SUCCESS;
175:
176: -- Get message count and data
177:
178: FND_MSG_PUB.Count_And_Get
179: ( p_count => x_msg_count
180: , p_data => x_msg_data
181: );
182:
188: x_return_status := FND_API.G_RET_STS_ERROR;
189:
190: -- Get message count and data
191:
192: FND_MSG_PUB.Count_And_Get
193: ( p_count => x_msg_count
194: , p_data => x_msg_data
195: );
196:
203: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
204:
205: -- Get message count and data
206:
207: FND_MSG_PUB.Count_And_Get
208: ( p_count => x_msg_count
209: , p_data => x_msg_data
210: );
211:
216: WHEN OTHERS THEN
217:
218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
219:
220: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
221: THEN
222: FND_MSG_PUB.Add_Exc_Msg
223: ( G_PKG_NAME
224: , 'Lock_Work_Order'
218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
219:
220: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
221: THEN
222: FND_MSG_PUB.Add_Exc_Msg
223: ( G_PKG_NAME
224: , 'Lock_Work_Order'
225: );
226: END IF;
226: END IF;
227:
228: -- Get message count and data
229:
230: FND_MSG_PUB.Count_And_Get
231: ( p_count => x_msg_count
232: , p_data => x_msg_data
233: );
234:
293:
294: -- Initialize message list.
295:
296: IF FND_API.to_Boolean(p_init_msg_list) THEN
297: FND_MSG_PUB.initialize;
298: END IF;
299:
300: -- Get Wip_Entities ( parent = Wip_Entities )
301: -- Goofed up !!!!!
362: x_return_status := FND_API.G_RET_STS_SUCCESS;
363:
364: -- Get message count and data
365:
366: FND_MSG_PUB.Count_And_Get
367: ( p_count => x_msg_count
368: , p_data => x_msg_data
369: );
370:
376: x_return_status := FND_API.G_RET_STS_ERROR;
377:
378: -- Get message count and data
379:
380: FND_MSG_PUB.Count_And_Get
381: ( p_count => x_msg_count
382: , p_data => x_msg_data
383: );
384:
387: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
388:
389: -- Get message count and data
390:
391: FND_MSG_PUB.Count_And_Get
392: ( p_count => x_msg_count
393: , p_data => x_msg_data
394: );
395:
396: WHEN OTHERS THEN
397:
398: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
399:
400: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
401: THEN
402: FND_MSG_PUB.Add_Exc_Msg
403: ( G_PKG_NAME
404: , 'Get_Work_Order'
398: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
399:
400: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
401: THEN
402: FND_MSG_PUB.Add_Exc_Msg
403: ( G_PKG_NAME
404: , 'Get_Work_Order'
405: );
406: END IF;
406: END IF;
407:
408: -- Get message count and data
409:
410: FND_MSG_PUB.Count_And_Get
411: ( p_count => x_msg_count
412: , p_data => x_msg_data
413: );
414:
435:
436: -- Initialize message list.
437:
438: IF FND_API.to_Boolean(p_init_msg_list) THEN
439: FND_MSG_PUB.initialize;
440: END IF;
441:
442: l_Wip_Entities_rec := WIP_Wip_Entities_Util.Query_Row
443: ( p_wip_entity_id => p_wip_entity_id
474: x_return_status := FND_API.G_RET_STS_SUCCESS;
475:
476: -- Get message count and data
477:
478: FND_MSG_PUB.Count_And_Get
479: ( p_count => x_msg_count
480: , p_data => x_msg_data
481: );
482:
488: x_return_status := FND_API.G_RET_STS_ERROR;
489:
490: -- Get message count and data
491:
492: FND_MSG_PUB.Count_And_Get
493: ( p_count => x_msg_count
494: , p_data => x_msg_data
495: );
496:
499: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
500:
501: -- Get message count and data
502:
503: FND_MSG_PUB.Count_And_Get
504: ( p_count => x_msg_count
505: , p_data => x_msg_data
506: );
507:
508: WHEN OTHERS THEN
509:
510: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
511:
512: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
513: THEN
514: FND_MSG_PUB.Add_Exc_Msg
515: ( G_PKG_NAME
516: , 'Get_Work_Order'
510: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
511:
512: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
513: THEN
514: FND_MSG_PUB.Add_Exc_Msg
515: ( G_PKG_NAME
516: , 'Get_Work_Order'
517: );
518: END IF;
518: END IF;
519:
520: -- Get message count and data
521:
522: FND_MSG_PUB.Count_And_Get
523: ( p_count => x_msg_count
524: , p_data => x_msg_data
525: );
526:
559:
560: -- Initialize message list.
561:
562: IF FND_API.to_Boolean(p_init_msg_list) THEN
563: FND_MSG_PUB.initialize;
564: END IF;
565:
566: -- Initialize the kanban_card_id only if deriving from wip_entity_id
567:
568: IF Nvl(kanban_card_id,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
569: AND
570: Nvl(p_wip_entity_id,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
571: THEN
572: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
573: THEN
574: FND_MSG_PUB.Add_Exc_Msg
575: ( G_PKG_NAME
576: , 'Get Kanban Details'
570: Nvl(p_wip_entity_id,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM
571: THEN
572: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
573: THEN
574: FND_MSG_PUB.Add_Exc_Msg
575: ( G_PKG_NAME
576: , 'Get Kanban Details'
577: , 'Keys are mutually exclusive: wip_entity_id = '|| p_wip_entity_id || ', kanban_card_id = '|| kanban_card_id
578: );
585: ELSIF Nvl(kanban_card_id,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM THEN
586: l_kanban_rec.kanban_card_id := kanban_card_id;
587:
588: ELSE
589: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
590: THEN
591: FND_MSG_PUB.Add_Exc_Msg
592: ( G_PKG_NAME
593: , 'Get Kanban Details'
587:
588: ELSE
589: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
590: THEN
591: FND_MSG_PUB.Add_Exc_Msg
592: ( G_PKG_NAME
593: , 'Get Kanban Details'
594: , 'Either wip_entity_id or kanban_card_id has to be provided'
595: );
641: l_msg_data,
642: l_locator_control
643: );
644: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
645: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
646: THEN
647: FND_MSG_PUB.Add_Exc_Msg
648: (G_PKG_NAME
649: ,'Get Kanban Details'
643: );
644: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
645: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
646: THEN
647: FND_MSG_PUB.Add_Exc_Msg
648: (G_PKG_NAME
649: ,'Get Kanban Details'
650: ,'Get Locator Control was not successful. ' || l_msg_data
651: );
665: x_return_status := FND_API.G_RET_STS_SUCCESS;
666:
667: -- Get message count and data
668:
669: FND_MSG_PUB.Count_And_Get
670: ( p_count => x_msg_count
671: , p_data => x_msg_data
672: );
673:
677:
678: WHEN FND_API.G_EXC_ERROR THEN
679: x_return_status := FND_API.G_RET_STS_ERROR;
680: -- Get message count and data
681: FND_MSG_PUB.Count_And_Get
682: ( p_count => x_msg_count
683: , p_data => x_msg_data
684: );
685:
685:
686: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
687: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
688: -- Get message count and data
689: FND_MSG_PUB.Count_And_Get
690: ( p_count => x_msg_count
691: , p_data => x_msg_data
692: );
693:
692: );
693:
694: WHEN OTHERS THEN
695: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
696: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
697: THEN
698: FND_MSG_PUB.Add_Exc_Msg
699: ( G_PKG_NAME
700: , 'Get_Kanban_Details'
694: WHEN OTHERS THEN
695: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
696: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
697: THEN
698: FND_MSG_PUB.Add_Exc_Msg
699: ( G_PKG_NAME
700: , 'Get_Kanban_Details'
701: );
702: END IF;
700: , 'Get_Kanban_Details'
701: );
702: END IF;
703: -- Get message count and data
704: FND_MSG_PUB.Count_And_Get
705: ( p_count => x_msg_count
706: , p_data => x_msg_data
707: );
708:
734:
735: -- Initialize message list.
736:
737: IF FND_API.to_Boolean(p_init_msg_list) THEN
738: FND_MSG_PUB.initialize;
739: END IF;
740:
741: IF p_wip_entity_id <> FND_API.G_MISS_NUM
742: AND p_organization_id <> FND_API.G_MISS_NUM
768: ELSIF p_FlowSchedule_rec.wip_entity_id <> FND_API.G_MISS_NUM
769: AND p_DiscreteJob_rec.wip_entity_id <> FND_API.G_MISS_NUM
770: THEN
771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
772: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
773: THEN
774: FND_MSG_PUB.Add_Exc_Msg
775: ( G_PKG_NAME
776: , 'Check Build Sequence'
770: THEN
771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
772: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
773: THEN
774: FND_MSG_PUB.Add_Exc_Msg
775: ( G_PKG_NAME
776: , 'Check Build Sequence'
777: , 'Mutually exclusive parameters: p_FlowSchedule_rec, p_DiscreteJob_rec '
778: );
780: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
781:
782: ELSE
783: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
784: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
785: THEN
786: FND_MSG_PUB.Add_Exc_Msg
787: ( G_PKG_NAME
788: , 'Check Build Sequence'
782: ELSE
783: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
784: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
785: THEN
786: FND_MSG_PUB.Add_Exc_Msg
787: ( G_PKG_NAME
788: , 'Check Build Sequence'
789: , 'Insufficient Arguments. '
790: );
798: OR l_schedule_gp_id = FND_API.G_MISS_NUM
799: OR l_line_id = FND_API.G_MISS_NUM
800: THEN
801: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
802: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
803: THEN
804: FND_MSG_PUB.Add_Exc_Msg
805: ( G_PKG_NAME
806: , 'Check Build Sequence'
800: THEN
801: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
802: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
803: THEN
804: FND_MSG_PUB.Add_Exc_Msg
805: ( G_PKG_NAME
806: , 'Check Build Sequence'
807: , 'Insufficient Arguments in p_FlowSchedule_rec or p_DiscreteJob_rec. '
808: );
821: x_return_status := FND_API.G_RET_STS_SUCCESS;
822:
823: -- Get message count and data
824:
825: FND_MSG_PUB.Count_And_Get
826: ( p_count => x_msg_count
827: , p_data => x_msg_data
828: );
829:
833:
834: WHEN FND_API.G_EXC_ERROR THEN
835: x_return_status := FND_API.G_RET_STS_ERROR;
836: -- Get message count and data
837: FND_MSG_PUB.Count_And_Get
838: ( p_count => x_msg_count
839: , p_data => x_msg_data
840: );
841:
841:
842: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
843: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
844: -- Get message count and data
845: FND_MSG_PUB.Count_And_Get
846: ( p_count => x_msg_count
847: , p_data => x_msg_data
848: );
849:
848: );
849:
850: WHEN OTHERS THEN
851: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
852: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
853: THEN
854: FND_MSG_PUB.Add_Exc_Msg
855: ( G_PKG_NAME
856: , 'Get_Build_Sequence'
850: WHEN OTHERS THEN
851: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
852: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
853: THEN
854: FND_MSG_PUB.Add_Exc_Msg
855: ( G_PKG_NAME
856: , 'Get_Build_Sequence'
857: );
858: END IF;
856: , 'Get_Build_Sequence'
857: );
858: END IF;
859: -- Get message count and data
860: FND_MSG_PUB.Count_And_Get
861: ( p_count => x_msg_count
862: , p_data => x_msg_data
863: );
864: