DBA Data[Home] [Help]

APPS.JG_ZZ_VAT_ALLOC_PRC_PKG dependencies on FND_FILE

Line 59: fnd_file.put_line(fnd_file.log, 'insert_allocation_error - start');

55: ) IS
56:
57: BEGIN
58: if gv_debug_flag then
59: fnd_file.put_line(fnd_file.log, 'insert_allocation_error - start');
60: end if;
61: /*
62: if gv_debug_flag then
63: fnd_file.put_line(fnd_file.log, 'pn_vat_transaction_id:'||pn_vat_transaction_id

Line 63: fnd_file.put_line(fnd_file.log, 'pn_vat_transaction_id:'||pn_vat_transaction_id

59: fnd_file.put_line(fnd_file.log, 'insert_allocation_error - start');
60: end if;
61: /*
62: if gv_debug_flag then
63: fnd_file.put_line(fnd_file.log, 'pn_vat_transaction_id:'||pn_vat_transaction_id
64: ||', pv_allocation_error_code:'||pv_allocation_error_code
65: ||', pv_period_type:'||pv_period_type
66: ||', pn_created_by:'||pn_created_by
67: ||', pn_last_updated_by:'||pn_last_updated_by

Line 296: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor-begin');

292: l_trxs_csr trxs_for_alloc_csr_type;
293: begin
294:
295: if gv_debug_flag then
296: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor-begin');
297: end if;
298:
299: if pv_fresh_allocation_flag = g_yes then
300:

Line 302: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor- pv_fresh_allocation_flag = g_yes');

298:
299: if pv_fresh_allocation_flag = g_yes then
300:
301: if gv_debug_flag then
302: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor- pv_fresh_allocation_flag = g_yes');
303: end if;
304:
305: /*
306: NOTE: if any of the below cursor is changed to add/remove select columns,

Line 342: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor- pv_fresh_allocation_flag <> g_yes: returns errors only');

338:
339: else /*return errors cursor */
340:
341: if gv_debug_flag then
342: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor- pv_fresh_allocation_flag <> g_yes: returns errors only');
343: end if;
344:
345: OPEN l_trxs_csr FOR
346: SELECT

Line 380: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor- return');

376:
377: end if;
378:
379: if gv_debug_flag then
380: fnd_file.put_line(fnd_file.log, 'get_transactions_cursor- return');
381: end if;
382:
383: return l_trxs_csr;
384:

Line 391: fnd_file.put_line(fnd_file.log, 'run allocation - start');

387: BEGIN
388:
389: gv_debug_flag := true;
390: if gv_debug_flag then
391: fnd_file.put_line(fnd_file.log, 'run allocation - start');
392: end if;
393:
394:
395: /* Initializing Variables */

Line 411: fnd_file.put_line(fnd_file.log, 'run allocation - before JG_ZZ_VAT_REP_UTILITY.validate_process_initiation');

407: ln_upd_errored_cnt := 0;
408: ln_del_errored_cnt := 0;
409:
410: if gv_debug_flag then
411: fnd_file.put_line(fnd_file.log, 'run allocation - before JG_ZZ_VAT_REP_UTILITY.validate_process_initiation');
412: end if;
413:
414:
415: /* Make a call to utility package which validates and determines whether to proceed further with this process or not */

Line 433: fnd_file.put_line(fnd_file.log, 'run allocation - Error JG_ZZ_VAT_REP_UTILITY.validate_process_initiation. value-'||lv_return_flag);

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:
436: /* print return message;
437: request WARNING (retcode=1), ERROR (retcode=2)*/

Line 448: fnd_file.put_line(fnd_file.log, 'run allocation - lv_enable_alloc_flag:'||lv_enable_alloc_flag ||', lv_enable_annual_alloc_flag:'||lv_enable_annual_alloc_flag);

444: fetch c_get_alloc_flags into lv_enable_alloc_flag, lv_enable_annual_alloc_flag;
445: close c_get_alloc_flags;
446:
447: if gv_debug_flag then
448: fnd_file.put_line(fnd_file.log, 'run allocation - lv_enable_alloc_flag:'||lv_enable_alloc_flag ||', lv_enable_annual_alloc_flag:'||lv_enable_annual_alloc_flag);
449: end if;
450:
451: /* logic to set the variable that indicates the no of source ledgers the will be allocated */
452: ln_source_iterations := 1;

Line 458: fnd_file.put_line(fnd_file.log, 'run allocation - Product Iterations'||ln_source_iterations);

454: ln_source_iterations := 3;
455: end if;
456:
457: if gv_debug_flag then
458: fnd_file.put_line(fnd_file.log, 'run allocation - Product Iterations'||ln_source_iterations);
459: end if;
460:
461: FOR product IN 1..ln_source_iterations LOOP /* 1=AP, 2=AR, 3=GL */
462:

Line 464: fnd_file.put_line(fnd_file.log, ' product loop:'||product);

460:
461: FOR product IN 1..ln_source_iterations LOOP /* 1=AP, 2=AR, 3=GL */
462:
463: if gv_debug_flag then
464: fnd_file.put_line(fnd_file.log, ' product loop:'||product);
465: end if;
466:
467: /* initialization for SOURCE specific variables */
468: lv_curr_allocation_status := null;

Line 493: fnd_file.put_line(fnd_file.log, 'run allocation - Extract Source Ledger'||lv_extract_source_ledger);

