DBA Data[Home] [Help]

APPS.CST_REVENUECOGSMATCH_PVT dependencies on FND_API

Line 91: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

87: l_api_name CONSTANT VARCHAR2(30) := 'Match_RevenueCOGS';
88: l_api_version CONSTANT NUMBER := 1.0;
89: l_api_message VARCHAR2(1000);
90:
91: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
92: l_dummy_status VARCHAR2(1); /* not sure why AR needs this, hopefully can remove it ... */
93: l_msg_count NUMBER := 0;
94: l_msg_data VARCHAR2(8000) := '';
95: l_stmt_num NUMBER := 0;

Line 145: IF NOT FND_API.Compatible_API_Call (

141: 'p_phase = '||p_phase);
142: END IF;
143: */
144: -- Standard call to check for call compatibility
145: IF NOT FND_API.Compatible_API_Call (
146: l_api_version,
147: p_api_version,
148: l_api_name,
149: G_PKG_NAME ) THEN

Line 150: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

146: l_api_version,
147: p_api_version,
148: l_api_name,
149: G_PKG_NAME ) THEN
150: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
151: END IF;
152:
153: -- Initialize message list if p_init_msg_list is set to TRUE
154: FND_MSG_PUB.initialize;

Line 157: x_return_status := FND_API.G_RET_STS_SUCCESS;

153: -- Initialize message list if p_init_msg_list is set to TRUE
154: FND_MSG_PUB.initialize;
155:
156: -- Initialize API return status to success
157: x_return_status := FND_API.G_RET_STS_SUCCESS;
158:
159: -- API Body
160:
161: -- Populate WHO column variables

Line 193: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

189: p_pgm_app_id => l_pgm_app_id,
190: p_pgm_id => l_pgm_id,
191: x_return_status => l_return_status);
192:
193: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
194: IF l_errorLog THEN
195: FND_LOG.string(FND_LOG.LEVEL_ERROR,l_module||'.'||l_stmt_num,substr(SQLERRM,1,250));
196: END IF;
197: raise program_exception;

Line 209: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

205: p_pgm_app_id => l_pgm_app_id,
206: p_pgm_id => l_pgm_id,
207: x_return_status => l_return_status);
208:
209: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
210: IF l_errorLog THEN
211: FND_LOG.string(FND_LOG.LEVEL_ERROR,l_module||'.'||l_stmt_num,substr(SQLERRM,1,250));
212: END IF;
213: raise program_exception;

Line 277: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

273: x_msg_count => l_msg_count,
274: x_msg_data => l_msg_data
275: );
276:
277: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
278: IF l_errorLog THEN
279: FND_LOG.string(FND_LOG.LEVEL_ERROR,l_module||'.'||l_stmt_num,substr(SQLERRM,1,250));
280: END IF;
281: raise program_exception;

Line 342: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

338: -- with potentially_unmatched_flag = 'Y'. This column is a histogram, so we
339: -- need to gather stats before running phase 3, which relies heavily on this
340: -- column.
341: IF NOT FND_INSTALLATION.GET_APP_INFO('BOM', l_status, l_industry, l_schema) THEN
342: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
343: END IF;
344:
345: IF l_schema IS NOT NULL THEN
346: l_stmt_num := 37;

Line 378: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

374: x_return_status => l_return_status,
375: p_ledger_id => p_ledger_id -- BUG#5726230
376: ,p_neg_req_id => p_neg_req_id); -- BUG#7387575
377:
378: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
379: IF l_errorLog THEN
380: FND_LOG.string(FND_LOG.LEVEL_ERROR,l_module||'.'||l_stmt_num,substr(SQLERRM,1,250));
381: END IF;
382: raise program_exception;

Line 454: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

450: x_return_status => l_return_status,
451: p_ledger_id => p_ledger_id --BUG5726230
452: ,p_neg_req_id => p_neg_req_id);--BUG7387575
453:
454: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
455: IF l_errorLog THEN
456: FND_LOG.string(FND_LOG.LEVEL_ERROR,l_module||'.'||l_stmt_num,substr(SQLERRM,1,250));
457: END IF;
458: raise program_exception;

Line 496: x_return_status := fnd_api.g_ret_sts_error;

492: debug('Match_RevenueCOGS-');
493:
494: EXCEPTION
495: WHEN program_exception THEN
496: x_return_status := fnd_api.g_ret_sts_error;
497:
498: FND_MESSAGE.set_name('BOM', 'CST_PLSQL_ERROR');
499: FND_MESSAGE.set_token('PACKAGE', G_PKG_NAME);
500: FND_MESSAGE.set_token('PROCEDURE',l_api_name);

Line 530: x_return_status := fnd_api.g_ret_sts_unexp_error ;

526: Print_MessageStack;
527:
528: WHEN OTHERS THEN
529:
530: x_return_status := fnd_api.g_ret_sts_unexp_error ;
531:
532: IF l_unexpLog THEN
533: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
534: ,substrb(SQLERRM,1,250));

Line 588: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

584:
585: l_api_name CONSTANT VARCHAR2(30) := 'Insert_SoIssues';
586: l_api_message VARCHAR2(100);
587: l_stmt_num NUMBER := 0;
588: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
589:
590: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
591: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
592: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);

Line 649: x_return_status := FND_API.G_RET_STS_SUCCESS;

645: );
646: END IF;
647:
648: -- Initialize return values
649: x_return_status := FND_API.G_RET_STS_SUCCESS;
650:
651: -- API Body
652:
653: debug(' g_ledger_id : '||g_ledger_id);

Line 680: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

676: p_cost_group_id => cv_so_issues.cost_group_id,
677: p_quantity => cv_so_issues.quantity
678: );
679:
680: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
681: x_return_status := fnd_api.g_ret_sts_error;
682: FND_MESSAGE.set_name('BOM', 'CST_FAILED_DEFCOGS_SO_INSERT');
683: FND_MESSAGE.set_token('COGS_OM_LINE', to_char(cv_so_issues.cogs_om_line_id));
684: FND_MESSAGE.set_token('MMT_TXN_ID',to_char(cv_so_issues.mmt_txn_id));

Line 681: x_return_status := fnd_api.g_ret_sts_error;

