540: END IF;
541:
542: -- End : Collect the information related to Last Reported Period in 11i. Bug 9381398
543:
544: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
545: FND_API.G_RET_STS_ERROR) then
546: l_selection_status_flag := fnd_api.g_ret_sts_error;
547: errbuf := l_return_message;
548: retcode := 2;
541:
542: -- End : Collect the information related to Last Reported Period in 11i. Bug 9381398
543:
544: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
545: FND_API.G_RET_STS_ERROR) then
546: l_selection_status_flag := fnd_api.g_ret_sts_error;
547: errbuf := l_return_message;
548: retcode := 2;
549: RETURN;
542: -- End : Collect the information related to Last Reported Period in 11i. Bug 9381398
543:
544: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
545: FND_API.G_RET_STS_ERROR) then
546: l_selection_status_flag := fnd_api.g_ret_sts_error;
547: errbuf := l_return_message;
548: retcode := 2;
549: RETURN;
550: end if;
626: G_PKG_NAME||': ' ||
627: 'JG_ZZ_VAT_REP_UTILITY.validate_process_initiation'||'()-');
628: END IF;
629:
630: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
631: FND_API.G_RET_STS_ERROR) then
632: l_selection_status_flag := fnd_api.g_ret_sts_error;
633: errbuf := l_return_message;
634: retcode := 2;
627: 'JG_ZZ_VAT_REP_UTILITY.validate_process_initiation'||'()-');
628: END IF;
629:
630: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
631: FND_API.G_RET_STS_ERROR) then
632: l_selection_status_flag := fnd_api.g_ret_sts_error;
633: errbuf := l_return_message;
634: retcode := 2;
635: RETURN;
628: END IF;
629:
630: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
631: FND_API.G_RET_STS_ERROR) then
632: l_selection_status_flag := fnd_api.g_ret_sts_error;
633: errbuf := l_return_message;
634: retcode := 2;
635: RETURN;
636: end if;
640: p_vat_reporting_entity_id => l_mapping_rep_entity_id,
641: p_global_variables_rec => l_global_variables_rec,
642: x_return_status => l_return_status);
643:
644: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
645: l_selection_status_flag := fnd_api.g_ret_sts_error;
646: errbuf := 'Unexpected error in get_VAT_reporting_details';
647: retcode := 2;
648: RETURN;
641: p_global_variables_rec => l_global_variables_rec,
642: x_return_status => l_return_status);
643:
644: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
645: l_selection_status_flag := fnd_api.g_ret_sts_error;
646: errbuf := 'Unexpected error in get_VAT_reporting_details';
647: retcode := 2;
648: RETURN;
649: ELSE
654: p_global_variables_rec => l_global_variables_rec,
655: x_return_status => l_return_status);
656: END IF;
657:
658: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
659: l_selection_status_flag := fnd_api.g_ret_sts_error;
660: errbuf := 'Unexpected error in get_period_date_range';
661: retcode := 2;
662: RETURN;
655: x_return_status => l_return_status);
656: END IF;
657:
658: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
659: l_selection_status_flag := fnd_api.g_ret_sts_error;
660: errbuf := 'Unexpected error in get_period_date_range';
661: retcode := 2;
662: RETURN;
663: ELSE
730: x_return_status => l_return_status,
731: x_errbuf => l_return_message
732: );
733:
734: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
735: FND_API.G_RET_STS_ERROR) then
736: l_selection_status_flag := fnd_api.g_ret_sts_error;
737: errbuf := l_return_message;
738: retcode := 2;
731: x_errbuf => l_return_message
732: );
733:
734: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
735: FND_API.G_RET_STS_ERROR) then
736: l_selection_status_flag := fnd_api.g_ret_sts_error;
737: errbuf := l_return_message;
738: retcode := 2;
739: RETURN;
732: );
733:
734: if l_return_status in ( FND_API.G_RET_STS_UNEXP_ERROR,
735: FND_API.G_RET_STS_ERROR) then
736: l_selection_status_flag := fnd_api.g_ret_sts_error;
737: errbuf := l_return_message;
738: retcode := 2;
739: RETURN;
740: end if;
759: -- And bulk insert into JG_ZZ_VAT_TRX_DETAILS.
760: fetch_tax_data(l_global_variables_rec,
761: g_conc_request_id);
762: ELSE
763: l_selection_status_flag := fnd_api.g_ret_sts_error;
764: errbuf := l_intersect_domain_err;
765: retcode := 2;
766: RETURN;
767: END IF;
787: END IF;
788:
789: l_selection_process_id := g_selection_process_id;
790: if l_selection_status_flag is null then
791: l_selection_status_flag := fnd_api.g_ret_sts_success;
792: end if;
793:
794:
795: JG_ZZ_VAT_REP_UTILITY.post_process_update(
809: 'JG_ZZ_VAT_REP_UTILITY.post_process_update'||'.END',
810: G_PKG_NAME||': ' ||'JG_ZZ_VAT_REP_UTILITY.post_process_update'||'()-');
811: END IF;
812:
813: IF l_return_status <> fnd_api.g_ret_sts_success THEN
814: errbuf := l_return_message;
815: retcode := 2;
816: RETURN;
817: END IF;
889: FND_FILE.PUT_LINE(FND_FILE.LOG, G_PKG_NAME||': '||l_api_name||'()+');
890: END IF;
891:
892: /*Set the return status to Success */
893: x_return_status := FND_API.G_RET_STS_SUCCESS;
894:
895: delete from JG_ZZ_VAT_TRX_DETAILS
896: where reporting_Status_id = p_reporting_status_id;
897:
910: END IF;
911:
912: EXCEPTION
913: WHEN OTHERS THEN
914: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
915: g_error_buffer := sqlcode || ': ' || SUBSTR(SQLERRM, 1, 80);
916:
917: IF g_debug_flag = 'Y' THEN
918: FND_FILE.PUT_LINE(FND_FILE.LOG, g_error_buffer);
1117: G_PKG_NAME||': '||l_api_name||'()+');
1118: END IF;
1119:
1120: /*Set the return status to Success */
1121: x_return_status := FND_API.G_RET_STS_SUCCESS;
1122:
1123: IF g_debug_flag = 'Y' THEN
1124: FND_FILE.PUT_LINE(FND_FILE.LOG, G_PKG_NAME||': '||l_api_name||'()+');
1125: END IF;
1154: END IF;
1155:
1156: EXCEPTION
1157: WHEN OTHERS THEN
1158: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1159:
1160: g_error_buffer := sqlcode || ': ' || SUBSTR(SQLERRM, 1, 80);
1161:
1162: IF g_debug_flag = 'Y' THEN
1207: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN',G_PKG_NAME||': '||l_api_name||'()+');
1208: END IF;
1209:
1210: /*Set the return status to Success */
1211: x_return_status := FND_API.G_RET_STS_SUCCESS;
1212:
1213: IF g_debug_flag = 'Y' THEN
1214: FND_FILE.PUT_LINE(FND_FILE.LOG, G_PKG_NAME||': '||l_api_name||'()+');
1215: END IF;
1254: END IF;
1255:
1256: EXCEPTION
1257: WHEN OTHERS THEN
1258: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1259:
1260: g_error_buffer := sqlcode || ': ' || SUBSTR(SQLERRM, 1, 80);
1261:
1262: IF g_debug_flag = 'Y' THEN
2771: END IF;
2772:
2773: EXCEPTION
2774: WHEN OTHERS THEN
2775: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2776: g_error_buffer := sqlcode || ': ' || SUBSTR(SQLERRM, 1, 80);
2777:
2778: IF g_debug_flag = 'Y' THEN
2779: FND_FILE.PUT_LINE(FND_FILE.LOG, g_error_buffer);
3137: END IF;
3138:
3139: EXCEPTION
3140: WHEN OTHERS THEN
3141: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3142: g_error_buffer := sqlcode || ': ' || SUBSTR(SQLERRM, 1, 80);
3143:
3144: IF g_debug_flag = 'Y' THEN
3145: FND_FILE.PUT_LINE(FND_FILE.LOG, g_error_buffer);
3329: xv_return_message => l_return_message
3330: );
3331: END IF;
3332:
3333: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3334: x_intersect_domain_err := l_return_message;
3335: p_global_variables_rec.retcode := 2;
3336: RETURN;
3337: END IF;
3351: END IF;
3352:
3353: EXCEPTION
3354: WHEN OTHERS THEN
3355: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3356: g_error_buffer := sqlcode || ': ' || SUBSTR(SQLERRM, 1, 80);
3357:
3358: IF g_debug_flag = 'Y' THEN
3359: FND_FILE.PUT_LINE(FND_FILE.LOG, g_error_buffer);
3544: FND_MESSAGE.SET_NAME('JG','JG_ZZ_VAT_TRX_OVERLAPPING');
3545: FND_MESSAGE.SET_TOKEN('LOG_FILE', lv_filename );
3546: FND_MESSAGE.SET_TOKEN('LOG_LOCATION', lv_utl_location );
3547: xv_return_message := FND_MESSAGE.GET;
3548: -- xv_return_status := fnd_api.g_ret_sts_error;
3549:
3550: IF g_debug_flag = 'Y' THEN
3551: FND_FILE.PUT_LINE(FND_FILE.LOG,xv_return_message);
3552: END IF;
3567: /* Call the eBtax API to update transactions in eBtax as finally reported */
3568: zx_extract_pkg.zx_upd_legal_reporting_status
3569: (
3570: p_api_version => jg_zz_vat_rep_final_reporting.gn_api_version ,
3571: p_init_msg_list => fnd_api.g_false ,
3572: p_commit => fnd_api.g_false ,
3573: p_validation_level => null ,
3574: p_application_id_tbl => ltn_application_id ,
3575: p_entity_code_tbl => ltv_entity_code ,
3568: zx_extract_pkg.zx_upd_legal_reporting_status
3569: (
3570: p_api_version => jg_zz_vat_rep_final_reporting.gn_api_version ,
3571: p_init_msg_list => fnd_api.g_false ,
3572: p_commit => fnd_api.g_false ,
3573: p_validation_level => null ,
3574: p_application_id_tbl => ltn_application_id ,
3575: p_entity_code_tbl => ltv_entity_code ,
3576: p_event_class_code_tbl => ltv_event_class_code ,
3583: x_msg_count => l_msg_count ,
3584: x_msg_data => l_return_message
3585: );
3586:
3587: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3588: xv_return_status := l_return_status;
3589: xv_return_message := l_return_message;
3590: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Unexpected error occurred in the
3591: procedure zx_extract_pkg.zx_upd_legal_reporting_status :'||l_return_message);
3622: where vat_transaction_id = IdList(i) ;
3623:
3624: END IF ; --IF l_trx_count > 0 THEN
3625:
3626: xv_return_status := fnd_api.g_ret_sts_success;
3627: xv_return_message := 'None of the transactions are finally reported';
3628: IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
3629: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name, xv_return_message);
3630: END IF;
3640:
3641:
3642: EXCEPTION
3643: WHEN OTHERS THEN
3644: xv_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3645: xv_return_message := 'Unexpected error occurred in the
3646: procedure PURGE_REPORT_FINALREP:' || SQLCODE || ' ' ||
3647: SUBSTR(SQLERRM,1,80) ;
3648: IF ( G_LEVEL_EXCEPTION >= G_CURRENT_RUNTIME_LEVEL) THEN
3871: IF g_debug_flag = 'Y' THEN
3872: FND_FILE.PUT_LINE(FND_FILE.LOG, G_PKG_NAME||': '||l_api_name||'()+');
3873: END IF;
3874:
3875: x_return_status := FND_API.G_RET_STS_SUCCESS;
3876: x_errbuf := NULL;
3877:
3878: IF p_legal_entity_id IS NOT NULL THEN
3879: SELECT ledger_id
3959: 'Unable to update the Tax_Invoice_Date in
3960: PAYABLES_MAINTENANCE PROGRAM' || ' error_msg = '
3961: || sqlcode || ':' || SUBSTR(SQLERRM, 1, 80));
3962: END IF;
3963: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3964: x_errbuf := sqlcode || ':' || SUBSTR(SQLERRM, 1, 80);
3965: return;
3966:
3967: END; -- Payables_Maintenance_Prog
4014: FND_LOG.STRING(G_LEVEL_EXCEPTION,G_MODULE_NAME||l_api_name,
4015: 'Error in updating Tax_Invoice_Date ' || ' error_msg = '
4016: || sqlcode || ':' || SUBSTR(SQLERRM, 1, 80));
4017: END IF;
4018: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4019: x_errbuf := sqlcode || ':' || SUBSTR(SQLERRM, 1, 80);
4020: END;
4021: END LOOP;
4022: END IF;
4033: 'Unable to update the Tax_Invoice_Date in
4034: RECEIVABLES_MAINTENANCE PROGRAM' || ' error_msg = '
4035: || sqlcode || ':' || SUBSTR(SQLERRM, 1, 80));
4036: END IF;
4037: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4038: x_errbuf := sqlcode || ':' || SUBSTR(SQLERRM, 1, 80);
4039: END; -- Receivables_maintenance_prog
4040:
4041: END IF;
4055: FND_LOG.STRING(G_LEVEL_EXCEPTION,G_MODULE_NAME||l_api_name,
4056: 'Unable to update the Tax_Invoice_Date in TAX DATE MAINTENANCE PROGRAM'
4057: || ' error_msg = ' || sqlcode || ':' || SUBSTR(SQLERRM, 1, 80) );
4058: END IF;
4059: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4060: x_errbuf := sqlcode || ':' || SUBSTR(SQLERRM, 1, 80);
4061: END tax_date_maintenance_program;
4062:
4063: