119: IF p_line_id IS NULL OR
120: p_line_id = FND_API.G_MISS_NUM THEN
121:
122: FND_MESSAGE.SET_NAME('ONT','OE_COGS_LINE_ID_MISSING');
123: OE_MSG_PUB.ADD;
124: RAISE FND_API.G_EXC_ERROR;
125:
126: END IF;
127:
141:
142: WHEN NO_DATA_FOUND THEN
143: FND_MESSAGE.SET_NAME('ONT','OE_COGS_INVALID_LINE_ID');
144: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
145: OE_MSG_PUB.ADD;
146: RAISE FND_API.G_EXC_ERROR;
147:
148: END;
149:
204: FROM OE_ORDER_LINES
205: WHERE LINE_ID = l_line_id;
206:
207: -- Exception Management begin Set message context
208: OE_MSG_PUB.set_msg_context(
209: p_entity_code => 'LINE'
210: ,p_entity_id => l_line_id
211: ,p_header_id => l_header_id
212: ,p_line_id => l_line_id
223: EXCEPTION
224:
225: WHEN NO_DATA_FOUND THEN
226: -- Set message context
227: OE_MSG_PUB.set_msg_context(
228: p_entity_code => 'LINE'
229: ,p_entity_id => l_line_id
230: ,p_line_id => l_line_id
231: );
231: );
232:
233: FND_MESSAGE.SET_NAME('ONT','OE_COGS_INVALID_LINE_ID');
234: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
235: OE_MSG_PUB.ADD;
236: RAISE FND_API.G_EXC_ERROR;
237: END;
238:
239: g_stmt:='15';
248: IF l_ship_from_org_id IS NULL THEN
249:
250: FND_MESSAGE.SET_NAME('ONT','OE_COGS_WAREHOUSE_MISSING');
251: FND_MESSAGE.SET_TOKEN('LINE_ID',l_line_id);
252: OE_MSG_PUB.ADD;
253: RAISE FND_API.G_EXC_ERROR;
254:
255: END IF;
256:
423: oe_debug_pub.add('Error Message : '|| l_errmsg,2);
424: END IF;
425: FND_MESSAGE.SET_NAME('ONT','OE_COGS_ACC_GEN_FAILED');
426: FND_MESSAGE.SET_TOKEN('ERROR_MESSAGE',l_errmsg);
427: OE_MSG_PUB.ADD;
428: RAISE FND_API.G_EXC_ERROR;
429: END IF;
430: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : '|| l_return_status, 1); -- 2352606
431: RETURN l_return_status;
433:
434: WHEN NO_DATA_FOUND THEN
435: FND_MESSAGE.SET_NAME('ONT','OE_COGS_COA_ID_NOT_FOUND');
436: FND_MESSAGE.SET_TOKEN('ORGANIZATION_ID',l_ship_from_org_id);
437: OE_MSG_PUB.ADD;
438:
439: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
440: IF x_msg_count > 0 THEN
441: x_msg_data := OE_MSG_PUB.Get
435: FND_MESSAGE.SET_NAME('ONT','OE_COGS_COA_ID_NOT_FOUND');
436: FND_MESSAGE.SET_TOKEN('ORGANIZATION_ID',l_ship_from_org_id);
437: OE_MSG_PUB.ADD;
438:
439: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
440: IF x_msg_count > 0 THEN
441: x_msg_data := OE_MSG_PUB.Get
442: ( p_encoded => FND_API.G_FALSE
443: , p_msg_index => OE_MSG_PUB.G_LAST
437: OE_MSG_PUB.ADD;
438:
439: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
440: IF x_msg_count > 0 THEN
441: x_msg_data := OE_MSG_PUB.Get
442: ( p_encoded => FND_API.G_FALSE
443: , p_msg_index => OE_MSG_PUB.G_LAST
444: );
445: OE_MSG_PUB.Reset;
439: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
440: IF x_msg_count > 0 THEN
441: x_msg_data := OE_MSG_PUB.Get
442: ( p_encoded => FND_API.G_FALSE
443: , p_msg_index => OE_MSG_PUB.G_LAST
444: );
445: OE_MSG_PUB.Reset;
446: END IF;
447: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : NDF', 1); -- 2352606 end
441: x_msg_data := OE_MSG_PUB.Get
442: ( p_encoded => FND_API.G_FALSE
443: , p_msg_index => OE_MSG_PUB.G_LAST
444: );
445: OE_MSG_PUB.Reset;
446: END IF;
447: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : NDF', 1); -- 2352606 end
448:
449: oe_debug_pub.add(SQLERRM||':'||g_stmt);
449: oe_debug_pub.add(SQLERRM||':'||g_stmt);
450: return FND_API.G_RET_STS_ERROR;
451:
452: WHEN FND_API.G_EXC_ERROR THEN
453: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
454: IF x_msg_count > 0 THEN
455: x_msg_data := OE_MSG_PUB.Get
456: ( p_encoded => FND_API.G_FALSE
457: , p_msg_index => OE_MSG_PUB.G_LAST
451:
452: WHEN FND_API.G_EXC_ERROR THEN
453: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
454: IF x_msg_count > 0 THEN
455: x_msg_data := OE_MSG_PUB.Get
456: ( p_encoded => FND_API.G_FALSE
457: , p_msg_index => OE_MSG_PUB.G_LAST
458: );
459: OE_MSG_PUB.Reset;
453: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
454: IF x_msg_count > 0 THEN
455: x_msg_data := OE_MSG_PUB.Get
456: ( p_encoded => FND_API.G_FALSE
457: , p_msg_index => OE_MSG_PUB.G_LAST
458: );
459: OE_MSG_PUB.Reset;
460: END IF;
461: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : E', 1); -- 2352606 end
455: x_msg_data := OE_MSG_PUB.Get
456: ( p_encoded => FND_API.G_FALSE
457: , p_msg_index => OE_MSG_PUB.G_LAST
458: );
459: OE_MSG_PUB.Reset;
460: END IF;
461: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : E', 1); -- 2352606 end
462:
463: oe_debug_pub.add(SQLERRM||':'||g_stmt);
466: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
467:
468: -- Get message count and data
469:
470: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
471: IF x_msg_count > 0 THEN
472: x_msg_data := OE_MSG_PUB.Get
473: ( p_encoded => FND_API.G_FALSE
474: , p_msg_index => OE_MSG_PUB.G_LAST
468: -- Get message count and data
469:
470: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
471: IF x_msg_count > 0 THEN
472: x_msg_data := OE_MSG_PUB.Get
473: ( p_encoded => FND_API.G_FALSE
474: , p_msg_index => OE_MSG_PUB.G_LAST
475: );
476: OE_MSG_PUB.Reset;
470: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
471: IF x_msg_count > 0 THEN
472: x_msg_data := OE_MSG_PUB.Get
473: ( p_encoded => FND_API.G_FALSE
474: , p_msg_index => OE_MSG_PUB.G_LAST
475: );
476: OE_MSG_PUB.Reset;
477: END IF;
478: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : U', 1); -- 2352606 end
472: x_msg_data := OE_MSG_PUB.Get
473: ( p_encoded => FND_API.G_FALSE
474: , p_msg_index => OE_MSG_PUB.G_LAST
475: );
476: OE_MSG_PUB.Reset;
477: END IF;
478: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : U', 1); -- 2352606 end
479:
480: oe_debug_pub.add(SQLERRM||':'||g_stmt);
481: return FND_API.G_RET_STS_UNEXP_ERROR ;
482:
483: WHEN OTHERS THEN
484:
485: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
486: THEN
487: OE_MSG_PUB.Add_Exc_Msg
488: ( G_PKG_NAME
489: , 'Start_Process'
483: WHEN OTHERS THEN
484:
485: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
486: THEN
487: OE_MSG_PUB.Add_Exc_Msg
488: ( G_PKG_NAME
489: , 'Start_Process'
490: );
491:
492: END IF;
493:
494: -- Get message count and data
495:
496: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
497: IF x_msg_count > 0 THEN
498: x_msg_data := OE_MSG_PUB.Get
499: ( p_encoded => FND_API.G_FALSE
500: , p_msg_index => OE_MSG_PUB.G_LAST
494: -- Get message count and data
495:
496: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
497: IF x_msg_count > 0 THEN
498: x_msg_data := OE_MSG_PUB.Get
499: ( p_encoded => FND_API.G_FALSE
500: , p_msg_index => OE_MSG_PUB.G_LAST
501: );
502: OE_MSG_PUB.Reset;
496: x_msg_count := OE_MSG_PUB.Count_Msg; -- 2352606 start
497: IF x_msg_count > 0 THEN
498: x_msg_data := OE_MSG_PUB.Get
499: ( p_encoded => FND_API.G_FALSE
500: , p_msg_index => OE_MSG_PUB.G_LAST
501: );
502: OE_MSG_PUB.Reset;
503: END IF;
504:
498: x_msg_data := OE_MSG_PUB.Get
499: ( p_encoded => FND_API.G_FALSE
500: , p_msg_index => OE_MSG_PUB.G_LAST
501: );
502: OE_MSG_PUB.Reset;
503: END IF;
504:
505: oe_debug_pub.add('Exiting OE_Flex_Cogs_Pub.Start_process : O', 1); -- 2352606 end
506: oe_debug_pub.add(SQLERRM||':'||g_stmt);