38: end if;
39:
40: exception
41: when others then
42: xv_return_status := fnd_api.g_ret_sts_unexp_error;
43: xv_return_message := 'jg_zz_vat_alloc_prc_pkg.purge_allocation_data ~ Unexpected Error -' || sqlerrm;
44: end purge_allocation_data;
45:
46: PROCEDURE insert_allocation_error (
89: );
90:
91: exception
92: when others then
93: xv_return_status := fnd_api.g_ret_sts_unexp_error;
94: xv_return_message := 'jg_zz_vat_alloc_prc_pkg.insert_allocation_error ~ Unexpected Error -' || sqlerrm;
95: END insert_allocation_error;
96:
97: PROCEDURE update_allocation_error (
114: AND period_type = pv_period_type;
115:
116: exception
117: when others then
118: xv_return_status := fnd_api.g_ret_sts_unexp_error;
119: xv_return_message := 'jg_zz_vat_alloc_prc_pkg.update_allocation_error ~ Unexpected Error -' || sqlerrm;
120: end update_allocation_error;
121:
122: PROCEDURE delete_allocation_error (
134: AND period_type = pv_period_type;
135:
136: exception
137: when others then
138: xv_return_status := fnd_api.g_ret_sts_unexp_error;
139: xv_return_message := 'jg_zz_vat_alloc_prc_pkg.delete_allocation_error ~ Unexpected Error -' || sqlerrm;
140: end delete_allocation_error;
141:
142: /* Main procedure that performs the allocation */
427: );
428:
429:
430: /* raise error if validation failed */
431: if lv_return_flag in (fnd_api.g_ret_sts_error, fnd_api.g_ret_sts_unexp_error) then
432: if gv_debug_flag then
433: fnd_file.put_line(fnd_file.log, 'run allocation - Error JG_ZZ_VAT_REP_UTILITY.validate_process_initiation. value-'||lv_return_flag);
434: end if;
435:
764: end if;
765: end if;
766:
767: /* raise error if validation failed */
768: if lv_return_flag in (fnd_api.g_ret_sts_unexp_error) then
769: xv_errbuf := lv_return_message;
770: xv_retcode := 2;
771: return;
772: end if;
784: xv_return_message => lv_return_message
785: );
786:
787: /* raise error if validation failed */
788: if lv_return_flag in (fnd_api.g_ret_sts_unexp_error) then
789: xv_errbuf := lv_return_message;
790: xv_retcode := 2;
791: return;
792: end if;
837: fnd_file.put_line(fnd_file.log, 'run allocation - AFTER PROCEDURE insert_allocation_error');
838: end if;
839:
840: /* raise error if above call failed */
841: if lv_return_flag in (fnd_api.g_ret_sts_unexp_error) then
842: xv_errbuf := lv_return_message;
843: xv_retcode := 2;
844: return;
845: end if;
864: xv_return_status => lv_return_flag,
865: xv_return_message => lv_return_message
866: );
867: /* raise error if validation failed */
868: if lv_return_flag in (fnd_api.g_ret_sts_unexp_error) then
869: xv_errbuf := lv_return_message;
870: xv_retcode := 2;
871: return;
872: end if;
881:
882: /* check if the call to allocate_box has assigned a tax and taxable box. If not error should be noted */
883: if (lv_tax_box IS NULL and lv_taxable_box IS NULL) then
884: lv_allocation_errored_flag := g_yes;
885: lv_allocation_status_flag := fnd_api.g_ret_sts_error;
886: end if;
887:
888: if gv_debug_flag then
889: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 3. BefDML.'
940:
941: lv_check_alloc_trans := lv_check_alloc_trans + 1;
942:
943: /* raise error if error is returned from the call */
944: if lv_return_flag in (fnd_api.g_ret_sts_unexp_error) then
945: xv_errbuf := lv_return_message;
946: xv_retcode := 2;
947: return;
948: end if;
961:
962: /* derive the sequence value for the allocation process that will be punched in the status table
963: Preparation for call to post process update */
964: if lv_allocation_status_flag is null then
965: lv_allocation_status_flag := fnd_api.g_ret_sts_success;
966: end if;
967:
968: if ln_allocation_process_id is null then
969: select jg_zz_vat_rep_status_s2.nextval into ln_allocation_process_id from dual;
993: ||' lv_return_flag:'||lv_return_flag
994: );
995: end if;
996: /* raise error if validation failed */
997: if lv_return_flag in (fnd_api.g_ret_sts_error, fnd_api.g_ret_sts_unexp_error) then
998: xv_errbuf := lv_return_message;
999: xv_retcode := 2;
1000: return;
1001: end if;
1497: when others then
1498: if gv_debug_flag then
1499: fnd_file.put_line(fnd_file.log, 'allocate_box - ERROR lv_statement:'||lv_statement );
1500: end if;
1501: xv_return_status := fnd_api.g_ret_sts_unexp_error;
1502: xv_return_message := 'jg_zz_vat_alloc_prc_pkg.allocate_box ~ Unexpected Error -' || sqlerrm;
1503:
1504: end allocate_box;
1505: