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 512: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

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

Line 514: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

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

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

Line 526: p_encoded => FND_API.G_FALSE );

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

Line 534: raise fnd_api.g_exc_unexpected_error;

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

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

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

Line 589: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

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

Line 590: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

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

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

Line 605: p_encoded => FND_API.G_FALSE );

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

Line 612: raise fnd_api.g_exc_unexpected_error;

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

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

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

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

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

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

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

Line 718: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

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

Line 719: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

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

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

Line 733: p_encoded => FND_API.G_FALSE );

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

Line 740: raise fnd_api.g_exc_unexpected_error;

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

Line 770: If x_return_Status = FND_API.G_RET_STS_SUCCESS then

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

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

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

Line 800: Raise FND_API.G_EXC_ERROR;

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

Line 931: Raise FND_API.G_EXC_ERROR;

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

Line 1062: Raise FND_API.G_EXC_ERROR;

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

Line 1135: Raise FND_API.G_EXC_ERROR;

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

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

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

Line 1309: WHEN FND_API.G_EXC_ERROR THEN

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

Line 1316: x_return_status := FND_API.G_RET_STS_ERROR ;

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

Line 1319: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

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

Line 1326: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

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

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

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

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

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

Line 1348: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

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