6:
7:
8: -- Global variable for storing the debug level
9:
10: G_debug_level number := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
11: /*----------------------------------------------------------------*/
12:
13: /* procedure name: Get_TotalEstCosts */
14:
92: l_api_version CONSTANT NUMBER := 1.0;
93: l_nullCostRows NUMBER;
94: l_count NUMBER;
95:
96: -- Variable used in FND log
97:
98: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
94: l_count NUMBER;
95:
96: -- Variable used in FND log
97:
98: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
101: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
102: l_error_level number := FND_LOG.LEVEL_ERROR;
95:
96: -- Variable used in FND log
97:
98: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
101: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
102: l_error_level number := FND_LOG.LEVEL_ERROR;
103: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
96: -- Variable used in FND log
97:
98: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
101: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
102: l_error_level number := FND_LOG.LEVEL_ERROR;
103: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
104: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts';
97:
98: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
101: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
102: l_error_level number := FND_LOG.LEVEL_ERROR;
103: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
104: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts';
105:
98: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
101: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
102: l_error_level number := FND_LOG.LEVEL_ERROR;
103: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
104: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts';
105:
106: BEGIN
99: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
100: l_event_level number := FND_LOG.LEVEL_EVENT;
101: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
102: l_error_level number := FND_LOG.LEVEL_ERROR;
103: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
104: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts';
105:
106: BEGIN
107:
134: -- Begin API Body
135: --
136: -- Debug messages
137:
138: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
139: THEN
140: FND_LOG.STRING(Fnd_Log.Level_Procedure,
141: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts.BEGIN',
142: 'Entered Get_TotalEstCosts');
136: -- Debug messages
137:
138: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
139: THEN
140: FND_LOG.STRING(Fnd_Log.Level_Procedure,
141: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts.BEGIN',
142: 'Entered Get_TotalEstCosts');
143: END IF;
144:
149:
150: -- Throw error
151:
152: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_COSTING_NOT_ENABLED');
153: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
154: THEN
155: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
156: END IF;
157: -- ELSE
151:
152: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_COSTING_NOT_ENABLED');
153: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
154: THEN
155: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
156: END IF;
157: -- ELSE
158: FND_MSG_PUB.ADD;
159: --END IF;
170:
171: -- Throw error
172:
173: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_CHG_ROWS_SELECTED');
174: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
175: THEN
176: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
177: END IF;
178: -- ELSE
172:
173: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_CHG_ROWS_SELECTED');
174: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
175: THEN
176: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
177: END IF;
178: -- ELSE
179: FND_MSG_PUB.ADD;
180: --END IF;
189: IF l_nullCostRows > 0
190: THEN
191: CLOSE cur_getNullCostRows;
192: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NULL_ITEM_COST');
193: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
194: THEN
195: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
196: END IF;
197: -- ELSE
191: CLOSE cur_getNullCostRows;
192: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NULL_ITEM_COST');
193: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
194: THEN
195: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
196: END IF;
197: -- ELSE
198: FND_MSG_PUB.ADD;
199: --END IF;
231: 0);
232:
233: -- Debug messages
234:
235: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
236: THEN
237: FND_LOG.STRING(Fnd_Log.Level_Procedure,
238: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts.END',
239: 'Leaving Get_TotalEstCosts');
233: -- Debug messages
234:
235: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
236: THEN
237: FND_LOG.STRING(Fnd_Log.Level_Procedure,
238: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts.END',
239: 'Leaving Get_TotalEstCosts');
240: END IF;
241:
261: x_return_status := FND_API.G_RET_STS_ERROR;
262: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
263: p_data => x_msg_data,
264: p_encoded => 'F');
265: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
266: THEN
267: FND_LOG.STRING(Fnd_Log.Level_Exception,
268: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCosts',
269: 'EXC_ERROR['
263: p_data => x_msg_data,
264: p_encoded => 'F');
265: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
266: THEN
267: FND_LOG.STRING(Fnd_Log.Level_Exception,
268: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCosts',
269: 'EXC_ERROR['
270: || x_msg_data
271: || ']');
277: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
278: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
279: p_data => x_msg_data,
280: p_encoded => 'F');
281: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
282: THEN
283: FND_LOG.STRING(Fnd_Log.Level_Exception,
284: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCosts',
285: 'EXC_ERROR['
279: p_data => x_msg_data,
280: p_encoded => 'F');
281: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
282: THEN
283: FND_LOG.STRING(Fnd_Log.Level_Exception,
284: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCosts',
285: 'EXC_ERROR['
286: || x_msg_data
287: || ']');
297: END IF;
298: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
299: p_data => x_msg_data,
300: p_encoded => 'F');
301: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
302: THEN
303: FND_LOG.STRING(Fnd_Log.Level_Exception,
304: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCosts',
305: 'SQL Message['
299: p_data => x_msg_data,
300: p_encoded => 'F');
301: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
302: THEN
303: FND_LOG.STRING(Fnd_Log.Level_Exception,
304: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCosts',
305: 'SQL Message['
306: || sqlerrm
307: || ']');
374: l_api_version CONSTANT NUMBER := 1.0;
375: l_nullCostRows NUMBER;
376: l_count NUMBER;
377:
378: -- Variable used in FND log
379:
380: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
376: l_count NUMBER;
377:
378: -- Variable used in FND log
379:
380: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
383: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
384: l_error_level number := FND_LOG.LEVEL_ERROR;
377:
378: -- Variable used in FND log
379:
380: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
383: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
384: l_error_level number := FND_LOG.LEVEL_ERROR;
385: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
378: -- Variable used in FND log
379:
380: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
383: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
384: l_error_level number := FND_LOG.LEVEL_ERROR;
385: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
386: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcharges';
379:
380: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
383: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
384: l_error_level number := FND_LOG.LEVEL_ERROR;
385: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
386: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcharges';
387:
380: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
383: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
384: l_error_level number := FND_LOG.LEVEL_ERROR;
385: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
386: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcharges';
387:
388: BEGIN
381: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
382: l_event_level number := FND_LOG.LEVEL_EVENT;
383: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
384: l_error_level number := FND_LOG.LEVEL_ERROR;
385: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
386: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.get_totalestcharges';
387:
388: BEGIN
389:
415: -- Begin API Body
416: --
417: -- Debug messages
418:
419: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
420: THEN
421: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
422: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts.BEGIN',
423: 'Entered Get_TotalEstCharges');
417: -- Debug messages
418:
419: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
420: THEN
421: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
422: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcosts.BEGIN',
423: 'Entered Get_TotalEstCharges');
424: END IF;
425:
433:
434: -- Throw error
435:
436: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_CHG_ROWS_SELECTED');
437: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
438: THEN
439: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
440: END IF;
441: --ELSE
435:
436: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_CHG_ROWS_SELECTED');
437: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
438: THEN
439: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
440: END IF;
441: --ELSE
442: FND_MSG_PUB.ADD;
443: -- END IF;
472: 0);
473:
474: -- Debug messages
475:
476: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
477: THEN
478: FND_LOG.STRING(Fnd_Log.Level_Procedure,
479: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcharges.END',
480: ' Exiting Get_TotalEstCharges');
474: -- Debug messages
475:
476: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
477: THEN
478: FND_LOG.STRING(Fnd_Log.Level_Procedure,
479: 'csd.plsql.csd_cost_analysis_pvt.get_totalestcharges.END',
480: ' Exiting Get_TotalEstCharges');
481: END IF;
482:
502: x_return_status := FND_API.G_RET_STS_ERROR;
503: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
504: p_data => x_msg_data,
505: p_encoded => 'F');
506: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
507: THEN
508: FND_LOG.STRING(Fnd_Log.Level_Exception,
509: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCharges',
510: 'EXC_ERROR['
504: p_data => x_msg_data,
505: p_encoded => 'F');
506: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
507: THEN
508: FND_LOG.STRING(Fnd_Log.Level_Exception,
509: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCharges',
510: 'EXC_ERROR['
511: || x_msg_data
512: || ']');
518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
519: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
520: p_data => x_msg_data,
521: p_encoded => 'F');
522: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
523: THEN
524: FND_LOG.STRING(Fnd_Log.Level_Exception,
525: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCharges',
526: 'EXC_ERROR['
520: p_data => x_msg_data,
521: p_encoded => 'F');
522: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
523: THEN
524: FND_LOG.STRING(Fnd_Log.Level_Exception,
525: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCharges',
526: 'EXC_ERROR['
527: || x_msg_data
528: || ']');
538: END IF;
539: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
540: p_data => x_msg_data,
541: p_encoded => 'F');
542: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
543: THEN
544: FND_LOG.STRING(Fnd_Log.Level_Exception,
545: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCharges',
546: 'SQL Message['
540: p_data => x_msg_data,
541: p_encoded => 'F');
542: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
543: THEN
544: FND_LOG.STRING(Fnd_Log.Level_Exception,
545: 'csd.plsql.csd_cost_analysis_pvt.Get_TotalEstCharges',
546: 'SQL Message['
547: || sqlerrm
548: || ']');
607: IS
608: l_api_name CONSTANT VARCHAR2(30) := 'Compare_EstChargesAndCosts';
609: l_api_version CONSTANT NUMBER := 1.0;
610:
611: -- Variable used in FND log
612:
613: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
609: l_api_version CONSTANT NUMBER := 1.0;
610:
611: -- Variable used in FND log
612:
613: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
616: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
617: l_error_level number := FND_LOG.LEVEL_ERROR;
610:
611: -- Variable used in FND log
612:
613: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
616: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
617: l_error_level number := FND_LOG.LEVEL_ERROR;
618: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
611: -- Variable used in FND log
612:
613: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
616: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
617: l_error_level number := FND_LOG.LEVEL_ERROR;
618: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
619: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts';
612:
613: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
616: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
617: l_error_level number := FND_LOG.LEVEL_ERROR;
618: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
619: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts';
620:
613: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
616: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
617: l_error_level number := FND_LOG.LEVEL_ERROR;
618: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
619: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts';
620:
621: BEGIN
614: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
615: l_event_level number := FND_LOG.LEVEL_EVENT;
616: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
617: l_error_level number := FND_LOG.LEVEL_ERROR;
618: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
619: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts';
620:
621: BEGIN
622:
651: --
652:
653: -- Debug messages
654:
655: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
656: THEN
657: FND_LOG.STRING(Fnd_Log.Level_Procedure,
658: l_mod_name
659: || 'BEGIN',
653: -- Debug messages
654:
655: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
656: THEN
657: FND_LOG.STRING(Fnd_Log.Level_Procedure,
658: l_mod_name
659: || 'BEGIN',
660: 'Entered Compare_EstChargesAndCosts');
661: END IF;
705:
706: IF x_charges.currency_code <> x_costs.currency_code
707: THEN
708: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_CURR_CODE_DIFF');
709: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
710: THEN
711: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
712: END IF;
713: --ELSE
707: THEN
708: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_CURR_CODE_DIFF');
709: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
710: THEN
711: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
712: END IF;
713: --ELSE
714: FND_MSG_PUB.ADD;
715: -- END IF;
735: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
736: THEN
737: RAISE FND_API.G_EXC_ERROR;
738: END IF;
739: IF (FND_LOG.LEVEL_PROCEDURE >= Fnd_Log.G_Current_Runtime_Level)
740: THEN
741: FND_LOG.STRING(Fnd_Log.Level_Procedure,
742: 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts.END',
743: 'Exiting Compare_EstChargesAndCosts');
737: RAISE FND_API.G_EXC_ERROR;
738: END IF;
739: IF (FND_LOG.LEVEL_PROCEDURE >= Fnd_Log.G_Current_Runtime_Level)
740: THEN
741: FND_LOG.STRING(Fnd_Log.Level_Procedure,
742: 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts.END',
743: 'Exiting Compare_EstChargesAndCosts');
744: END IF;
745:
765: x_return_status := FND_API.G_RET_STS_ERROR;
766: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
767: p_data => x_msg_data,
768: p_encoded => 'F');
769: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
770: THEN
771: FND_LOG.STRING(Fnd_Log.Level_Exception,
772: 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts',
773: 'EXC_ERROR['
767: p_data => x_msg_data,
768: p_encoded => 'F');
769: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
770: THEN
771: FND_LOG.STRING(Fnd_Log.Level_Exception,
772: 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts',
773: 'EXC_ERROR['
774: || x_msg_data
775: || ']');
781: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
782: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
783: p_data => x_msg_data,
784: p_encoded => 'F');
785: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
786: THEN
787: FND_LOG.STRING(Fnd_Log.Level_Exception,
788: 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts',
789: 'EXC_ERROR['
783: p_data => x_msg_data,
784: p_encoded => 'F');
785: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
786: THEN
787: FND_LOG.STRING(Fnd_Log.Level_Exception,
788: 'csd.plsql.csd_cost_analysis_pvt.Compare_EstChargesAndCosts',
789: 'EXC_ERROR['
790: || x_msg_data
791: || ']');
801: END IF;
802: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
803: p_data => x_msg_data,
804: p_encoded => 'F');
805: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
806: THEN
807: FND_LOG.STRING(Fnd_Log.Level_Exception,
808: 'csd.plsql.csd_cost_analysis_pvt. Compare_EstChargesAndCosts',
809: 'SQL Message['
803: p_data => x_msg_data,
804: p_encoded => 'F');
805: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
806: THEN
807: FND_LOG.STRING(Fnd_Log.Level_Exception,
808: 'csd.plsql.csd_cost_analysis_pvt. Compare_EstChargesAndCosts',
809: 'SQL Message['
810: || sqlerrm
811: || ']');
894: l_item_cost NUMBER;
895: l_primary_uom_code VARCHAR2(30);
896:
897:
898: -- Variable used in FND log
899:
900: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
896:
897:
898: -- Variable used in FND log
899:
900: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
903: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
904: l_error_level number := FND_LOG.LEVEL_ERROR;
897:
898: -- Variable used in FND log
899:
900: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
903: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
904: l_error_level number := FND_LOG.LEVEL_ERROR;
905: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
898: -- Variable used in FND log
899:
900: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
903: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
904: l_error_level number := FND_LOG.LEVEL_ERROR;
905: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
906: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
899:
900: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
903: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
904: l_error_level number := FND_LOG.LEVEL_ERROR;
905: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
906: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
907:
900: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
903: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
904: l_error_level number := FND_LOG.LEVEL_ERROR;
905: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
906: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
907:
908: BEGIN
901: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
902: l_event_level number := FND_LOG.LEVEL_EVENT;
903: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
904: l_error_level number := FND_LOG.LEVEL_ERROR;
905: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
906: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
907:
908: BEGIN
909:
935: --
936: -- Begin API Body
937: --
938:
939: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
940: THEN
941: FND_LOG.STRING(Fnd_Log.Level_Procedure,
942: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost.BEGIN',
943: 'Entering Get_InvItemCost');
937: --
938:
939: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
940: THEN
941: FND_LOG.STRING(Fnd_Log.Level_Procedure,
942: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost.BEGIN',
943: 'Entering Get_InvItemCost');
944: END IF;
945:
955: IF cur_getItemCost%NOTFOUND
956: THEN
957: CLOSE cur_getItemCost;
958: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_ITEM_COST_AVAIL');
959: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
960: THEN
961: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
962: END IF;
963: -- ELSE
957: CLOSE cur_getItemCost;
958: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_ITEM_COST_AVAIL');
959: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
960: THEN
961: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
962: END IF;
963: -- ELSE
964: FND_MSG_PUB.ADD;
965: --END IF;
974: IF cur_getPrimaryUomCode%NOTFOUND
975: THEN
976: CLOSE cur_getPrimaryUomCode;
977: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_PRIMARY_UOM_CODE'); --new message
978: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
979: THEN
980: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
981: END IF;
982: -- ELSE
976: CLOSE cur_getPrimaryUomCode;
977: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_PRIMARY_UOM_CODE'); --new message
978: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
979: THEN
980: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
981: END IF;
982: -- ELSE
983: FND_MSG_PUB.ADD;
984: --END IF;
989: --Raise exception if the charge line UOM is different from item primary uom
990: --Cannot do cost analysis if the UUOMs are different
991: IF ( l_primary_uom_code <> p_chg_line_uom_code) THEN
992: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_DIFF_UOM_CODE'); --new message
993: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
994: THEN
995: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
996: END IF;
997: -- ELSE
991: IF ( l_primary_uom_code <> p_chg_line_uom_code) THEN
992: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_DIFF_UOM_CODE'); --new message
993: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
994: THEN
995: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
996: END IF;
997: -- ELSE
998: FND_MSG_PUB.ADD;
999: --END IF;
1030: THEN
1031: RAISE FND_API.G_EXC_ERROR;
1032: END IF;
1033: END IF;
1034: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
1035: THEN
1036: FND_LOG.STRING(Fnd_Log.Level_Procedure,
1037: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost.END',
1038: 'Exiting Get_InvItemCost');
1032: END IF;
1033: END IF;
1034: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
1035: THEN
1036: FND_LOG.STRING(Fnd_Log.Level_Procedure,
1037: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost.END',
1038: 'Exiting Get_InvItemCost');
1039: END IF;
1040:
1059: x_item_cost := NULL;
1060: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1061: p_data => x_msg_data,
1062: p_encoded => 'F');
1063: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1064: THEN
1065: FND_LOG.STRING(Fnd_Log.Level_Exception,
1066: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost',
1067: 'EXC_ERROR['
1061: p_data => x_msg_data,
1062: p_encoded => 'F');
1063: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1064: THEN
1065: FND_LOG.STRING(Fnd_Log.Level_Exception,
1066: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost',
1067: 'EXC_ERROR['
1068: || x_msg_data
1069: || ']');
1074: x_item_cost := NULL;
1075: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1076: p_data => x_msg_data,
1077: p_encoded => 'F');
1078: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1079: THEN
1080: FND_LOG.STRING(Fnd_Log.Level_Exception,
1081: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost',
1082: 'EXC_ERROR['
1076: p_data => x_msg_data,
1077: p_encoded => 'F');
1078: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1079: THEN
1080: FND_LOG.STRING(Fnd_Log.Level_Exception,
1081: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost',
1082: 'EXC_ERROR['
1083: || x_msg_data
1084: || ']');
1093: END IF;
1094: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1095: p_data => x_msg_data,
1096: p_encoded => 'F');
1097: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1098: THEN
1099: FND_LOG.STRING(Fnd_Log.Level_Exception,
1100: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost',
1101: 'SQL Message['
1095: p_data => x_msg_data,
1096: p_encoded => 'F');
1097: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1098: THEN
1099: FND_LOG.STRING(Fnd_Log.Level_Exception,
1100: 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost',
1101: 'SQL Message['
1102: || sqlerrm
1103: || ']');
1193: p_api_version CONSTANT NUMBER := 1.0;
1194: p_commit CONSTANT VARCHAR2(1) := 'F';
1195: p_init_msg_list CONSTANT VARCHAR2(1) := 'T';
1196: p_validation_level CONSTANT NUMBER :=fnd_api.g_valid_level_full;
1197: -- Variable used in FND log
1198:
1199: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1195: p_init_msg_list CONSTANT VARCHAR2(1) := 'T';
1196: p_validation_level CONSTANT NUMBER :=fnd_api.g_valid_level_full;
1197: -- Variable used in FND log
1198:
1199: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1202: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
1203: l_error_level number := FND_LOG.LEVEL_ERROR;
1196: p_validation_level CONSTANT NUMBER :=fnd_api.g_valid_level_full;
1197: -- Variable used in FND log
1198:
1199: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1202: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
1203: l_error_level number := FND_LOG.LEVEL_ERROR;
1204: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
1197: -- Variable used in FND log
1198:
1199: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1202: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
1203: l_error_level number := FND_LOG.LEVEL_ERROR;
1204: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
1205: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
1198:
1199: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1202: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
1203: l_error_level number := FND_LOG.LEVEL_ERROR;
1204: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
1205: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
1206:
1199: l_stat_level number := FND_LOG.LEVEL_STATEMENT;
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1202: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
1203: l_error_level number := FND_LOG.LEVEL_ERROR;
1204: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
1205: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
1206:
1207: BEGIN
1200: l_proc_level number := FND_LOG.LEVEL_PROCEDURE;
1201: l_event_level number := FND_LOG.LEVEL_EVENT;
1202: l_excep_level number := FND_LOG.LEVEL_EXCEPTION;
1203: l_error_level number := FND_LOG.LEVEL_ERROR;
1204: l_unexp_level number := FND_LOG.LEVEL_UNEXPECTED;
1205: l_mod_name varchar2(2000) := 'csd.plsql.csd_cost_analysis_pvt.Get_InvItemCost';
1206:
1207: BEGIN
1208: -- Initialize API return status to success
1212: --
1213: -- Begin API Body
1214: --
1215:
1216: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
1217: THEN
1218: FND_LOG.STRING(Fnd_Log.Level_Procedure,
1219: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost.BEGIN',
1220: 'Entering Get_ResItemCost');
1214: --
1215:
1216: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
1217: THEN
1218: FND_LOG.STRING(Fnd_Log.Level_Procedure,
1219: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost.BEGIN',
1220: 'Entering Get_ResItemCost');
1221: END IF;
1222:
1226: THEN
1227:
1228: --Check if the resource id was passed. If so, then get the resource cost
1229: If p_bom_resource_id is not null THEN
1230: IF (Fnd_Log.Level_Statement >= Fnd_Log.G_Current_Runtime_Level)
1231: THEN
1232: FND_LOG.STRING(Fnd_Log.Level_Statement,
1233: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1234: 'Resource id :'|| p_bom_resource_id);
1228: --Check if the resource id was passed. If so, then get the resource cost
1229: If p_bom_resource_id is not null THEN
1230: IF (Fnd_Log.Level_Statement >= Fnd_Log.G_Current_Runtime_Level)
1231: THEN
1232: FND_LOG.STRING(Fnd_Log.Level_Statement,
1233: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1234: 'Resource id :'|| p_bom_resource_id);
1235: END IF;
1236:
1243: CLOSE cur_getResUOMCode;
1244: --codes are different, let the user know before nulling out the item cost
1245: IF (l_res_uom_code <> p_chg_line_uom_code ) THEN
1246: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_DIFF_UOM_CODE'); --new message
1247: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
1248: THEN
1249: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
1250: END IF;
1251:
1245: IF (l_res_uom_code <> p_chg_line_uom_code ) THEN
1246: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_DIFF_UOM_CODE'); --new message
1247: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
1248: THEN
1249: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
1250: END IF;
1251:
1252: FND_MSG_PUB.ADD;
1253:
1266: --no resource id was passed or item cost
1267: -- based on resource id was null, derive the labor item cost instead.
1268: -- Get item cost
1269: IF ( p_bom_resource_id is null OR l_item_cost is null ) then
1270: IF (Fnd_Log.Level_Statement >= Fnd_Log.G_Current_Runtime_Level)
1271: THEN
1272: FND_LOG.STRING(Fnd_Log.Level_Statement,
1273: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1274: 'No resource information. Deriving Labor item cost');
1268: -- Get item cost
1269: IF ( p_bom_resource_id is null OR l_item_cost is null ) then
1270: IF (Fnd_Log.Level_Statement >= Fnd_Log.G_Current_Runtime_Level)
1271: THEN
1272: FND_LOG.STRING(Fnd_Log.Level_Statement,
1273: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1274: 'No resource information. Deriving Labor item cost');
1275: END IF;
1276: OPEN cur_getItemCost(p_inventory_item_id, p_organization_id);
1278: IF cur_getItemCost%NOTFOUND
1279: THEN
1280: CLOSE cur_getItemCost;
1281: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_ITEM_COST_AVAIL');
1282: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
1283: THEN
1284: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
1285: END IF;
1286: -- ELSE
1280: CLOSE cur_getItemCost;
1281: FND_MESSAGE.SET_NAME('CSD', 'CSD_CST_NO_ITEM_COST_AVAIL');
1282: IF (Fnd_Log.Level_Error >= Fnd_Log.G_Current_Runtime_Level)
1283: THEN
1284: FND_LOG.MESSAGE(Fnd_Log.Level_Error, l_mod_name, FALSE);
1285: END IF;
1286: -- ELSE
1287: FND_MSG_PUB.ADD;
1288: --END IF;
1321: THEN
1322: RAISE FND_API.G_EXC_ERROR;
1323: END IF;
1324: END IF;
1325: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
1326: THEN
1327: FND_LOG.STRING(Fnd_Log.Level_Procedure,
1328: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost.END',
1329: 'Exiting Get_InvItemCost');
1323: END IF;
1324: END IF;
1325: IF (Fnd_Log.Level_Procedure >= Fnd_Log.G_Current_Runtime_Level)
1326: THEN
1327: FND_LOG.STRING(Fnd_Log.Level_Procedure,
1328: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost.END',
1329: 'Exiting Get_InvItemCost');
1330: END IF;
1331:
1342: x_item_cost := NULL;
1343: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1344: p_data => x_msg_data,
1345: p_encoded => 'F');
1346: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1347: THEN
1348: FND_LOG.STRING(Fnd_Log.Level_Exception,
1349: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1350: 'EXC_ERROR['
1344: p_data => x_msg_data,
1345: p_encoded => 'F');
1346: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1347: THEN
1348: FND_LOG.STRING(Fnd_Log.Level_Exception,
1349: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1350: 'EXC_ERROR['
1351: || x_msg_data
1352: || ']');
1357: x_item_cost := NULL;
1358: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1359: p_data => x_msg_data,
1360: p_encoded => 'F');
1361: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1362: THEN
1363: FND_LOG.STRING(Fnd_Log.Level_Exception,
1364: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1365: 'EXC_ERROR['
1359: p_data => x_msg_data,
1360: p_encoded => 'F');
1361: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1362: THEN
1363: FND_LOG.STRING(Fnd_Log.Level_Exception,
1364: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1365: 'EXC_ERROR['
1366: || x_msg_data
1367: || ']');
1375: END IF;
1376: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1377: p_data => x_msg_data,
1378: p_encoded => 'F');
1379: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1380: THEN
1381: FND_LOG.STRING(Fnd_Log.Level_Exception,
1382: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1383: 'SQL Message['
1377: p_data => x_msg_data,
1378: p_encoded => 'F');
1379: IF (Fnd_Log.Level_Exception >= Fnd_Log.G_Current_Runtime_Level)
1380: THEN
1381: FND_LOG.STRING(Fnd_Log.Level_Exception,
1382: 'csd.plsql.csd_cost_analysis_pvt.Get_ResItemCost',
1383: 'SQL Message['
1384: || sqlerrm
1385: || ']');