677: p_quantity => cv_so_issues.quantity
678: );
679:
680: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
681: x_return_status := fnd_api.g_ret_sts_error;
682: FND_MESSAGE.set_name('BOM', 'CST_FAILED_DEFCOGS_SO_INSERT');
683: FND_MESSAGE.set_token('COGS_OM_LINE', to_char(cv_so_issues.cogs_om_line_id));
684: FND_MESSAGE.set_token('MMT_TXN_ID',to_char(cv_so_issues.mmt_txn_id));
685: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 715: x_return_status := fnd_api.g_ret_sts_unexp_error ;

711: EXCEPTION
712:
713: WHEN OTHERS THEN
714: ROLLBACK TO Insert_SoIssues_PVT;
715: x_return_status := fnd_api.g_ret_sts_unexp_error ;
716:
717: IF l_unexpLog THEN
718: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num
719: ,'Insert_SoIssues ('||to_char(l_stmt_num)||') : '||substr(SQLERRM,1,200));

Line 866: x_return_status := FND_API.G_RET_STS_SUCCESS;

862: );
863: END IF;
864: */
865: -- Initialize return values
866: x_return_status := FND_API.G_RET_STS_SUCCESS;
867:
868: -- API Body
869:
870: l_last_fetch := FALSE; -- initialize boolean variable

Line 1265: x_return_status := fnd_api.g_ret_sts_error;

1261: x_error_code => l_error_code,
1262: x_error_message => l_error_message);
1263:
1264: IF (l_return_num <> 0) THEN
1265: x_return_status := fnd_api.g_ret_sts_error;
1266: FND_MESSAGE.set_name('BOM', 'CST_FAILED_COGSREC_MMT_INSERT');
1267: FND_MESSAGE.set_token('ERROR_CODE', l_error_code);
1268: FND_MESSAGE.set_token('ERROR_MESSAGE',substr(l_error_message,1,500));
1269: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 1303: x_return_status := fnd_api.g_ret_sts_error;

1299: debug('Insert_RmaReceipts-');
1300: EXCEPTION
1301: WHEN program_exception THEN
1302: ROLLBACK TO Insert_RmaReceipts_PVT;
1303: x_return_status := fnd_api.g_ret_sts_error;
1304:
1305: WHEN OTHERS THEN
1306: ROLLBACK TO Insert_RmaReceipts_PVT;
1307: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1307: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1303: x_return_status := fnd_api.g_ret_sts_error;
1304:
1305: WHEN OTHERS THEN
1306: ROLLBACK TO Insert_RmaReceipts_PVT;
1307: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1308:
1309: IF l_unexpLog THEN
1310: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num
1311: ,'Insert_RmaReceipts ('||to_char(l_stmt_num)||') : '||substr(SQLERRM,1,200));

Line 1359: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

1355: ) IS
1356:
1357: l_api_name CONSTANT VARCHAR2(30) := 'Create_CogsRecognitionEvents';
1358: l_api_message VARCHAR2(1000);
1359: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1360: l_stmt_num NUMBER := 0;
1361:
1362: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
1363: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);

Line 1535: x_return_status := FND_API.G_RET_STS_SUCCESS;

1531:
1532: debug(' p_ledger_id :'||p_ledger_id);
1533:
1534: -- Initialize return values
1535: x_return_status := FND_API.G_RET_STS_SUCCESS;
1536:
1537: -- API Body
1538:
1539: -- Populate offset for each organization that might be affected

Line 2339: IF l_return_status <> fnd_api.g_ret_sts_success THEN

2335: ensure_mmt_per_and_date(x_return_status => l_return_status,
2336: x_msg_count => l_msg_count,
2337: x_msg_data => l_error_message);
2338:
2339: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2340: debug(FND_LOG.LEVEL_ERROR, l_module||'.'||to_char(l_stmt_num));
2341: raise program_exception;
2342: END IF;
2343: --}

Line 2355: x_return_status := fnd_api.g_ret_sts_error;

2351: x_error_code => l_error_code,
2352: x_error_message => l_error_message);
2353:
2354: IF (l_return_num <> 0) THEN
2355: x_return_status := fnd_api.g_ret_sts_error;
2356: FND_MESSAGE.set_name('BOM', 'CST_FAILED_COGSREC_MMT_INSERT');
2357: FND_MESSAGE.set_token('ERROR_CODE', l_error_code);
2358: FND_MESSAGE.set_token('ERROR_MESSAGE',substr(l_error_message,1,500));
2359: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 2457: x_return_status := FND_API.G_RET_STS_SUCCESS;

2453: EXCEPTION
2454: WHEN end_of_program THEN
2455: ROLLBACK TO Create_CogsRecEvents_PVT;
2456: -- Let the program end normally
2457: x_return_status := FND_API.G_RET_STS_SUCCESS;
2458: debug('EXCEPTION end_of_program Create_CogsRecognitionEvents '||l_stmt_num||' : no ledger found - p_ledger_id :'||p_ledger_id);
2459:
2460: WHEN program_exception THEN
2461: ROLLBACK TO Create_CogsRecEvents_PVT;

Line 2462: x_return_status := fnd_api.g_ret_sts_error;

2458: debug('EXCEPTION end_of_program Create_CogsRecognitionEvents '||l_stmt_num||' : no ledger found - p_ledger_id :'||p_ledger_id);
2459:
2460: WHEN program_exception THEN
2461: ROLLBACK TO Create_CogsRecEvents_PVT;
2462: x_return_status := fnd_api.g_ret_sts_error;
2463: FND_FILE.put_line(fnd_file.log, 'program_exception EXCEPTION IN Create_CogsRecognitionEvents');
2464:
2465: WHEN OTHERS THEN
2466: ROLLBACK TO Create_CogsRecEvents_PVT;

Line 2467: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2463: FND_FILE.put_line(fnd_file.log, 'program_exception EXCEPTION IN Create_CogsRecognitionEvents');
2464:
2465: WHEN OTHERS THEN
2466: ROLLBACK TO Create_CogsRecEvents_PVT;
2467: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2468:
2469: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2470: FND_MESSAGE.set_name('BOM', 'CST_UNEXP_ERROR');
2471: FND_MESSAGE.set_token('PACKAGE', G_PKG_NAME);