489: ln_rep_status_id := ln_rep_status_id_gl;
490: end if;
491:
492: if gv_debug_flag then
493: fnd_file.put_line(fnd_file.log, 'run allocation - Extract Source Ledger'||lv_extract_source_ledger);
494: fnd_file.put_line(fnd_file.log, 'run allocation - Rep Status ID'||ln_rep_status_id);
495: end if;
496:
497: /*if gv_debug_flag then

Line 494: fnd_file.put_line(fnd_file.log, 'run allocation - Rep Status ID'||ln_rep_status_id);

490: end if;
491:
492: if gv_debug_flag then
493: fnd_file.put_line(fnd_file.log, 'run allocation - Extract Source Ledger'||lv_extract_source_ledger);
494: fnd_file.put_line(fnd_file.log, 'run allocation - Rep Status ID'||ln_rep_status_id);
495: end if;
496:
497: /*if gv_debug_flag then
498: fnd_file.put_line(fnd_file.log, 'run allocation - pl->bCallTo-get_allocation_status - ln_rep_status_id:'||ln_rep_status_id);

Line 498: fnd_file.put_line(fnd_file.log, 'run allocation - pl->bCallTo-get_allocation_status - ln_rep_status_id:'||ln_rep_status_id);

494: fnd_file.put_line(fnd_file.log, 'run allocation - Rep Status ID'||ln_rep_status_id);
495: end if;
496:
497: /*if gv_debug_flag then
498: fnd_file.put_line(fnd_file.log, 'run allocation - pl->bCallTo-get_allocation_status - ln_rep_status_id:'||ln_rep_status_id);
499: end if;
500: */
501: lv_curr_allocation_status := get_allocation_status(pn_reporting_status_id => ln_rep_status_id);
502:

Line 504: fnd_file.put_line(fnd_file.log, 'run allocation - pl->aCallTo-get_allocation_status:'||lv_curr_allocation_status);

500: */
501: lv_curr_allocation_status := get_allocation_status(pn_reporting_status_id => ln_rep_status_id);
502:
503: /*if gv_debug_flag then
504: fnd_file.put_line(fnd_file.log, 'run allocation - pl->aCallTo-get_allocation_status:'||lv_curr_allocation_status);
505: end if;
506: */
507: /* logic to say whether to execute cursor for first time allocation/reallocation or errored allocations*/
508: if pv_reallocate_flag = g_no and lv_curr_allocation_status = g_yes then

Line 537: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 1. lv_fresh_allocation_flag:'||lv_fresh_allocation_flag);

533: FETCH l_trxs_for_alloc_csr INTO l_trx_rec;
534: EXIT WHEN l_trxs_for_alloc_csr%NOTFOUND;
535:
536: if gv_debug_flag then
537: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 1. lv_fresh_allocation_flag:'||lv_fresh_allocation_flag);
538: fnd_file.put_line(fnd_file.log, 'run allocation - Transaction ID - '||l_trx_rec.trx_id);
539: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID - '||l_trx_rec.vat_transaction_id);
540: end if;
541:

Line 538: fnd_file.put_line(fnd_file.log, 'run allocation - Transaction ID - '||l_trx_rec.trx_id);

534: EXIT WHEN l_trxs_for_alloc_csr%NOTFOUND;
535:
536: if gv_debug_flag then
537: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 1. lv_fresh_allocation_flag:'||lv_fresh_allocation_flag);
538: fnd_file.put_line(fnd_file.log, 'run allocation - Transaction ID - '||l_trx_rec.trx_id);
539: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID - '||l_trx_rec.vat_transaction_id);
540: end if;
541:
542:

Line 539: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID - '||l_trx_rec.vat_transaction_id);

535:
536: if gv_debug_flag then
537: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 1. lv_fresh_allocation_flag:'||lv_fresh_allocation_flag);
538: fnd_file.put_line(fnd_file.log, 'run allocation - Transaction ID - '||l_trx_rec.trx_id);
539: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID - '||l_trx_rec.vat_transaction_id);
540: end if;
541:
542:
543: /* should we loop here twice if it is fresh allocation */

Line 559: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 2. lv_fresh_allocation_flag:'||lv_fresh_allocation_flag

555: ln_period_type_iterations := 1;
556: end if;
557:
558: if gv_debug_flag then
559: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 2. lv_fresh_allocation_flag:'||lv_fresh_allocation_flag
560: ||', entityCode:'||l_trx_rec.entity_code ||', trx_type_mng:'||l_trx_rec.trx_type_mng
561: );
562: end if;
563:

Line 584: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 3. sl_trx_type:'

580: fetch c_sl_trx_type_dtl into l_sl_dtl_rec;
581: close c_sl_trx_type_dtl;
582:
583: if gv_debug_flag then
584: fnd_file.put_line(fnd_file.log, 'run allocation - trxloop 3. sl_trx_type:'
585: ||l_sl_dtl_rec.sl_trx_type ||', cr_rev_category:'||l_cr_dtl_rec.cr_rev_category
586: );
587: end if;
588:

Line 628: fnd_file.put_line(fnd_file.log, 'run allocation - financial_document_type : '||lv_financial_document_type);

