2: /* $Header: CSTGIRCB.pls 120.3 2006/02/06 13:36:55 vtkamath noship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CST_ItemResourceCosts_GRP';
5: G_LOG_HEAD CONSTANT VARCHAR2(40) := 'cst.plsql.'||G_PKG_NAME;
6: G_LOG_LEVEL CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
7:
8: -------------------------------------------------------------------------------
9: -- API name : Get_ItemCost
10: -- Type : Group
69:
70: l_cost_type_id NUMBER;
71:
72: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
73: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
74: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
75: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
76: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
77: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
70: l_cost_type_id NUMBER;
71:
72: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
73: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
74: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
75: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
76: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
77: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
78:
71:
72: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
73: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
74: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
75: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
76: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
77: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
78:
79: BEGIN
72: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
73: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
74: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
75: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
76: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
77: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
78:
79: BEGIN
80: -- Standard start of API savepoint
73: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
74: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
75: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
76: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
77: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
78:
79: BEGIN
80: -- Standard start of API savepoint
81: SAVEPOINT Get_ItemCost_PVT;
80: -- Standard start of API savepoint
81: SAVEPOINT Get_ItemCost_PVT;
82:
83: IF l_procLog THEN
84: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin'
85: ,'Get_ItemCost <<');
86: END IF;
87:
88: -- Standard call to check for call compatibility
176: p_count => x_msg_count,
177: p_data => x_msg_data );
178:
179: IF l_procLog THEN
180: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.end'
181: ,'Get_ItemCost >>');
182: END IF;
183:
184: EXCEPTION
210: else
211: l_api_message := 'Could not determine the currency code for the organization provided.';
212: end if;
213: IF l_errorLog THEN
214: FND_LOG.string(FND_LOG.LEVEL_ERROR,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
215: ,'Get_ItemCost - '||l_api_message);
216: END IF;
217: x_msg_count := 1;
218: x_msg_data := l_api_message;
221: ROLLBACK TO Get_ItemCost_PVT;
222: x_return_status := fnd_api.g_ret_sts_unexp_error ;
223:
224: IF l_unexpLog THEN
225: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
226: ,'Get_ItemCost '||l_stmt_num||' : '||substr(SQLERRM,1,200));
227: END IF;
228:
229: x_msg_count := 1;
288:
289: l_cost_type_id NUMBER;
290:
291: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
292: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
293: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
294: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
295: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
296: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
289: l_cost_type_id NUMBER;
290:
291: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
292: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
293: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
294: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
295: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
296: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
297:
290:
291: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
292: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
293: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
294: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
295: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
296: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
297:
298: BEGIN
291: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
292: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
293: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
294: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
295: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
296: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
297:
298: BEGIN
299: -- Standard start of API savepoint
292: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
293: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);
294: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
295: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
296: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
297:
298: BEGIN
299: -- Standard start of API savepoint
300: SAVEPOINT Get_ResourceRate_PVT;
299: -- Standard start of API savepoint
300: SAVEPOINT Get_ResourceRate_PVT;
301:
302: IF l_procLog THEN
303: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin'
304: ,'Get_ResourceRate <<');
305: END IF;
306:
307: -- Standard call to check for call compatibility
360: p_count => x_msg_count,
361: p_data => x_msg_data );
362:
363: IF l_procLog THEN
364: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.end'
365: ,'Get_ResourceRate >>');
366: END IF;
367:
368: EXCEPTION
392: else
393: l_api_message := 'Could not determine the currency code for the organization provided.';
394: end if;
395: IF l_errorLog THEN
396: FND_LOG.string(FND_LOG.LEVEL_ERROR,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
397: ,'Get_ResourceRate - '||l_api_message);
398: END IF;
399: x_msg_count := 1;
400: x_msg_data := l_api_message;
403: ROLLBACK TO Get_ResourceRate_PVT;
404: x_return_status := fnd_api.g_ret_sts_unexp_error ;
405:
406: IF l_unexpLog THEN
407: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num
408: ,'Get_ResourceRate '||l_stmt_num||' : '||substr(SQLERRM,1,200));
409: END IF;
410:
411: x_msg_count := 1;