105: IF l_debug_level > 0 THEN
106: oe_debug_pub.add('Entering OE_Flex_Cogs_Pub.Start_process : '|| to_char(p_line_id),1);
107: END IF;
108:
109: IF NOT FND_API.Compatible_API_Call
110: ( l_api_version_number
111: , p_api_version_number
112: , l_api_name
113: , G_PKG_NAME
112: , l_api_name
113: , G_PKG_NAME
114: )
115: THEN
116: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
117: END IF;
118:
119: IF p_line_id IS NULL OR
120: p_line_id = FND_API.G_MISS_NUM THEN
116: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
117: END IF;
118:
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;
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:
128: g_stmt:='5';
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:
150: --14374856 START
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';
240:
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:
257: g_stmt:='20';
398:
399: Exception
400: When Others Then
401: oe_debug_pub.add(SQLERRM||':'||g_stmt);
402: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
403: End;
404:
405: IF INSTR(l_errmsg, CHR(0)) > 0 THEN -- 2352606
406: fnd_message.set_encoded(l_errmsg);
416: oe_debug_pub.add('Concat Descriptions : '|| x_concat_descrs,2);
417: END IF;
418:
419: IF l_result THEN
420: l_return_status := FND_API.G_RET_STS_SUCCESS;
421: ELSE
422: IF l_debug_level > 0 THEN
423: oe_debug_pub.add('Error Message : '|| l_errmsg,2);
424: END IF;
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;
432: EXCEPTION
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;
446: END IF;
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);
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
448:
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
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;
460: END IF;
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);
464: return FND_API.G_RET_STS_ERROR;
465:
466: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
467:
468: -- Get message count and data
462:
463: oe_debug_pub.add(SQLERRM||':'||g_stmt);
464: return FND_API.G_RET_STS_ERROR;
465:
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
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;
477: END IF;
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)
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;
503: END IF;
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);
507: return FND_API.G_RET_STS_UNEXP_ERROR;
508:
509: END Start_Process; /* START_PROCESS */
510:
511: /*===========================================================================+