DBA Data[Home] [Help]

APPS.FUN_TRX_PUB dependencies on FND_API

Line 31: IF (x_orig_status = FND_API.G_RET_STS_SUCCESS

27: p_new_status IN VARCHAR2
28: ) IS
29: BEGIN
30: -- API body
31: IF (x_orig_status = FND_API.G_RET_STS_SUCCESS
32: AND p_new_status <> FND_API.G_RET_STS_SUCCESS) THEN
33: x_orig_status := p_new_status;
34: ELSIF (x_orig_status = FND_API.G_RET_STS_ERROR
35: AND p_new_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

Line 32: AND p_new_status <> FND_API.G_RET_STS_SUCCESS) THEN

28: ) IS
29: BEGIN
30: -- API body
31: IF (x_orig_status = FND_API.G_RET_STS_SUCCESS
32: AND p_new_status <> FND_API.G_RET_STS_SUCCESS) THEN
33: x_orig_status := p_new_status;
34: ELSIF (x_orig_status = FND_API.G_RET_STS_ERROR
35: AND p_new_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
36: x_orig_status := p_new_status;

Line 34: ELSIF (x_orig_status = FND_API.G_RET_STS_ERROR

30: -- API body
31: IF (x_orig_status = FND_API.G_RET_STS_SUCCESS
32: AND p_new_status <> FND_API.G_RET_STS_SUCCESS) THEN
33: x_orig_status := p_new_status;
34: ELSIF (x_orig_status = FND_API.G_RET_STS_ERROR
35: AND p_new_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
36: x_orig_status := p_new_status;
37: END IF;
38:

Line 35: AND p_new_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

31: IF (x_orig_status = FND_API.G_RET_STS_SUCCESS
32: AND p_new_status <> FND_API.G_RET_STS_SUCCESS) THEN
33: x_orig_status := p_new_status;
34: ELSIF (x_orig_status = FND_API.G_RET_STS_ERROR
35: AND p_new_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
36: x_orig_status := p_new_status;
37: END IF;
38:
39: Print ( 'Val and Insert >>>> '|| 'Setting the status '|| x_orig_status);

Line 186: IF NOT FND_API.Compatible_API_Call (l_api_version,

182: SAVEPOINT Fun_Trx_Val_And_Insert_PUB;
183:
184: Print('Val and Insert >>>>'||'API Compatibilty Check');
185: -- Standard Call to check for API compatibility
186: IF NOT FND_API.Compatible_API_Call (l_api_version,
187: p_api_version,
188: l_api_name,
189: G_PKG_NAME)
190: THEN

Line 192: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

188: l_api_name,
189: G_PKG_NAME)
190: THEN
191: Print('Val and Insert >>>>'||'Non compatible API call');
192: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
193: END IF;
194: -- Initialize API return status to success
195: x_return_status := FND_API.G_RET_STS_SUCCESS;
196:

Line 195: x_return_status := FND_API.G_RET_STS_SUCCESS;

191: Print('Val and Insert >>>>'||'Non compatible API call');
192: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
193: END IF;
194: -- Initialize API return status to success
195: x_return_status := FND_API.G_RET_STS_SUCCESS;
196:
197: -- Initialize message list if p_init_msg_list is set to TRUE.
198: IF FND_API.to_Boolean(nvl(p_init_msg_list,FND_API.G_FALSE) ) THEN
199: FND_MSG_PUB.initialize;

Line 198: IF FND_API.to_Boolean(nvl(p_init_msg_list,FND_API.G_FALSE) ) THEN

194: -- Initialize API return status to success
195: x_return_status := FND_API.G_RET_STS_SUCCESS;
196:
197: -- Initialize message list if p_init_msg_list is set to TRUE.
198: IF FND_API.to_Boolean(nvl(p_init_msg_list,FND_API.G_FALSE) ) THEN
199: FND_MSG_PUB.initialize;
200: END IF;
201:
202: /*Initialize the Stack of the Validation API's when calling_sequence is Intercompany Imort Programs*/

Line 204: l_init_msg_list := FND_API.G_TRUE;

200: END IF;
201:
202: /*Initialize the Stack of the Validation API's when calling_sequence is Intercompany Imort Programs*/
203: If (p_calling_sequence = 'Intercompany Import Program') then
204: l_init_msg_list := FND_API.G_TRUE;
205: else
206: l_init_msg_list := FND_API.G_FALSE;
207: End If;
208:

Line 206: l_init_msg_list := FND_API.G_FALSE;

202: /*Initialize the Stack of the Validation API's when calling_sequence is Intercompany Imort Programs*/
203: If (p_calling_sequence = 'Intercompany Import Program') then
204: l_init_msg_list := FND_API.G_TRUE;
205: else
206: l_init_msg_list := FND_API.G_FALSE;
207: End If;
208:
209: Print('Val and Insert >>>>'||'Populating Parameters to be sent to Batch Validation API');
210: Print('Val and Insert >>>>'||'Value of message list '||l_init_msg_list);

Line 352: l_return_status :=FND_API.G_RET_STS_ERROR;

348: SELECT batch_id INTO l_unique_batch_id
349: FROM fun_trx_batches
350: WHERE batch_id=l_batch_rec.batch_id;
351: -- IF batch_id exist
352: l_return_status :=FND_API.G_RET_STS_ERROR;
353: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
354: FND_MESSAGE.SET_NAME('FUN', 'FUN_DUPLICATE_BATCH_ID');
355: FND_MESSAGE.SET_TOKEN('BATCH_ID',l_batch_rec.batch_id);
356: l_msg := FND_Message.Get;

Line 360: RAISE fnd_api.g_exc_unexpected_error;

356: l_msg := FND_Message.Get;
357: IF (insert_rejections(p_batch_id => l_batch_rec.batch_id,
358: p_reject_reason => l_msg) <> TRUE) THEN
359: Print('Val and Insert >>>>'||'insert_rejections of invalid batches failure');
360: RAISE fnd_api.g_exc_unexpected_error;
361: END IF;
362: END IF;
363: EXCEPTION
364: WHEN no_data_found THEN

Line 366: l_return_status:=FND_API.G_RET_STS_SUCCESS;

362: END IF;
363: EXCEPTION
364: WHEN no_data_found THEN
365: Print('Val and Insert >>>>'||'Batch Id is unique');
366: l_return_status:=FND_API.G_RET_STS_SUCCESS;
367: END;
368: END IF;
369:
370: IF (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN --batch validation

Line 370: IF (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN --batch validation

366: l_return_status:=FND_API.G_RET_STS_SUCCESS;
367: END;
368: END IF;
369:
370: IF (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN --batch validation
371: FUN_TRX_PVT.Init_Batch_Validate(
372: p_api_version => 1.0,
373: p_init_msg_list => l_init_msg_list,
374: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),

Line 374: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),

370: IF (l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN --batch validation
371: FUN_TRX_PVT.Init_Batch_Validate(
372: p_api_version => 1.0,
373: p_init_msg_list => l_init_msg_list,
374: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),
375: x_return_status => l_return_status,
376: x_msg_count => l_msg_count,
377: x_msg_data => l_msg,
378: p_insert => nvl(p_insert,FND_API.G_TRUE),

Line 378: p_insert => nvl(p_insert,FND_API.G_TRUE),

374: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),
375: x_return_status => l_return_status,
376: x_msg_count => l_msg_count,
377: x_msg_data => l_msg,
378: p_insert => nvl(p_insert,FND_API.G_TRUE),
379: p_batch_rec => l_batch_rec,
380: p_trx_tbl => l_trx_tbl,
381: p_init_dist_tbl => l_init_dist_tbl,
382: p_dist_lines_tbl => l_dist_lines_tbl

Line 387: If (l_return_status = FND_API.G_RET_STS_ERROR) then

383: );
384: Print('Val and Insert >>>>'||'Batch Validation Complete'|| l_return_status|| 'message'||l_msg);
385:
386: /* Insert into Rejections Table with all the reason of error */
387: If (l_return_status = FND_API.G_RET_STS_ERROR) then
388: If (p_calling_sequence = 'Intercompany Import Program') then
389: IF l_msg_count >= 1 THEN
390: FOR i IN 1..l_msg_count
391: LOOP

Line 393: p_encoded => FND_API.G_FALSE);

389: IF l_msg_count >= 1 THEN
390: FOR i IN 1..l_msg_count
391: LOOP
392: l_msg := FND_MSG_PUB.Get( p_msg_index => l_msg_count,
393: p_encoded => FND_API.G_FALSE);
394: If (insert_rejections(
395: p_batch_id => l_batch_rec.batch_id,
396: p_reject_reason => l_msg
397: ) <> TRUE)

Line 400: raise fnd_api.g_exc_unexpected_error;

396: p_reject_reason => l_msg
397: ) <> TRUE)
398: then
399: Print('Val and Insert >>>>'||'insert_rejections of invalid batches failure');
400: raise fnd_api.g_exc_unexpected_error;
401: End if; -- Insert Rejections
402: END LOOP; --msg count
403: END IF; -- l_msg_count > 1
404: End if; -- calling sequence

Line 417: IF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

413:
414:
415: /* If l_return_status is Unexpected - Raise Unexpected Error*/
416:
417: IF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
418: Print ('Val and Insert >>>> '|| 'Unexpected error after batch val');
419: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
420: END IF;
421:

Line 419: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

415: /* If l_return_status is Unexpected - Raise Unexpected Error*/
416:
417: IF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
418: Print ('Val and Insert >>>> '|| 'Unexpected error after batch val');
419: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
420: END IF;
421:
422: -- Flush the l_trx_tbl, l_init_dist_tbl, l_dist_lines_tbl tables
423:

Line 492: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),

488: Print('Val and Insert >>>>'||'Validating the Trx Header');
489: FUN_TRX_PVT.Init_Trx_Validate(
490: p_api_version => 1.0,
491: p_init_msg_list => l_init_msg_list,
492: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),
493: x_return_status => l_return_status,
494: x_msg_count => l_msg_count,
495: x_msg_data => l_msg_data,
496: p_trx_rec => l_trx_rec_type,

Line 513: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

509: Print('Val and Insert >>>>'||'Return Staus from Txn validate '||l_return_status);
510:
511: /* If l_return_status is Unexpected - Raise Unexpected Error*/
512:
513: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
514:
515: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
516: END IF;
517:

Line 515: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

511: /* If l_return_status is Unexpected - Raise Unexpected Error*/
512:
513: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
514:
515: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
516: END IF;
517:
518: If (l_return_status = FND_API.G_RET_STS_ERROR) then
519: If (p_calling_sequence = 'Intercompany Import Program') then

Line 518: If (l_return_status = FND_API.G_RET_STS_ERROR) then

514:
515: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
516: END IF;
517:
518: If (l_return_status = FND_API.G_RET_STS_ERROR) then
519: If (p_calling_sequence = 'Intercompany Import Program') then
520: Print('Val and Insert >>>>'||'Inserting Trx Header Reject Reasons');
521: UPDATE fun_interface_headers set import_status_code = 'R' Where trx_id = p_trx_tbl(l_head_count).trx_id;
522: -- Insert into Rejections Table

Line 527: p_encoded => FND_API.G_FALSE );

523: IF l_msg_count >= 1 THEN
524: FOR i IN 1..l_msg_count
525: LOOP
526: l_msg := FND_MSG_PUB.Get( p_msg_index => l_msg_count,
527: p_encoded => FND_API.G_FALSE );
528: If (insert_rejections(
529: p_batch_id => p_trx_tbl(l_head_count).batch_id,
530: p_trx_id => p_trx_tbl(l_head_count).trx_id,
531: p_reject_reason => l_msg

Line 535: raise fnd_api.g_exc_unexpected_error;

531: p_reject_reason => l_msg
532: )<> TRUE)
533: then
534: Print('Val and Insert >>>>'||'insert_rejections of invalid transactions failure');
535: raise fnd_api.g_exc_unexpected_error;
536: End if; -- Insert Rejections
537: END LOOP; --msg count
538: END IF; -- l_msg_count > 1
539: End if; -- Calling Sequence

Line 573: p_validation_level => nvl( p_validation_level,FND_API.G_VALID_LEVEL_FULL),

569: Print('Val and Insert >>>>'||'Validating the Batch Distributions');
570: FUN_TRX_PVT.Init_Dist_Validate(
571: p_api_version => 1.0,
572: p_init_msg_list => l_init_msg_list,
573: p_validation_level => nvl( p_validation_level,FND_API.G_VALID_LEVEL_FULL),
574: x_return_status => l_return_status,
575: p_le_id => p_batch_rec.from_le_id,
576: p_ledger_id => p_batch_rec.from_ledger_id,
577:

Line 590: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

586: p_new_status => l_return_status);
587: Print('Val and Insert >>>> '||' Status after Init_dist_validate 2'|| l_return_status);
588:
589: /* If l_return_status is Unexpected - Raise Unexpected Error*/
590: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
591: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
592: END IF;
593:
594: Print('Val and Insert >>>> '||' Status after Init_dist_validate 3'|| l_return_status);

Line 591: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

587: Print('Val and Insert >>>> '||' Status after Init_dist_validate 2'|| l_return_status);
588:
589: /* If l_return_status is Unexpected - Raise Unexpected Error*/
590: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
591: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
592: END IF;
593:
594: Print('Val and Insert >>>> '||' Status after Init_dist_validate 3'|| l_return_status);
595: If (l_return_status = FND_API.G_RET_STS_ERROR) then

Line 595: If (l_return_status = FND_API.G_RET_STS_ERROR) then

591: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
592: END IF;
593:
594: Print('Val and Insert >>>> '||' Status after Init_dist_validate 3'|| l_return_status);
595: If (l_return_status = FND_API.G_RET_STS_ERROR) then
596:
597: If (P_calling_sequence = 'Intercompany Import Program') then
598: Print('Inserting Batch Distributions Reject Reasons');
599: UPDATE fun_interface_batchdists set import_status_code = 'R'

Line 606: p_encoded => FND_API.G_FALSE );

602: IF l_msg_count >= 1 THEN
603: FOR i IN 1..l_msg_count
604: LOOP
605: l_msg := FND_MSG_PUB.Get( p_msg_index => l_msg_count,
606: p_encoded => FND_API.G_FALSE );
607: If (insert_rejections(
608: p_batch_id => p_init_dist_tbl(l_line_count).batch_id,
609: p_batch_dist_id => p_init_dist_tbl(l_line_count).batch_dist_id,
610: p_reject_reason => l_msg

Line 613: raise fnd_api.g_exc_unexpected_error;

609: p_batch_dist_id => p_init_dist_tbl(l_line_count).batch_dist_id,
610: p_reject_reason => l_msg
611: )<> TRUE) Then
612: Print('insert_rejections of invalid batch dist records failure');
613: raise fnd_api.g_exc_unexpected_error;
614: End if;
615: END LOOP;
616: END IF; -- l_msg_count > 1
617: End If;