Line 2520: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2516: -----------------------------------------------------------------------------
2517:
2518: PROCEDURE Insert_OneSoIssue(
2519: p_api_version IN NUMBER,
2520: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2521: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2522: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2523: p_user_id IN NUMBER,
2524: p_login_id IN NUMBER,

Line 2521: p_commit IN VARCHAR2 := FND_API.G_FALSE,

2517:
2518: PROCEDURE Insert_OneSoIssue(
2519: p_api_version IN NUMBER,
2520: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2521: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2522: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2523: p_user_id IN NUMBER,
2524: p_login_id IN NUMBER,
2525: p_request_id IN NUMBER,

Line 2522: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

2518: PROCEDURE Insert_OneSoIssue(
2519: p_api_version IN NUMBER,
2520: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2521: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2522: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2523: p_user_id IN NUMBER,
2524: p_login_id IN NUMBER,
2525: p_request_id IN NUMBER,
2526: p_pgm_app_id IN NUMBER,

Line 2543: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

2539:
2540: l_api_name CONSTANT VARCHAR2(30) := 'Insert_OneSoIssue';
2541: l_api_message VARCHAR2(1000);
2542: l_api_version CONSTANT NUMBER := 1.0;
2543: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
2544: l_msg_count NUMBER := 0;
2545: l_msg_data VARCHAR2(8000) := '';
2546: l_stmt_num NUMBER := 0;
2547:

Line 2599: IF NOT FND_API.Compatible_API_Call (

2595: );
2596: END IF;
2597: */
2598: -- Standard call to check for call compatibility
2599: IF NOT FND_API.Compatible_API_Call (
2600: l_api_version,
2601: p_api_version,
2602: l_api_name,
2603: G_PKG_NAME ) THEN

Line 2604: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2600: l_api_version,
2601: p_api_version,
2602: l_api_name,
2603: G_PKG_NAME ) THEN
2604: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2605: END IF;
2606:
2607: -- Initialize message list if p_init_msg_list is set to TRUE
2608: IF FND_API.to_Boolean(p_init_msg_list) THEN

Line 2608: IF FND_API.to_Boolean(p_init_msg_list) THEN

2604: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2605: END IF;
2606:
2607: -- Initialize message list if p_init_msg_list is set to TRUE
2608: IF FND_API.to_Boolean(p_init_msg_list) THEN
2609: FND_MSG_PUB.initialize;
2610: END IF;
2611:
2612: -- Initialize API return status to success

Line 2613: x_return_status := FND_API.G_RET_STS_SUCCESS;

2609: FND_MSG_PUB.initialize;
2610: END IF;
2611:
2612: -- Initialize API return status to success
2613: x_return_status := FND_API.G_RET_STS_SUCCESS;
2614:
2615: -- API Body
2616:
2617: -- initialize

Line 2642: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2638: x_return_status => l_return_status,
2639: x_msg_count => l_msg_count,
2640: x_msg_data => l_msg_data);
2641:
2642: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2643: FND_MESSAGE.set_name('BOM', 'CST_NO_REVENUE_OM_LINE');
2644: FND_MESSAGE.set_token('COGS_LINE_ID', to_char(p_cogs_om_line_id));
2645: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2646: FND_MSG_PUB.ADD;

Line 2806: x_return_status := fnd_api.g_ret_sts_error;

2802:
2803: EXCEPTION
2804: WHEN program_exception THEN
2805: ROLLBACK TO Insert_OneSoIssue_PVT; /*Bug 7384398*/
2806: x_return_status := fnd_api.g_ret_sts_error;
2807: WHEN OTHERS THEN
2808: ROLLBACK TO Insert_OneSoIssue_PVT;
2809: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2810:

Line 2809: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2805: ROLLBACK TO Insert_OneSoIssue_PVT; /*Bug 7384398*/
2806: x_return_status := fnd_api.g_ret_sts_error;
2807: WHEN OTHERS THEN
2808: ROLLBACK TO Insert_OneSoIssue_PVT;
2809: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2810:
2811: IF l_unexpLog THEN
2812: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
2813: ,'Insert_OneSoIssue ('||to_char(l_stmt_num)||') : '||substr(SQLERRM,1,200));

Line 2858: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2854: -----------------------------------------------------------------------------
2855:
2856: PROCEDURE Insert_OneRmaReceipt(
2857: p_api_version IN NUMBER,
2858: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2859: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2860: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2861: p_user_id IN NUMBER,
2862: p_login_id IN NUMBER,

Line 2859: p_commit IN VARCHAR2 := FND_API.G_FALSE,

2855:
2856: PROCEDURE Insert_OneRmaReceipt(
2857: p_api_version IN NUMBER,
2858: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2859: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2860: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2861: p_user_id IN NUMBER,
2862: p_login_id IN NUMBER,
2863: p_request_id IN NUMBER,

Line 2860: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

2856: PROCEDURE Insert_OneRmaReceipt(
2857: p_api_version IN NUMBER,
2858: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2859: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2860: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2861: p_user_id IN NUMBER,
2862: p_login_id IN NUMBER,
2863: p_request_id IN NUMBER,
2864: p_pgm_app_id IN NUMBER,

Line 2937: IF NOT FND_API.Compatible_API_Call (

2933: );
2934: END IF;
2935: */
2936: -- Standard call to check for call compatibility
2937: IF NOT FND_API.Compatible_API_Call (
2938: l_api_version,
2939: p_api_version,
2940: l_api_name,
2941: G_PKG_NAME ) THEN

Line 2942: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2938: l_api_version,
2939: p_api_version,
2940: l_api_name,
2941: G_PKG_NAME ) THEN
2942: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2943: END IF;
2944:
2945: -- Initialize message list if p_init_msg_list is set to TRUE
2946: IF FND_API.to_Boolean(p_init_msg_list) THEN

Line 2946: IF FND_API.to_Boolean(p_init_msg_list) THEN

2942: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2943: END IF;
2944:
2945: -- Initialize message list if p_init_msg_list is set to TRUE
2946: IF FND_API.to_Boolean(p_init_msg_list) THEN
2947: FND_MSG_PUB.initialize;
2948: END IF;
2949:
2950: -- Initialize API return status to success

Line 2951: x_return_status := FND_API.G_RET_STS_SUCCESS;

2947: FND_MSG_PUB.initialize;
2948: END IF;
2949:
2950: -- Initialize API return status to success
2951: x_return_status := FND_API.G_RET_STS_SUCCESS;
2952: x_msg_count := 0;
2953: x_msg_data := '';
2954:
2955:

Line 3324: x_return_status := fnd_api.g_ret_sts_error;

3320: x_error_code => l_error_code,
3321: x_error_message => l_error_message);
3322:
3323: IF (l_return_num <> 0) THEN
3324: x_return_status := fnd_api.g_ret_sts_error;
3325: FND_MESSAGE.set_name('BOM', 'CST_FAILED_COGSREC_MMT_INSERT');
3326: FND_MESSAGE.set_token('ERROR_CODE', l_error_code);
3327: FND_MESSAGE.set_token('ERROR_MESSAGE',substr(l_error_message,1,500));
3328: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 3361: x_return_status := fnd_api.g_ret_sts_error;

3357: debug('Insert_OneRmaReceipt-');
3358: EXCEPTION
3359: WHEN program_exception THEN
3360: ROLLBACK TO Insert_OneRmaReceipt_PVT;
3361: x_return_status := fnd_api.g_ret_sts_error;
3362: WHEN OTHERS THEN
3363: ROLLBACK TO Insert_OneRmaReceipt_PVT;
3364: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3365:

Line 3364: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3360: ROLLBACK TO Insert_OneRmaReceipt_PVT;
3361: x_return_status := fnd_api.g_ret_sts_error;
3362: WHEN OTHERS THEN
3363: ROLLBACK TO Insert_OneRmaReceipt_PVT;
3364: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3365:
3366: IF l_unexpLog THEN
3367: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
3368: ,'Insert_OneRmaReceipt '||to_char(l_stmt_num)||' : '||substr(SQLERRM,1,200));