624:
625: end if;
626:
627: if gv_debug_flag then
628: fnd_file.put_line(fnd_file.log, 'run allocation - financial_document_type : '||lv_financial_document_type);
629: end if;
630:
631: if gv_debug_flag then
632: fnd_file.put_line(fnd_file.log, 'run allocation - Period Iterations'||ln_period_type_iterations);

Line 632: fnd_file.put_line(fnd_file.log, 'run allocation - Period Iterations'||ln_period_type_iterations);

628: fnd_file.put_line(fnd_file.log, 'run allocation - financial_document_type : '||lv_financial_document_type);
629: end if;
630:
631: if gv_debug_flag then
632: fnd_file.put_line(fnd_file.log, 'run allocation - Period Iterations'||ln_period_type_iterations);
633: end if;
634:
635: /* loop to handle the processing for PERIODIC as well as ANNUAL allocations based on setup*/
636: for period_type in 1..ln_period_type_iterations loop

Line 667: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 1. BefAllocBox. lv_period_type:'||lv_period_type);

663: lv_period_type := g_period_type_annual;
664: end if;
665:
666: /*if gv_debug_flag then
667: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 1. BefAllocBox. lv_period_type:'||lv_period_type);
668: end if;
669: */
670:
671: -- Initialize the variable for counting the no. of transactions getting allocated

Line 676: fnd_file.put_line(fnd_file.log, 'run allocation - ENTERING LOOP Before calling Allocation_Box()');

672: lv_check_alloc_trans := 0;
673: gv_hierarchy_level := 0;
674:
675: if gv_debug_flag then
676: fnd_file.put_line(fnd_file.log, 'run allocation - ENTERING LOOP Before calling Allocation_Box()');
677: end if;
678:
679: LOOP
680:

Line 682: fnd_file.put_line(fnd_file.log, 'run allocation - INSIDE LOOP Before calling Allocation_Box()');

678:
679: LOOP
680:
681: if gv_debug_flag then
682: fnd_file.put_line(fnd_file.log, 'run allocation - INSIDE LOOP Before calling Allocation_Box()');
683: end if;
684:
685: lv_tax_box := null;
686: lv_taxable_box := null;

Line 724: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Flag '||lv_alloc_flag);

720: lv_allocation_error_code := 'JG_ZZ_INVALID_TAX_RATE_CODE';
721: end;
722:
723: if gv_debug_flag then
724: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Flag '||lv_alloc_flag);
725: end if;
726: if gv_debug_flag then
727: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation_error_code' ||lv_allocation_error_code);
728: end if;

Line 727: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation_error_code' ||lv_allocation_error_code);

723: if gv_debug_flag then
724: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Flag '||lv_alloc_flag);
725: end if;
726: if gv_debug_flag then
727: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation_error_code' ||lv_allocation_error_code);
728: end if;
729:
730: if lv_alloc_flag = 'Y' then
731: allocate_box(

Line 751: fnd_file.put_line(fnd_file.log, 'run allocation - AFTER allocation_box() CALL');

747: xv_return_message => lv_return_message
748: );
749:
750: if gv_debug_flag then
751: fnd_file.put_line(fnd_file.log, 'run allocation - AFTER allocation_box() CALL');
752: end if;
753:
754: if gv_debug_flag then
755: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 2. AftAllocBox. lv_period_type:'||lv_period_type

Line 755: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 2. AftAllocBox. lv_period_type:'||lv_period_type

751: fnd_file.put_line(fnd_file.log, 'run allocation - AFTER allocation_box() CALL');
752: end if;
753:
754: if gv_debug_flag then
755: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 2. AftAllocBox. lv_period_type:'||lv_period_type
756: ||', lv_return_flag:'||lv_return_flag
757: ||', lv_return_message:'||lv_return_message
758: ||', tax_box:'||lv_tax_box
759: ||', taxable_box:'||lv_taxable_box

Line 799: fnd_file.put_line(fnd_file.log, 'run allocation - Setting ERROR JG_ZZ_NO_BOX_IN_RULE');

795: end if;
796: exit;
797: elsif lv_tax_box is null or lv_taxable_box is null then
798: if gv_debug_flag then
799: fnd_file.put_line(fnd_file.log, 'run allocation - Setting ERROR JG_ZZ_NO_BOX_IN_RULE');
800: end if;
801: lv_allocation_error_code := 'JG_ZZ_NO_BOX_IN_RULE';
802: end if;
803: end if;

Line 814: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop. BefDML2 : '

810:
811: if lv_fresh_allocation_flag = g_yes then
812:
813: if gv_debug_flag then
814: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop. BefDML2 : '
815: ||' lv_allocation_errored_flag = g_yes and lv_fresh_allocation_flag = g_yes'
816: );
817: end if;
818:

Line 820: fnd_file.put_line(fnd_file.log, 'run allocation - Calling PROCEDURE insert_allocation_error');

816: );
817: end if;
818:
819: if gv_debug_flag then
820: fnd_file.put_line(fnd_file.log, 'run allocation - Calling PROCEDURE insert_allocation_error');
821: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID '||l_trx_rec.vat_transaction_id);
822: fnd_file.put_line(fnd_file.log, 'run allocation - Error Code '||lv_allocation_error_code);
823: end if;
824:

Line 821: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID '||l_trx_rec.vat_transaction_id);