Line 672: Print('Val And Insert Debug >>> ' || nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL));

668: -- Pass Recipient Legal entity Id
669:
670: /* Added for Debugging of Bug # 6670702 */
671: Print('Val And Insert Debug >>> ' || l_init_msg_list );
672: Print('Val And Insert Debug >>> ' || nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL));
673: Print('Val And Insert Debug >>> ' || l_to_le_id);
674: Print('Val And Insert Debug >>> ' || l_to_ledger_id);
675: Print('Val And Insert Debug >>> ' || p_batch_rec.from_ledger_id);
676: Print('Val And Insert Debug >>> ' || l_return_status);

Line 684: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),

680:
681: Fun_Trx_Pvt.Init_IC_Dist_Validate (
682: p_api_version => 1.0,
683: p_init_msg_list => l_init_msg_list,
684: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),
685: p_le_id => l_to_le_id,
686: p_ledger_id => l_to_ledger_id,
687: x_return_status => l_return_status,
688: x_msg_count => l_msg_count,

Line 701: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),

697: Print('Val and Insert >>>>'||'Validating the Dist Lines');
698: FUN_TRX_PVT.Init_IC_Dist_Validate(
699: p_api_version => 1.0,
700: p_init_msg_list => l_init_msg_list,
701: p_validation_level => nvl(p_validation_level,FND_API.G_VALID_LEVEL_FULL),
702: p_le_id => p_batch_rec.from_le_id,
703: p_ledger_id => p_batch_rec.from_ledger_id,
704: x_return_status => l_return_status,
705: x_msg_count => l_msg_count,

Line 719: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

715: p_new_status => l_return_status);
716:
717:
718: /* If l_return_status is Unexpected - Raise Unexpected Error*/
719: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
720: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
721: END IF;
722:
723: If (l_return_status = FND_API.G_RET_STS_ERROR) then

Line 720: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

716:
717:
718: /* If l_return_status is Unexpected - Raise Unexpected Error*/
719: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
720: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
721: END IF;
722:
723: If (l_return_status = FND_API.G_RET_STS_ERROR) then
724:

Line 723: If (l_return_status = FND_API.G_RET_STS_ERROR) then

719: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
720: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
721: END IF;
722:
723: If (l_return_status = FND_API.G_RET_STS_ERROR) then
724:
725: If (P_calling_sequence = 'Intercompany Import Program') then
726: Print('Val and Insert >>>>'||'Inserting Dist Lines Reject Reasons');
727: UPDATE fun_interface_dist_lines set import_status_code = 'R'

Line 734: p_encoded => FND_API.G_FALSE );

730: IF l_msg_count >= 1 THEN
731: FOR i IN 1..l_msg_count
732: LOOP
733: l_msg := FND_MSG_PUB.Get( p_msg_index => l_msg_count,
734: p_encoded => FND_API.G_FALSE );
735: If (insert_rejections(
736: p_batch_id =>l_batch_rec.batch_id,
737: p_dist_id => p_dist_lines_tbl(l_line_count).dist_id,
738: p_reject_reason => l_msg

Line 741: raise fnd_api.g_exc_unexpected_error;

737: p_dist_id => p_dist_lines_tbl(l_line_count).dist_id,
738: p_reject_reason => l_msg
739: )<> TRUE) Then
740: Print('Val and Insert >>>>'||'insert_rejections of invalid dist lines failure');
741: raise fnd_api.g_exc_unexpected_error;
742: End if;
743:
744: END LOOP;
745: END IF; -- l_msg_count > 1

Line 771: If x_return_Status = FND_API.G_RET_STS_SUCCESS then

767: Select fun_trx_batches_s.nextval INTO l_batch_id from dual;
768: END IF;
769:
770: /* If all Validations pass then the record should be inserted into Fun Tables with status as New */
771: If x_return_Status = FND_API.G_RET_STS_SUCCESS then
772:
773: If (nvl(p_insert, FND_API.G_TRUE) = FND_API.G_TRUE) THEN
774: Print ('Populating User Id');
775: l_user := fnd_global.user_id;

Line 773: If (nvl(p_insert, FND_API.G_TRUE) = FND_API.G_TRUE) THEN

769:
770: /* If all Validations pass then the record should be inserted into Fun Tables with status as New */
771: If x_return_Status = FND_API.G_RET_STS_SUCCESS then
772:
773: If (nvl(p_insert, FND_API.G_TRUE) = FND_API.G_TRUE) THEN
774: Print ('Populating User Id');
775: l_user := fnd_global.user_id;
776: l_login := fnd_global.login_id;
777: Print('Val and Insert >>>>'||'Inserting into fun_trx_batches Table');

Line 801: Raise FND_API.G_EXC_ERROR;

797: );
798:
799: If (l_error_code <> 'SUCCESS') then
800: Print('Batch Number Generation errored out');
801: Raise FND_API.G_EXC_ERROR;
802: else
803: l_batch_rec.batch_number := l_sequence_number;
804: End If;
805: End If;

Line 932: Raise FND_API.G_EXC_ERROR;

928: );
929:
930: If (l_error_code <> 'SUCCESS') then
931: Print('Trx Number Generation errored out');
932: Raise FND_API.G_EXC_ERROR;
933: else
934: p_trx_tbl(l_head_count).trx_number := l_sequence_number;
935: End If;
936: End If;

Line 1063: Raise FND_API.G_EXC_ERROR;

1059: );
1060:
1061: If (l_error_code <> 'SUCCESS') then
1062: Print('Val and Insert >>>>>' ||'Generating trx line number errored out ');
1063: Raise FND_API.G_EXC_ERROR;
1064:
1065: End If;
1066: End If;
1067: To be uncommented - when doc seq is ready

Line 1136: Raise FND_API.G_EXC_ERROR;

1132: );
1133:
1134: If (l_error_code <> 'SUCCESS') then
1135: Print('Val and Insert >>>>>' ||'Generating trx dist line number errored out ');
1136: Raise FND_API.G_EXC_ERROR;
1137: else
1138: p_dist_lines_tbl(l_line_count).dist_number := l_sequence_number;
1139: End If;
1140: End If;

Line 1299: IF FND_API.To_Boolean( nvl(p_commit,FND_API.G_FALSE) ) THEN

1295:
1296: End if; -- p_insert true
1297: End If; -- Overall Status
1298:
1299: IF FND_API.To_Boolean( nvl(p_commit,FND_API.G_FALSE) ) THEN
1300: COMMIT WORK;
1301: END IF;
1302:
1303: -- Standard call to get message count and if count is 1, get message info.

Line 1310: WHEN FND_API.G_EXC_ERROR THEN

1306: Print('Val and Insert >>>>'||'End of the API');
1307:
1308: EXCEPTION
1309:
1310: WHEN FND_API.G_EXC_ERROR THEN
1311: Print('g_exc_error');
1312: p_batch_rec := l_old_batch_rec;
1313: p_trx_tbl := l_old_trx_tbl;
1314: p_init_dist_tbl := l_old_init_dist_tbl;

Line 1317: x_return_status := FND_API.G_RET_STS_ERROR ;

1313: p_trx_tbl := l_old_trx_tbl;
1314: p_init_dist_tbl := l_old_init_dist_tbl;
1315: p_dist_lines_tbl := l_old_dist_lines_tbl;
1316: ROLLBACK TO Fun_Trx_Val_And_Insert_PUB;
1317: x_return_status := FND_API.G_RET_STS_ERROR ;
1318: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1319: p_data => x_msg_data);
1320: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1321: Print('Val and Insert >>>>'||'Unexpected error occurred -'||SQLERRM);

Line 1320: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1316: ROLLBACK TO Fun_Trx_Val_And_Insert_PUB;
1317: x_return_status := FND_API.G_RET_STS_ERROR ;
1318: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
1319: p_data => x_msg_data);
1320: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1321: Print('Val and Insert >>>>'||'Unexpected error occurred -'||SQLERRM);
1322: p_batch_rec := l_old_batch_rec;
1323: p_trx_tbl := l_old_trx_tbl;
1324: p_init_dist_tbl := l_old_init_dist_tbl;

Line 1327: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1323: p_trx_tbl := l_old_trx_tbl;
1324: p_init_dist_tbl := l_old_init_dist_tbl;
1325: p_dist_lines_tbl := l_old_dist_lines_tbl;
1326:
1327: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1328: Print('****************************************');
1329: Print('Val and Insert >>>>'||'Details of Error');
1330: Print('****************************************');
1331: IF x_msg_count > 1 THEN

Line 1334: Print(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ));

1330: Print('****************************************');
1331: IF x_msg_count > 1 THEN
1332: FOR i IN 1..x_msg_count
1333: LOOP
1334: Print(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ));
1335: END LOOP;
1336: ELSE
1337: Print(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ));
1338: END IF;

Line 1337: Print(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ));

1333: LOOP
1334: Print(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ));
1335: END LOOP;
1336: ELSE
1337: Print(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ));
1338: END IF;
1339: ROLLBACK TO Fun_Trx_Val_And_Insert_PUB;
1340:
1341: WHEN OTHERS THEN

Line 1349: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1345: p_init_dist_tbl := l_old_init_dist_tbl;
1346: p_dist_lines_tbl := l_old_dist_lines_tbl;
1347: ROLLBACK TO Fun_Trx_Val_And_Insert_PUB;
1348: Print('Val and Insert >>>>'||'Exception others- '||SQLERRM);
1349: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1350: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1351: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
1352: END IF;
1353: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,