Line 3416: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

3412: -----------------------------------------------------------------------------
3413:
3414: PROCEDURE Record_SoIssueCost(
3415: p_api_version IN NUMBER,
3416: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3417: p_user_id IN NUMBER,
3418: p_login_id IN NUMBER,
3419: p_request_id IN NUMBER,
3420: p_pgm_app_id IN NUMBER,

Line 3441: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

3437: l_api_message VARCHAR2(1000);
3438: l_stmt_num NUMBER := 0;
3439: l_api_version CONSTANT NUMBER := 1.0;
3440:
3441: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3442:
3443: l_module CONSTANT VARCHAR2(100) := G_LOG_HEAD ||'.'||l_api_name;
3444: l_unexpLog CONSTANT BOOLEAN := (FND_LOG.LEVEL_UNEXPECTED >= G_LOG_LEVEL) AND FND_LOG.TEST(FND_LOG.LEVEL_UNEXPECTED, l_module);
3445: l_errorLog CONSTANT BOOLEAN := l_unexpLog and (FND_LOG.LEVEL_ERROR >= G_LOG_LEVEL);

Line 3474: IF NOT FND_API.Compatible_API_Call (

3470: );
3471: END IF;
3472:
3473: -- Standard call to check for call compatibility
3474: IF NOT FND_API.Compatible_API_Call (
3475: l_api_version,
3476: p_api_version,
3477: l_api_name,
3478: G_PKG_NAME ) THEN

Line 3479: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3475: l_api_version,
3476: p_api_version,
3477: l_api_name,
3478: G_PKG_NAME ) THEN
3479: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3480: END IF;
3481:
3482: -- Initialize message list if p_init_msg_list is set to TRUE
3483: IF FND_API.to_Boolean(p_init_msg_list) THEN

Line 3483: IF FND_API.to_Boolean(p_init_msg_list) THEN

3479: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3480: END IF;
3481:
3482: -- Initialize message list if p_init_msg_list is set to TRUE
3483: IF FND_API.to_Boolean(p_init_msg_list) THEN
3484: FND_MSG_PUB.initialize;
3485: END IF;
3486:
3487: -- Initialize API return status to success

Line 3488: x_return_status := FND_API.G_RET_STS_SUCCESS;

3484: FND_MSG_PUB.initialize;
3485: END IF;
3486:
3487: -- Initialize API return status to success
3488: x_return_status := FND_API.G_RET_STS_SUCCESS;
3489: x_msg_count := 0;
3490: x_msg_data := '';
3491:
3492: -- API Body

Line 3540: , p_encoded => FND_API.g_false

3536:
3537: FND_MSG_PUB.count_and_get
3538: ( p_count => x_msg_count
3539: , p_data => x_msg_data
3540: , p_encoded => FND_API.g_false
3541: );
3542:
3543: x_return_status := l_return_status;
3544:

Line 3555: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3551: EXCEPTION
3552:
3553: WHEN OTHERS THEN
3554: ROLLBACK TO Record_SoIssueCost_PVT;
3555: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3556:
3557: IF l_unexpLog THEN
3558: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
3559: ,'Record_SoIssueCost '||to_char(l_stmt_num)||' : '||substr(SQLERRM,1,200));

Line 3573: , p_encoded => FND_API.g_false

3569:
3570: FND_MSG_PUB.count_and_get
3571: ( p_count => x_msg_count
3572: , p_data => x_msg_data
3573: , p_encoded => FND_API.g_false
3574: );
3575:
3576: END Record_SoIssueCost;
3577:

Line 3633: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

3629:
3630: l_api_name CONSTANT VARCHAR2(30) := 'Process_RmaReceipt';
3631: l_api_message VARCHAR2(1000);
3632: l_stmt_num NUMBER := 0;
3633: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
3634: l_msg_count NUMBER := 0;
3635: l_msg_data VARCHAR2(8000) := '';
3636:
3637: l_elemental_cost number_table;

Line 3691: x_return_status := FND_API.G_RET_STS_SUCCESS;

3687: );
3688: END IF;
3689:
3690: -- Initialize API return status to success
3691: x_return_status := FND_API.G_RET_STS_SUCCESS;
3692: x_msg_count := 0;
3693: x_msg_data := '';
3694:
3695: -- API Body

Line 3726: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3722: x_event_id => l_rma_cce_id,
3723: x_cogs_percentage => l_cogs_percentage
3724: );
3725:
3726: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3727: x_return_status := fnd_api.g_ret_sts_error;
3728: FND_MESSAGE.set_name('BOM', 'CST_FAILED_DEFCOGS_RMA_INSERT');
3729: FND_MESSAGE.set_token('COGS_OM_LINE', to_char(p_cogs_om_line_id));
3730: FND_MESSAGE.set_token('MMT_TXN_ID',to_char(p_transaction_id));

Line 3727: x_return_status := fnd_api.g_ret_sts_error;

3723: x_cogs_percentage => l_cogs_percentage
3724: );
3725:
3726: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3727: x_return_status := fnd_api.g_ret_sts_error;
3728: FND_MESSAGE.set_name('BOM', 'CST_FAILED_DEFCOGS_RMA_INSERT');
3729: FND_MESSAGE.set_token('COGS_OM_LINE', to_char(p_cogs_om_line_id));
3730: FND_MESSAGE.set_token('MMT_TXN_ID',to_char(p_transaction_id));
3731: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 3822: , p_encoded => FND_API.g_false

3818:
3819: FND_MSG_PUB.count_and_get
3820: ( p_count => x_msg_count
3821: , p_data => x_msg_data
3822: , p_encoded => FND_API.g_false
3823: );
3824:
3825: IF l_proclog THEN
3826: fnd_log.string(FND_LOG.LEVEL_PROCEDURE,l_module||'.end',

Line 3836: x_return_status := fnd_api.g_ret_sts_error ;

3832: EXCEPTION
3833:
3834: WHEN program_exception THEN
3835: ROLLBACK TO Process_RmaReceipt_PVT;
3836: x_return_status := fnd_api.g_ret_sts_error ;
3837:
3838: FND_MESSAGE.set_name('BOM', 'CST_PLSQL_ERROR');
3839: FND_MESSAGE.set_token('PACKAGE', G_PKG_NAME);
3840: FND_MESSAGE.set_token('PROCEDURE',l_api_name);

Line 3853: p_encoded => FND_API.g_false

3849:
3850: FND_MSG_PUB.count_and_get
3851: ( p_count => x_msg_count,
3852: p_data => x_msg_data,
3853: p_encoded => FND_API.g_false
3854: );
3855:
3856: WHEN OTHERS THEN
3857: ROLLBACK TO Process_RmaReceipt_PVT;

Line 3858: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3854: );
3855:
3856: WHEN OTHERS THEN
3857: ROLLBACK TO Process_RmaReceipt_PVT;
3858: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3859:
3860: IF l_unexpLog THEN
3861: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,l_module||'.'||l_stmt_num
3862: ,'Process_RmaReceipt '||to_char(l_stmt_num)||' : '||substr(SQLERRM,1,200));

Line 3876: , p_encoded => FND_API.g_false

3872:
3873: FND_MSG_PUB.count_and_get
3874: ( p_count => x_msg_count
3875: , p_data => x_msg_data
3876: , p_encoded => FND_API.g_false
3877: );
3878:
3879: END Process_RmaReceipt;
3880:

Line 3977: x_return_status := FND_API.G_RET_STS_SUCCESS;

3973: );
3974: END IF;
3975:
3976: -- Initialize API return status to success
3977: x_return_status := FND_API.G_RET_STS_SUCCESS;
3978: x_msg_count := 0;
3979: x_msg_data := '';
3980:
3981: -- API Body

Line 4050: , p_encoded => FND_API.g_false

4046:
4047: FND_MSG_PUB.count_and_get
4048: ( p_count => x_msg_count
4049: , p_data => x_msg_data
4050: , p_encoded => FND_API.g_false
4051: );
4052:
4053: IF l_proclog THEN
4054: fnd_log.string(FND_LOG.LEVEL_PROCEDURE,l_module||'.end',

Line 4063: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4059:
4060: EXCEPTION
4061: WHEN OTHERS THEN
4062: ROLLBACK TO Process_CogsRecognitionTxn_PVT;
4063: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4064:
4065: IF l_unexpLog THEN
4066: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num
4067: ,'Process_CogsRecognitionTxn ('||to_char(l_stmt_num)||') : '||substr(SQLERRM,1,200));

Line 4081: , p_encoded => FND_API.g_false

4077:
4078: FND_MSG_PUB.count_and_get
4079: ( p_count => x_msg_count
4080: , p_data => x_msg_data
4081: , p_encoded => FND_API.g_false
4082: );
4083:
4084: END Process_CogsRecognitionTxn;
4085:

Line 4127: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

4123: l_eventLog CONSTANT BOOLEAN := l_errorLog and (FND_LOG.LEVEL_EVENT >= G_LOG_LEVEL);
4124: l_procLog CONSTANT BOOLEAN := l_eventLog and (FND_LOG.LEVEL_PROCEDURE >= G_LOG_LEVEL);
4125: l_stmtLog CONSTANT BOOLEAN := l_procLog and (FND_LOG.LEVEL_STATEMENT >= G_LOG_LEVEL);
4126:
4127: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4128: l_stmt_num NUMBER := 0;
4129:
4130: CURSOR c_uncosted_cogs_events(p_sob_id IN NUMBER) IS
4131: SELECT cce.cogs_om_line_id,

Line 4241: x_return_status := FND_API.G_RET_STS_SUCCESS;

4237: );
4238: END IF;
4239:
4240: -- Initialize API return status to success
4241: x_return_status := FND_API.G_RET_STS_SUCCESS;
4242:
4243: -- API Body
4244: -- Need to loop by set of books (ledger) because the call to the SLA
4245: -- API requires the ledger as an input parameter. So we'll have to

Line 4525: x_return_status := FND_API.G_RET_STS_SUCCESS;

4521: EXCEPTION
4522: WHEN end_of_program THEN
4523: ROLLBACK TO Cost_BulkCogsRecTxns_PVT;
4524: -- Let the program end normally
4525: x_return_status := FND_API.G_RET_STS_SUCCESS;
4526: debug('EXCEPTION end_of_program - Cost_BulkCogsRecTxns '||l_stmt_num||' : no ledger found - p_ledger_id :'||p_ledger_id);
4527:
4528: WHEN OTHERS THEN
4529: ROLLBACK TO Cost_BulkCogsRecTxns_PVT;