817: end if;
818:
819: if gv_debug_flag then
820: fnd_file.put_line(fnd_file.log, 'run allocation - Calling PROCEDURE insert_allocation_error');
821: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID '||l_trx_rec.vat_transaction_id);
822: fnd_file.put_line(fnd_file.log, 'run allocation - Error Code '||lv_allocation_error_code);
823: end if;
824:
825: insert_allocation_error(

Line 822: fnd_file.put_line(fnd_file.log, 'run allocation - Error Code '||lv_allocation_error_code);

818:
819: if gv_debug_flag then
820: fnd_file.put_line(fnd_file.log, 'run allocation - Calling PROCEDURE insert_allocation_error');
821: fnd_file.put_line(fnd_file.log, 'run allocation - VAT Transaction ID '||l_trx_rec.vat_transaction_id);
822: fnd_file.put_line(fnd_file.log, 'run allocation - Error Code '||lv_allocation_error_code);
823: end if;
824:
825: insert_allocation_error(
826: pn_vat_transaction_id => l_trx_rec.vat_transaction_id,

Line 837: fnd_file.put_line(fnd_file.log, 'run allocation - AFTER PROCEDURE insert_allocation_error');

833: xv_return_message => lv_return_message
834: );
835:
836: if gv_debug_flag then
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

Line 854: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop. BefDML3 : '

850:
851: elsif lv_fresh_allocation_flag = g_no then
852:
853: if gv_debug_flag then
854: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop. BefDML3 : '
855: ||' lv_allocation_errored_flag = g_yes and lv_fresh_allocation_flag = g_no'
856: );
857: end if;
858: update_allocation_error(

Line 889: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop 3. BefDML.'

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.'
890: ||' lv_allocation_errored_flag:'||lv_allocation_errored_flag
891: ||', lv_allocation_status_flag:'||lv_allocation_status_flag
892: );
893: end if;

Line 908: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop. BefDML1 : lv_allocation_errored_flag = g_no'

904: /* i.e successfully found a reco. / non reco. Box */
905: if lv_allocation_errored_flag = g_no then
906:
907: if gv_debug_flag then
908: fnd_file.put_line(fnd_file.log, 'run allocation - periodTypeloop. BefDML1 : lv_allocation_errored_flag = g_no'
909: );
910: end if;
911:
912: ln_allocated_cnt := ln_allocated_cnt + 1;

Line 915: fnd_file.put_line(fnd_file.log, 'run allocation - Calling jg_zz_vat_box_allocs_pkg.insert_row');

911:
912: ln_allocated_cnt := ln_allocated_cnt + 1;
913:
914: if gv_debug_flag then
915: fnd_file.put_line(fnd_file.log, 'run allocation - Calling jg_zz_vat_box_allocs_pkg.insert_row');
916: fnd_file.put_line(fnd_file.log, 'run allocation - vat box allocation ID'||ln_vat_box_allocation_id);
917: fnd_file.put_line(fnd_file.log, 'run allocation - vat transaction ID'||l_trx_rec.vat_transaction_id);
918: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Rule ID'||ln_allocation_rule_id);
919:

Line 916: fnd_file.put_line(fnd_file.log, 'run allocation - vat box allocation ID'||ln_vat_box_allocation_id);

912: ln_allocated_cnt := ln_allocated_cnt + 1;
913:
914: if gv_debug_flag then
915: fnd_file.put_line(fnd_file.log, 'run allocation - Calling jg_zz_vat_box_allocs_pkg.insert_row');
916: fnd_file.put_line(fnd_file.log, 'run allocation - vat box allocation ID'||ln_vat_box_allocation_id);
917: fnd_file.put_line(fnd_file.log, 'run allocation - vat transaction ID'||l_trx_rec.vat_transaction_id);
918: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Rule ID'||ln_allocation_rule_id);
919:
920: end if;

Line 917: fnd_file.put_line(fnd_file.log, 'run allocation - vat transaction ID'||l_trx_rec.vat_transaction_id);

913:
914: if gv_debug_flag then
915: fnd_file.put_line(fnd_file.log, 'run allocation - Calling jg_zz_vat_box_allocs_pkg.insert_row');
916: fnd_file.put_line(fnd_file.log, 'run allocation - vat box allocation ID'||ln_vat_box_allocation_id);
917: fnd_file.put_line(fnd_file.log, 'run allocation - vat transaction ID'||l_trx_rec.vat_transaction_id);
918: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Rule ID'||ln_allocation_rule_id);
919:
920: end if;
921:

Line 918: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Rule ID'||ln_allocation_rule_id);

914: if gv_debug_flag then
915: fnd_file.put_line(fnd_file.log, 'run allocation - Calling jg_zz_vat_box_allocs_pkg.insert_row');
916: fnd_file.put_line(fnd_file.log, 'run allocation - vat box allocation ID'||ln_vat_box_allocation_id);
917: fnd_file.put_line(fnd_file.log, 'run allocation - vat transaction ID'||l_trx_rec.vat_transaction_id);
918: fnd_file.put_line(fnd_file.log, 'run allocation - Allocation Rule ID'||ln_allocation_rule_id);
919:
920: end if;
921:
922: jg_zz_vat_box_allocs_pkg.insert_row(

Line 959: fnd_file.put_line(fnd_file.log, 'run allocation - EndLoop Trx. lv_allocation_status_flag:'||lv_allocation_status_flag );

955:
956: end loop; /* for JG transactions */
957:
958: if gv_debug_flag then
959: fnd_file.put_line(fnd_file.log, 'run allocation - EndLoop Trx. lv_allocation_status_flag:'||lv_allocation_status_flag );
960: 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 */

Line 975: fnd_file.put_line(fnd_file.log, 'run allocation - before jg_zz_vat_rep_utility.post_process_update.'

971: lv_return_flag := null;
972: lv_return_message := null;
973:
974: if gv_debug_flag then
975: fnd_file.put_line(fnd_file.log, 'run allocation - before jg_zz_vat_rep_utility.post_process_update.'
976: );
977: end if;
978: /* Call the utility API to update allocation_process columns of jg_zz_vat_rep_status table by passing proper values.*/
979: jg_zz_vat_rep_utility.post_process_update(

Line 992: fnd_file.put_line(fnd_file.log, 'run allocation - after jg_zz_vat_rep_utility.post_process_update.'

988: xv_return_message => lv_return_message
989: );
990:
991: if gv_debug_flag then
992: fnd_file.put_line(fnd_file.log, 'run allocation - after jg_zz_vat_rep_utility.post_process_update.'
993: ||' lv_return_flag:'||lv_return_flag
994: );
995: end if;
996: /* raise error if validation failed */

Line 1009: fnd_file.put_line(fnd_file.log, 'run allocation - after EndLoop Source. ln_allocated_cnt:'||ln_allocated_cnt

1005:
1006: END LOOP; /* end for source */
1007:
1008: if gv_debug_flag then
1009: fnd_file.put_line(fnd_file.log, 'run allocation - after EndLoop Source. ln_allocated_cnt:'||ln_allocated_cnt
1010: ||', ln_ins_errored_cnt:'||ln_ins_errored_cnt
1011: ||', ln_upd_errored_cnt:'||ln_upd_errored_cnt
1012: ||', ln_del_errored_cnt:'||ln_del_errored_cnt
1013: );

Line 1032: fnd_file.put_line(fnd_file.log, 'run allocation - after fnd_request.add_layout'

1028: output_format => 'PDF'
1029: );
1030:
1031: if gv_debug_flag then
1032: fnd_file.put_line(fnd_file.log, 'run allocation - after fnd_request.add_layout'
1033: );
1034: end if;
1035:
1036: ln_errors_conc_request_id :=

Line 1052: fnd_file.put_line(fnd_file.log, 'run allocation - after fnd_request.submit_request'

1048: '','','','','','','','','','',
1049: '','','','','');
1050:
1051: if gv_debug_flag then
1052: fnd_file.put_line(fnd_file.log, 'run allocation - after fnd_request.submit_request'
1053: );
1054: end if;
1055:
1056: end if;

Line 1237: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_hierarchy_level:'||gv_hierarchy_level

1233: ld_today := trunc(sysdate);
1234: lv_rule_found := g_no;
1235:
1236: if gv_debug_flag then
1237: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_hierarchy_level:'||gv_hierarchy_level
1238: ||', gv_appl_alloc_rule_id ::'||gv_appl_alloc_rule_id
1239: ||', gv_allocation_rule_id ::'||gv_allocation_rule_id
1240: );
1241: end if;

Line 1246: fnd_file.put_line(fnd_file.log, 'allocate_box - start' );

1242:
1243: if gv_hierarchy_level = 0 then
1244:
1245: if gv_debug_flag then
1246: fnd_file.put_line(fnd_file.log, 'allocate_box - start' );
1247: fnd_file.put_line(fnd_file.log, 'allocate_box - Hierarchy Level '||gv_hierarchy_level );
1248: end if;
1249: lv_statement := '1';
1250:

Line 1247: fnd_file.put_line(fnd_file.log, 'allocate_box - Hierarchy Level '||gv_hierarchy_level );

1243: if gv_hierarchy_level = 0 then
1244:
1245: if gv_debug_flag then
1246: fnd_file.put_line(fnd_file.log, 'allocate_box - start' );
1247: fnd_file.put_line(fnd_file.log, 'allocate_box - Hierarchy Level '||gv_hierarchy_level );
1248: end if;
1249: lv_statement := '1';
1250:
1251: if gv_debug_flag then

Line 1252: fnd_file.put_line(fnd_file.log, 'Params-'

1248: end if;
1249: lv_statement := '1';
1250:
1251: if gv_debug_flag then
1252: fnd_file.put_line(fnd_file.log, 'Params-'
1253: ||', pn_vat_reporting_entity_id:'||pn_vat_reporting_entity_id
1254: ||', pv_period_type:'||pv_period_type
1255: ||', pv_source:'||pv_source
1256: ||', pv_event_class_code:'||pv_event_class_code

Line 1272: fnd_file.put_line(fnd_file.log, 'allocate_box - RECORD found in Cursor c_get_alloc_rules_for_tax');

1268: pv_source, pv_event_class_code, pv_tax, pv_tax_status, pv_tax_rate_code, pv_tax_rate_id, pv_tax_jurisdiction) --bug14241603
1269: loop
1270:
1271: if gv_debug_flag then
1272: fnd_file.put_line(fnd_file.log, 'allocate_box - RECORD found in Cursor c_get_alloc_rules_for_tax');
1273: end if;
1274:
1275: lv_statement := '2';
1276: lv_rule_found := g_no;

Line 1282: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_status_code:'||rule.tax_status_code||', pv_tax_status:'||pv_tax_status);

1278: lv_hierarchy_debug := 'T';
1279: /* Start of hierarchical derivation of Tax box. */
1280: /* Checking for Status */
1281: if gv_debug_flag then
1282: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_status_code:'||rule.tax_status_code||', pv_tax_status:'||pv_tax_status);
1283: end if;
1284: if rule.tax_status_code = pv_tax_status then
1285: lv_statement := '3';
1286: lv_hierarchy_debug := 'T:S';

Line 1289: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_rate_code:'||rule.tax_rate_code||', pv_tax_rate_code:'||pv_tax_rate_code);

1285: lv_statement := '3';
1286: lv_hierarchy_debug := 'T:S';
1287: /* checking for Tax Rate */
1288: if gv_debug_flag then
1289: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_rate_code:'||rule.tax_rate_code||', pv_tax_rate_code:'||pv_tax_rate_code);
1290: end if;
1291: if rule.tax_rate_code = pv_tax_rate_code then
1292: lv_statement := '4';
1293: lv_hierarchy_debug := 'T:S:R';

Line 1296: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code:'||rule.tax_jurisdiction_code||', pv_tax_jurisdiction:'||pv_tax_jurisdiction);

1292: lv_statement := '4';
1293: lv_hierarchy_debug := 'T:S:R';
1294: /* checking for Jurisdiction */
1295: if gv_debug_flag then
1296: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code:'||rule.tax_jurisdiction_code||', pv_tax_jurisdiction:'||pv_tax_jurisdiction);
1297: end if;
1298: if rule.tax_jurisdiction_code = pv_tax_jurisdiction then
1299: if gv_debug_flag then
1300: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code = pv_tax_jurisdiction');

Line 1300: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code = pv_tax_jurisdiction');

1296: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code:'||rule.tax_jurisdiction_code||', pv_tax_jurisdiction:'||pv_tax_jurisdiction);
1297: end if;
1298: if rule.tax_jurisdiction_code = pv_tax_jurisdiction then
1299: if gv_debug_flag then
1300: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code = pv_tax_jurisdiction');
1301: end if;
1302: lv_statement := '5';
1303: lv_hierarchy_debug := 'T:S:R:J';
1304: lv_rule_found := g_yes;

Line 1310: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code is null');

1306: /* Tax Rate is success, but jurisdiction failed. so assign the default box of rate that is not specific to any jurisdiction under the rate*/
1307:
1308: elsif rule.tax_jurisdiction_code is null then
1309: if gv_debug_flag then
1310: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_jurisdiction_code is null');
1311: end if;
1312:
1313: lv_statement := '6';
1314: lv_hierarchy_debug := 'T:S:R:Jnull';

Line 1319: fnd_file.put_line(fnd_file.log, 'allocate_box - else part one');

1315: lv_rule_found := g_yes;
1316: gv_hierarchy_level := 3;
1317: else
1318: if gv_debug_flag then
1319: fnd_file.put_line(fnd_file.log, 'allocate_box - else part one');
1320: end if;
1321:
1322: null;
1323: end if;

Line 1328: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_rate_code is null');

1324:
1325: /* Tax status is success, but rate failed. so assign the default box of status which is not specific to any rate under the status */
1326: elsif rule.tax_rate_code is null then
1327: if gv_debug_flag then
1328: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_rate_code is null');
1329: end if;
1330: lv_statement := '7';
1331: lv_hierarchy_debug := 'T:S:Rnull';
1332: lv_rule_found := g_yes;

Line 1336: fnd_file.put_line(fnd_file.log, 'allocate_box - else part two ');

1332: lv_rule_found := g_yes;
1333: gv_hierarchy_level := 2;
1334: else
1335: if gv_debug_flag then
1336: fnd_file.put_line(fnd_file.log, 'allocate_box - else part two ');
1337: end if;
1338: lv_statement := '8';
1339: lv_hierarchy_debug := 'T:S:null';
1340: null;

Line 1346: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_status_code is null ');

1342:
1343: /* Tax is success, but status failed. so assign the default box of tax which is not specific to any status under the tax*/
1344: elsif rule.tax_status_code is null then
1345: if gv_debug_flag then
1346: fnd_file.put_line(fnd_file.log, 'allocate_box - rule.tax_status_code is null ');
1347: end if;
1348: lv_statement := '9';
1349: lv_hierarchy_debug := 'T:Snull';
1350: lv_rule_found := g_yes;

Line 1354: fnd_file.put_line(fnd_file.log, 'allocate_box - else part three ');

1350: lv_rule_found := g_yes;
1351: gv_hierarchy_level := 1;
1352: else
1353: if gv_debug_flag then
1354: fnd_file.put_line(fnd_file.log, 'allocate_box - else part three ');
1355: end if;
1356: lv_statement := '10';
1357: lv_hierarchy_debug := 'T:null';
1358: null;

Line 1362: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. lv_rule_found:'||lv_rule_found

1358: null;
1359: end if;
1360:
1361: if gv_debug_flag then
1362: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. lv_rule_found:'||lv_rule_found
1363: ||', pv_tax_recoverable_flag:'||pv_tax_recoverable_flag
1364: );
1365: end if;
1366:

Line 1375: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. lv_allocation_rule_id1:'||lv_allocation_rule_id);

1371: lv_tax_box_non_rec := rule.tax_box_non_recoverable;
1372: lv_taxable_boxes := nvl(rule.taxable_box_recoverable,rule.taxable_box_non_recoverable);
1373:
1374: if gv_debug_flag then
1375: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. lv_allocation_rule_id1:'||lv_allocation_rule_id);
1376: end if;
1377:
1378: -- Assign the value to global variables accordingly
1379: gv_tax_status := NULL;

Line 1399: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_appl_alloc_rule_id2:'||gv_appl_alloc_rule_id);

1395: -- Assign the appropriate value to gv_allocation_rule_id variable
1396: gv_appl_alloc_rule_id := lv_allocation_rule_id;
1397:
1398: if gv_debug_flag then
1399: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_appl_alloc_rule_id2:'||gv_appl_alloc_rule_id);
1400: end if;
1401:
1402: -- Get the minimum allocation rule ID
1403: open c_get_minimum_alloc_rule_id(pn_vat_reporting_entity_id, pv_period_type, pv_source, pv_event_class_code, pv_tax, lv_allocation_rule_id);

Line 1408: fnd_file.put_line(fnd_file.log, 'allocate_box - c_get_minimum_alloc_rule_id 1:'||gv_allocation_rule_id);

1404: fetch c_get_minimum_alloc_rule_id into gv_allocation_rule_id;
1405: close c_get_minimum_alloc_rule_id;
1406:
1407: if gv_debug_flag then
1408: fnd_file.put_line(fnd_file.log, 'allocate_box - c_get_minimum_alloc_rule_id 1:'||gv_allocation_rule_id);
1409: end if;
1410:
1411: IF gv_allocation_rule_id IS NULL THEN
1412: gv_allocation_rule_id := lv_allocation_rule_id;

Line 1414: fnd_file.put_line(fnd_file.log, 'Only one allocation rule applicable' );

1410:
1411: IF gv_allocation_rule_id IS NULL THEN
1412: gv_allocation_rule_id := lv_allocation_rule_id;
1413: if gv_debug_flag then
1414: fnd_file.put_line(fnd_file.log, 'Only one allocation rule applicable' );
1415: end if;
1416: END IF;
1417:
1418: if gv_debug_flag then

Line 1419: fnd_file.put_line(fnd_file.log, 'allocate_box - c_get_minimum_alloc_rule_id 2:'||gv_allocation_rule_id);

1415: end if;
1416: END IF;
1417:
1418: if gv_debug_flag then
1419: fnd_file.put_line(fnd_file.log, 'allocate_box - c_get_minimum_alloc_rule_id 2:'||gv_allocation_rule_id);
1420: end if;
1421: if gv_debug_flag then
1422: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_allocation_rule_id3:'||gv_allocation_rule_id);
1423: end if;

Line 1422: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_allocation_rule_id3:'||gv_allocation_rule_id);

1418: if gv_debug_flag then
1419: fnd_file.put_line(fnd_file.log, 'allocate_box - c_get_minimum_alloc_rule_id 2:'||gv_allocation_rule_id);
1420: end if;
1421: if gv_debug_flag then
1422: fnd_file.put_line(fnd_file.log, 'allocate_box - afterHierarchy. gv_allocation_rule_id3:'||gv_allocation_rule_id);
1423: end if;
1424: exit;
1425: end if;
1426: end loop;

Line 1430: fnd_file.put_line(fnd_file.log, 'allocate_box - Hierarchy Level not 0');

1426: end loop;
1427: else
1428:
1429: if gv_debug_flag then
1430: fnd_file.put_line(fnd_file.log, 'allocate_box - Hierarchy Level not 0');
1431: end if;
1432: if gv_debug_flag then
1433: fnd_file.put_line(fnd_file.log, 'Params-'
1434: ||', pn_vat_reporting_entity_id:'||pn_vat_reporting_entity_id

Line 1433: fnd_file.put_line(fnd_file.log, 'Params-'

1429: if gv_debug_flag then
1430: fnd_file.put_line(fnd_file.log, 'allocate_box - Hierarchy Level not 0');
1431: end if;
1432: if gv_debug_flag then
1433: fnd_file.put_line(fnd_file.log, 'Params-'
1434: ||', pn_vat_reporting_entity_id:'||pn_vat_reporting_entity_id
1435: ||', pv_period_type:'||pv_period_type
1436: ||', pv_source:'||pv_source
1437: ||', pv_event_class_code:'||pv_event_class_code

Line 1451: fnd_file.put_line(fnd_file.log, 'allocate_box - Opening Cursor c_get_rules_stat_code_jrdict' );

1447: lv_rule_found := g_no;
1448:
1449: lv_allocation_rule_id := 0;
1450: if gv_debug_flag then
1451: fnd_file.put_line(fnd_file.log, 'allocate_box - Opening Cursor c_get_rules_stat_code_jrdict' );
1452: end if;
1453: open c_get_rules_stat_code_jrdict(pn_vat_reporting_entity_id, pv_period_type, pv_source, pv_event_class_code, pv_tax);
1454: fetch c_get_rules_stat_code_jrdict into lv_allocation_rule_id,
1455: lv_tax_box_recoverable,

Line 1462: fnd_file.put_line(fnd_file.log, 'allocate_box - AFTER Cursor c_get_rules_stat_code_jrdict FETCH' );

1458:
1459: close c_get_rules_stat_code_jrdict;
1460:
1461: if gv_debug_flag then
1462: fnd_file.put_line(fnd_file.log, 'allocate_box - AFTER Cursor c_get_rules_stat_code_jrdict FETCH' );
1463: fnd_file.put_line(fnd_file.log, 'allocate_box - Allocation_rule_id '||lv_allocation_rule_id);
1464: fnd_file.put_line(fnd_file.log, 'allocate_box - Tax Box Recoverable '||lv_tax_box_recoverable);
1465: fnd_file.put_line(fnd_file.log, 'allocate_box - tax Box Non Recoverables '||lv_tax_box_non_rec);
1466: end if;

Line 1463: fnd_file.put_line(fnd_file.log, 'allocate_box - Allocation_rule_id '||lv_allocation_rule_id);

1459: close c_get_rules_stat_code_jrdict;
1460:
1461: if gv_debug_flag then
1462: fnd_file.put_line(fnd_file.log, 'allocate_box - AFTER Cursor c_get_rules_stat_code_jrdict FETCH' );
1463: fnd_file.put_line(fnd_file.log, 'allocate_box - Allocation_rule_id '||lv_allocation_rule_id);
1464: fnd_file.put_line(fnd_file.log, 'allocate_box - Tax Box Recoverable '||lv_tax_box_recoverable);
1465: fnd_file.put_line(fnd_file.log, 'allocate_box - tax Box Non Recoverables '||lv_tax_box_non_rec);
1466: end if;
1467:

Line 1464: fnd_file.put_line(fnd_file.log, 'allocate_box - Tax Box Recoverable '||lv_tax_box_recoverable);

1460:
1461: if gv_debug_flag then
1462: fnd_file.put_line(fnd_file.log, 'allocate_box - AFTER Cursor c_get_rules_stat_code_jrdict FETCH' );
1463: fnd_file.put_line(fnd_file.log, 'allocate_box - Allocation_rule_id '||lv_allocation_rule_id);
1464: fnd_file.put_line(fnd_file.log, 'allocate_box - Tax Box Recoverable '||lv_tax_box_recoverable);
1465: fnd_file.put_line(fnd_file.log, 'allocate_box - tax Box Non Recoverables '||lv_tax_box_non_rec);
1466: end if;
1467:
1468: if lv_allocation_rule_id <> 0 then

Line 1465: fnd_file.put_line(fnd_file.log, 'allocate_box - tax Box Non Recoverables '||lv_tax_box_non_rec);

1461: if gv_debug_flag then
1462: fnd_file.put_line(fnd_file.log, 'allocate_box - AFTER Cursor c_get_rules_stat_code_jrdict FETCH' );
1463: fnd_file.put_line(fnd_file.log, 'allocate_box - Allocation_rule_id '||lv_allocation_rule_id);
1464: fnd_file.put_line(fnd_file.log, 'allocate_box - Tax Box Recoverable '||lv_tax_box_recoverable);
1465: fnd_file.put_line(fnd_file.log, 'allocate_box - tax Box Non Recoverables '||lv_tax_box_non_rec);
1466: end if;
1467:
1468: if lv_allocation_rule_id <> 0 then
1469: lv_rule_found := g_yes;

Line 1485: fnd_file.put_line(fnd_file.log, 'allocate_box - Setting ERROR NO ALLOC RULE FOUND');

1481: xv_tax_box := lv_tax_box_non_rec;
1482: end if;
1483: elsif lv_rule_found = g_no then
1484: if gv_debug_flag then
1485: fnd_file.put_line(fnd_file.log, 'allocate_box - Setting ERROR NO ALLOC RULE FOUND');
1486: end if;
1487: /* execution will come here if no matching rule is found */
1488: xv_error_code := JG_ZZ_VAT_ALLOC_PRC_PKG.g_alloc_errcode_rule_not_found;
1489: return;

Line 1493: fnd_file.put_line(fnd_file.log, 'allocate_box - end. Hierarchy Path-'||lv_hierarchy_debug );

1489: return;
1490: end if;
1491:
1492: if gv_debug_flag then
1493: fnd_file.put_line(fnd_file.log, 'allocate_box - end. Hierarchy Path-'||lv_hierarchy_debug );
1494: end if;
1495:
1496: exception
1497: when others then

Line 1499: fnd_file.put_line(fnd_file.log, 'allocate_box - ERROR lv_statement:'||lv_statement );

1495:
1496: exception
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:

Line 1518: fnd_file.put_line(fnd_file.log, 'get_allocation_status - start ->'||lv_allocation_status );

1514: lv_allocation_status jg_zz_vat_rep_status.allocation_status_flag%TYPE;
1515:
1516: begin
1517: if gv_debug_flag then
1518: fnd_file.put_line(fnd_file.log, 'get_allocation_status - start ->'||lv_allocation_status );
1519: end if;
1520: open c_get_allocation_status;
1521: fetch c_get_allocation_status into lv_allocation_status;
1522: close c_get_allocation_status;

Line 1525: fnd_file.put_line(fnd_file.log, 'get_allocation_status - return ->'||lv_allocation_status );

1521: fetch c_get_allocation_status into lv_allocation_status;
1522: close c_get_allocation_status;
1523:
1524: if gv_debug_flag then
1525: fnd_file.put_line(fnd_file.log, 'get_allocation_status - return ->'||lv_allocation_status );
1526: end if;
1527:
1528: return lv_allocation_status;
1529: end get_allocation_status;