Line 4530: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4526: debug('EXCEPTION end_of_program - Cost_BulkCogsRecTxns '||l_stmt_num||' : no ledger found - p_ledger_id :'||p_ledger_id);
4527:
4528: WHEN OTHERS THEN
4529: ROLLBACK TO Cost_BulkCogsRecTxns_PVT;
4530: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4531:
4532: IF l_unexpLog THEN
4533: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num
4534: ,'Cost_BulkCogsRecTxns '||to_char(l_stmt_num)||' : '||substr(SQLERRM,1,200));

Line 4572: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

4568: -- End of comments --
4569: -----------------------------------------------------------------------------
4570: PROCEDURE Insert_PacSoIssue(
4571: p_api_version IN NUMBER,
4572: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4573: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4574: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
4575: x_return_status OUT NOCOPY VARCHAR2,
4576: x_msg_count OUT NOCOPY NUMBER,

Line 4573: p_commit IN VARCHAR2 := FND_API.G_FALSE,

4569: -----------------------------------------------------------------------------
4570: PROCEDURE Insert_PacSoIssue(
4571: p_api_version IN NUMBER,
4572: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4573: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4574: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
4575: x_return_status OUT NOCOPY VARCHAR2,
4576: x_msg_count OUT NOCOPY NUMBER,
4577: x_msg_data OUT NOCOPY VARCHAR2,

Line 4574: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

4570: PROCEDURE Insert_PacSoIssue(
4571: p_api_version IN NUMBER,
4572: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4573: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4574: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
4575: x_return_status OUT NOCOPY VARCHAR2,
4576: x_msg_count OUT NOCOPY NUMBER,
4577: x_msg_data OUT NOCOPY VARCHAR2,
4578: p_transaction_id IN NUMBER,

Line 4628: IF NOT FND_API.Compatible_API_Call (

4624: );
4625: END IF;
4626:
4627: -- Standard call to check for call compatibility
4628: IF NOT FND_API.Compatible_API_Call (
4629: l_api_version,
4630: p_api_version,
4631: l_api_name,
4632: G_PKG_NAME ) THEN

Line 4633: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

4629: l_api_version,
4630: p_api_version,
4631: l_api_name,
4632: G_PKG_NAME ) THEN
4633: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4634: END IF;
4635:
4636: -- Initialize message list if p_init_msg_list is set to TRUE
4637: IF FND_API.to_Boolean(p_init_msg_list) THEN

Line 4637: IF FND_API.to_Boolean(p_init_msg_list) THEN

4633: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4634: END IF;
4635:
4636: -- Initialize message list if p_init_msg_list is set to TRUE
4637: IF FND_API.to_Boolean(p_init_msg_list) THEN
4638: FND_MSG_PUB.initialize;
4639: END IF;
4640:
4641: -- Initialize API return status to success

Line 4642: x_return_status := FND_API.G_RET_STS_SUCCESS;

4638: FND_MSG_PUB.initialize;
4639: END IF;
4640:
4641: -- Initialize API return status to success
4642: x_return_status := FND_API.G_RET_STS_SUCCESS;
4643: x_msg_count := 0;
4644: x_msg_data := '';
4645:
4646: -- API Body

Line 4769: , p_encoded => FND_API.g_false

4765:
4766: FND_MSG_PUB.count_and_get
4767: ( p_count => x_msg_count
4768: , p_data => x_msg_data
4769: , p_encoded => FND_API.g_false
4770: );
4771:
4772:
4773:

Line 4778: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4774: EXCEPTION
4775:
4776: WHEN OTHERS THEN
4777: ROLLBACK TO Insert_PacSoIssue_PVT;
4778: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4779:
4780: IF l_unexpLog THEN
4781: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||'.'||l_stmt_num
4782: ,'Insert_PacSoIssue ('||to_char(l_stmt_num)||') : '||substr(SQLERRM,1,200));

Line 4796: , p_encoded => FND_API.g_false

4792:
4793: FND_MSG_PUB.count_and_get
4794: ( p_count => x_msg_count
4795: , p_data => x_msg_data
4796: , p_encoded => FND_API.g_false
4797: );
4798:
4799: END Insert_PacSoIssue;
4800:

Line 5190: p_encoded => FND_API.g_false

5186: BEGIN
5187: FND_MSG_PUB.count_and_get
5188: ( p_count => l_msg_count,
5189: p_data => l_msg_data,
5190: p_encoded => FND_API.g_false
5191: );
5192: IF (l_msg_count > 1) THEN
5193: FOR i IN 1..l_msg_count LOOP
5194: l_msg_data := FND_MSG_PUB.get(i, FND_API.g_false);

Line 5194: l_msg_data := FND_MSG_PUB.get(i, FND_API.g_false);

5190: p_encoded => FND_API.g_false
5191: );
5192: IF (l_msg_count > 1) THEN
5193: FOR i IN 1..l_msg_count LOOP
5194: l_msg_data := FND_MSG_PUB.get(i, FND_API.g_false);
5195: FND_FILE.PUT_LINE(FND_FILE.LOG, l_msg_data);
5196: END LOOP;
5197: ELSIF (l_msg_count = 1) THEN
5198: FND_FILE.PUT_LINE(FND_FILE.LOG, l_msg_data);

Line 5288: l_return_status := fnd_api.g_ret_sts_success;

5284: -- Initialize variables
5285:
5286: l_amount := 16383;
5287: l_offset := 1;
5288: l_return_status := fnd_api.g_ret_sts_success;
5289: l_msg_count := 0;
5290: if(p_cost_method = 1) then
5291: l_operating_unit := mo_global.get_current_org_id;
5292: else

Line 5339: if(not fnd_api.Compatible_API_Call( l_api_version,

5335: );
5336:
5337: -- Standard call to check the API version
5338:
5339: if(not fnd_api.Compatible_API_Call( l_api_version,
5340: p_api_version,
5341: l_api_name,
5342: G_PKG_NAME)) then
5343: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

Line 5343: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

5339: if(not fnd_api.Compatible_API_Call( l_api_version,
5340: p_api_version,
5341: l_api_name,
5342: G_PKG_NAME)) then
5343: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5344: end if;
5345:
5346: l_stmt_num := 10;
5347:

Line 5368: p_init_msg_list => fnd_api.G_FALSE,

5364: -- XML data
5365: /*========================================================================*/
5366:
5367: Add_Parameters ( p_api_version => 1.0,
5368: p_init_msg_list => fnd_api.G_FALSE,
5369: p_validation_level => fnd_api.G_VALID_LEVEL_FULL,
5370: x_return_status => l_return_status,
5371: x_msg_count => l_msg_count,
5372: x_msg_data => l_msg_data,

Line 5369: p_validation_level => fnd_api.G_VALID_LEVEL_FULL,

5365: /*========================================================================*/
5366:
5367: Add_Parameters ( p_api_version => 1.0,
5368: p_init_msg_list => fnd_api.G_FALSE,
5369: p_validation_level => fnd_api.G_VALID_LEVEL_FULL,
5370: x_return_status => l_return_status,
5371: x_msg_count => l_msg_count,
5372: x_msg_data => l_msg_data,
5373: i_cost_method => p_cost_method,

Line 5387: if(l_return_status <> fnd_api.G_RET_STS_SUCCESS) then

5383: x_xml_doc => l_xml_doc);
5384:
5385: -- Standard call to check the return status from API called
5386:
5387: if(l_return_status <> fnd_api.G_RET_STS_SUCCESS) then
5388: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5389: end if;
5390:
5391:

Line 5388: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

5384:
5385: -- Standard call to check the return status from API called
5386:
5387: if(l_return_status <> fnd_api.G_RET_STS_SUCCESS) then
5388: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5389: end if;
5390:
5391:
5392: l_stmt_num := 20;

Line 5399: p_init_msg_list => FND_API.G_FALSE,

5395: -- Call to Procedure Add Parameters. To Add AP and PO data to XML data
5396: /*========================================================================*/
5397:
5398: Add_DefCOGSData (p_api_version => 1.0,
5399: p_init_msg_list => FND_API.G_FALSE,
5400: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5401: x_return_status => l_return_status,
5402: x_msg_count => l_msg_count,
5403: x_msg_data => l_msg_data,

Line 5400: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

5396: /*========================================================================*/
5397:
5398: Add_DefCOGSData (p_api_version => 1.0,
5399: p_init_msg_list => FND_API.G_FALSE,
5400: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5401: x_return_status => l_return_status,
5402: x_msg_count => l_msg_count,
5403: x_msg_data => l_msg_data,
5404: i_cost_method => p_cost_method,

Line 5418: if(l_return_status <> fnd_api.G_RET_STS_SUCCESS) then

5414: x_xml_doc => l_xml_doc);
5415:
5416: -- Standard call to check the return status from API called
5417:
5418: if(l_return_status <> fnd_api.G_RET_STS_SUCCESS) then
5419: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5420: end if;
5421:
5422: -- write the closing tag to the XML data

Line 5419: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

5415:
5416: -- Standard call to check the return status from API called
5417:
5418: if(l_return_status <> fnd_api.G_RET_STS_SUCCESS) then
5419: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5420: end if;
5421:
5422: -- write the closing tag to the XML data
5423:

Line 5463: when fnd_api.G_EXC_ERROR then

5459: );
5460: END IF;
5461:
5462: exception
5463: when fnd_api.G_EXC_ERROR then
5464: l_return_status := fnd_api.G_RET_STS_ERROR ;
5465: fnd_msg_pub.Count_And_Get
5466: ( p_count => l_msg_count,
5467: p_data => l_msg_data

Line 5464: l_return_status := fnd_api.G_RET_STS_ERROR ;

5460: END IF;
5461:
5462: exception
5463: when fnd_api.G_EXC_ERROR then
5464: l_return_status := fnd_api.G_RET_STS_ERROR ;
5465: fnd_msg_pub.Count_And_Get
5466: ( p_count => l_msg_count,
5467: p_data => l_msg_data
5468: );

Line 5470: when fnd_api.G_EXC_UNEXPECTED_ERROR then

5466: ( p_count => l_msg_count,
5467: p_data => l_msg_data
5468: );
5469:
5470: when fnd_api.G_EXC_UNEXPECTED_ERROR then
5471: fnd_msg_pub.Count_And_Get
5472: ( p_count => l_msg_count,
5473: p_data => l_msg_data
5474: );

Line 5617: if(not fnd_api.Compatible_API_Call ( l_api_version,

5613: END IF;
5614:
5615: -- Standard call to check for call compatibility.
5616:
5617: if(not fnd_api.Compatible_API_Call ( l_api_version,
5618: p_api_version,
5619: l_api_name,
5620: G_PKG_NAME )) then
5621: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

Line 5621: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

5617: if(not fnd_api.Compatible_API_Call ( l_api_version,
5618: p_api_version,
5619: l_api_name,
5620: G_PKG_NAME )) then
5621: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5622: end if;
5623:
5624: -- Initialize message list if p_init_msg_list is set to TRUE.
5625:

Line 5626: if(fnd_api.to_boolean( p_init_msg_list )) then

5622: end if;
5623:
5624: -- Initialize message list if p_init_msg_list is set to TRUE.
5625:
5626: if(fnd_api.to_boolean( p_init_msg_list )) then
5627: fnd_msg_pub.initialize;
5628: end if;
5629:
5630: -- Initialize API return status to success

Line 5632: x_return_status := fnd_api.G_RET_STS_SUCCESS;

5628: end if;
5629:
5630: -- Initialize API return status to success
5631:
5632: x_return_status := fnd_api.G_RET_STS_SUCCESS;
5633:
5634: -- Initialize temporary variable to hold xml data
5635:
5636: dbms_lob.createtemporary(l_xml_temp, TRUE);

Line 5759: when fnd_api.G_EXC_ERROR then

5755: );
5756: END IF;
5757:
5758: exception
5759: when fnd_api.G_EXC_ERROR then
5760: x_return_status := fnd_api.G_RET_STS_ERROR;
5761: fnd_msg_pub.Count_And_Get
5762: ( p_count => x_msg_count,
5763: p_data => x_msg_data

Line 5760: x_return_status := fnd_api.G_RET_STS_ERROR;

5756: END IF;
5757:
5758: exception
5759: when fnd_api.G_EXC_ERROR then
5760: x_return_status := fnd_api.G_RET_STS_ERROR;
5761: fnd_msg_pub.Count_And_Get
5762: ( p_count => x_msg_count,
5763: p_data => x_msg_data
5764: );

Line 5766: when fnd_api.G_EXC_UNEXPECTED_ERROR then

5762: ( p_count => x_msg_count,
5763: p_data => x_msg_data
5764: );
5765:
5766: when fnd_api.G_EXC_UNEXPECTED_ERROR then
5767: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
5768: fnd_msg_pub.Count_And_Get
5769: ( p_count => x_msg_count,
5770: p_data => x_msg_data

Line 5767: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;

5763: p_data => x_msg_data
5764: );
5765:
5766: when fnd_api.G_EXC_UNEXPECTED_ERROR then
5767: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
5768: fnd_msg_pub.Count_And_Get
5769: ( p_count => x_msg_count,
5770: p_data => x_msg_data
5771: );

Line 5774: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;

5770: p_data => x_msg_data
5771: );
5772:
5773: when others then
5774: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
5775: if(fnd_log.LEVEL_UNEXPECTED >= G_LOG_LEVEL) then
5776: fnd_log.string(fnd_log.LEVEL_UNEXPECTED,
5777: l_module || '.' || l_stmt_num,
5778: substrb(SQLERRM , 1 , 240));

Line 5892: if(not fnd_api.Compatible_API_Call( l_api_version,

5888: END IF;
5889:
5890: -- Standard call to check for call compatibility.
5891:
5892: if(not fnd_api.Compatible_API_Call( l_api_version,
5893: p_api_version,
5894: l_api_name,
5895: G_PKG_NAME)) then
5896: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

Line 5896: raise fnd_api.G_EXC_UNEXPECTED_ERROR;

5892: if(not fnd_api.Compatible_API_Call( l_api_version,
5893: p_api_version,
5894: l_api_name,
5895: G_PKG_NAME)) then
5896: raise fnd_api.G_EXC_UNEXPECTED_ERROR;
5897: end if;
5898:
5899: -- Initialize message list if p_init_msg_list is set to TRUE.
5900:

Line 5901: if(fnd_api.to_boolean(p_init_msg_list)) then

5897: end if;
5898:
5899: -- Initialize message list if p_init_msg_list is set to TRUE.
5900:
5901: if(fnd_api.to_boolean(p_init_msg_list)) then
5902: fnd_msg_pub.initialize;
5903: end if;
5904:
5905: -- Initialize API return status to success

Line 5907: x_return_status := fnd_api.G_RET_STS_SUCCESS;

5903: end if;
5904:
5905: -- Initialize API return status to success
5906:
5907: x_return_status := fnd_api.G_RET_STS_SUCCESS;
5908:
5909: -- Initialize temporary variable to hold xml data
5910:
5911: dbms_lob.createtemporary(l_xml_temp, TRUE);

Line 6423: when fnd_api.G_EXC_ERROR then

6419: );
6420: END IF;
6421:
6422: exception
6423: when fnd_api.G_EXC_ERROR then
6424: x_return_status := fnd_api.G_RET_STS_ERROR;
6425: fnd_msg_pub.Count_And_Get
6426: ( p_count => x_msg_count,
6427: p_data => x_msg_data

Line 6424: x_return_status := fnd_api.G_RET_STS_ERROR;

6420: END IF;
6421:
6422: exception
6423: when fnd_api.G_EXC_ERROR then
6424: x_return_status := fnd_api.G_RET_STS_ERROR;
6425: fnd_msg_pub.Count_And_Get
6426: ( p_count => x_msg_count,
6427: p_data => x_msg_data
6428: );

Line 6430: when fnd_api.G_EXC_UNEXPECTED_ERROR then

6426: ( p_count => x_msg_count,
6427: p_data => x_msg_data
6428: );
6429:
6430: when fnd_api.G_EXC_UNEXPECTED_ERROR then
6431: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
6432: fnd_msg_pub.Count_And_Get
6433: ( p_count => x_msg_count,
6434: p_data => x_msg_data

Line 6431: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;

6427: p_data => x_msg_data
6428: );
6429:
6430: when fnd_api.G_EXC_UNEXPECTED_ERROR then
6431: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
6432: fnd_msg_pub.Count_And_Get
6433: ( p_count => x_msg_count,
6434: p_data => x_msg_data
6435: );

Line 6438: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;

6434: p_data => x_msg_data
6435: );
6436:
6437: when others then
6438: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
6439: if(fnd_log.LEVEL_UNEXPECTED >= G_LOG_LEVEL) then
6440: fnd_log.string(fnd_log.LEVEL_UNEXPECTED,
6441: l_module || '.' || l_stmt_num,
6442: substrb(SQLERRM , 1 , 240));

Line 6565: x_return_status := fnd_api.g_ret_sts_success;

6561: BEGIN
6562: g_module_name := 'CST_RevenueCogsMatch_PVT.Ensure_mmt_PER_and_DATE';
6563: debug('ensure_mmt_per_and_date+');
6564: SAVEPOINT ensure_mmt_per_and_date;
6565: x_return_status := fnd_api.g_ret_sts_success;
6566:
6567: OPEN ctrx;
6568: LOOP
6569: l_stmt_num := 1;

Line 6645: x_return_status := fnd_api.g_ret_sts_unexp_error ;

6641: --log a message
6642: ROLLBACK TO ensure_mmt_per_and_date;
6643: IF ctrx%ISOPEN THEN CLOSE ctrx; END IF;
6644: IF next_inv_period%ISOPEN THEN CLOSE next_inv_period; END IF;
6645: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6646: debug('OTHERS EXCEPTION ensure_mmt_per_and_date:'||SQLERRM);
6647: fnd_message.set_name('BOM', 'CST_UNEXP_ERROR');
6648: fnd_message.set_token('PACKAGE', 'CST_REVENUECOGSMATCH_PVT');
6649: fnd_message.set_token('PROCEDURE','ensure_mmt_per_and_date');

Line 6653: p_encoded => fnd_api.g_false,

6649: fnd_message.set_token('PROCEDURE','ensure_mmt_per_and_date');
6650: fnd_message.set_token('STATEMENT',to_char(l_stmt_num));
6651: fnd_msg_pub.ADD;
6652: fnd_msg_pub.count_and_get(
6653: p_encoded => fnd_api.g_false,
6654: p_count => x_msg_count,
6655: p_data => x_msg_data);
6656: END ensure_mmt_per_and_date;
6657: