620: x_return_status := OKL_API.G_RET_STS_SUCCESS;
621: -------------------------------------------
622: -- Fetch Batch Source Id for OKL_CONTRACTS
623: -------------------------------------------
624: FND_FILE.PUT_LINE (FND_FILE.LOG, 'Fetching Batch Source');
625: -- Establish Savepoint for rollback
626: DBMS_TRANSACTION.SAVEPOINT('PREPARE_BATCH_SOURCE_REC_PVT');
627: -- Savepoint established
628:
629: OPEN batch_src_csr( p_trx_date );
630: FETCH batch_src_csr INTO l_batch_source_rec.batch_source_id;
631: IF (batch_src_csr%NOTFOUND) THEN
632: CLOSE batch_src_csr;
633: FND_FILE.PUT_LINE (FND_FILE.LOG, 'Error: Unable to retrieve Batch Source');
634: RAISE Okl_Api.G_EXCEPTION_ERROR;
635: END IF;
636: CLOSE batch_src_csr;
637: l_batch_source_rec.default_date := p_trx_date;
635: END IF;
636: CLOSE batch_src_csr;
637: l_batch_source_rec.default_date := p_trx_date;
638:
639: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'In PREPARE_BATCH_SOURCE_REC, p_trx_date: '||p_trx_date
640: ||' l_batch_source_rec.default_date: '||l_batch_source_rec.default_date);
641:
642: EXCEPTION
643: WHEN OTHERS THEN
963: l_trx_header_tbl(1).ship_to_account_number := NULL;
964: l_trx_header_tbl(1).ship_to_customer_name := NULL;
965: l_trx_header_tbl(1).ship_to_contact_id := NULL;
966: l_trx_header_tbl(1).ship_to_address_id := NVL(l_ship_to , lxfer_rec.CUSTOMER_ADDRESS_ID);
967: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '.... l_ship_to '||l_ship_to);
968: l_trx_header_tbl(1).ship_to_site_use_id := NULL;
969: l_trx_header_tbl(1).sold_to_customer_id := NULL;
970: -- l_trx_header_tbl(1).term_id := r_xsiv_rec.TERM_ID;
971: -- l_trx_header_tbl(1).LEGAL_ENTITY_ID := r_xsiv_rec.LEGAL_ENTITY_ID; -- for LE Uptake project 08-11-2006
1025: l_trx_header_tbl(1).fob_point := NULL;
1026: --start: 02-APR-07 cklee R12 Billing enhancement project |
1027: -- l_trx_header_tbl(1).customer_bank_account_id := r_xsiv_rec.CUSTOMER_BANK_ACCOUNT_ID;
1028: --rkuttiya added for bug # 7558039
1029: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Source : '|| p_source);
1030: IF p_source <> 'PRINCIPAL_PAYDOWN' THEN
1031: l_trx_header_tbl(1).customer_bank_account_id := lxfer_rec.CUSTOMER_BANK_ACCOUNT_ID;
1032: ELSE
1033: l_trx_header_tbl(1).payment_trxn_extension_id := NULL;
1322: FETCH get_memo_line_id_csr INTO l_memo_line_id;
1323: CLOSE get_memo_line_id_csr;
1324:
1325: if l_memo_line_id is null then
1326: FND_FILE.PUT_LINE(FND_FILE.LOG,
1327: 'WARNING: A memo line with name -- Lease Upfront Tax,
1328: must exist to import tax-only invoices.');
1329: end if;
1330: --end: 02-APR-07 cklee R12 Billing enhancement project |
1459: l_trx_lines_tbl(1).REASON_CODE := NULL;
1460: --start: 02-APR-07 cklee R12 Billing enhancement project |
1461: -- l_trx_lines_tbl(1).INVENTORY_ITEM_ID :=l_inv_id;
1462: l_trx_lines_tbl(1).INVENTORY_ITEM_ID := lxfer_rec.INVENTORY_ITEM_ID;
1463: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '.... Inventory_Item Id '||l_inv_id);
1464: l_trx_lines_tbl(1).DESCRIPTION
1465: -- := NVL (NVL (r_xlsv_rec.DESCRIPTION, r_xsiv_rec.DESCRIPTION), 'OKL Billing');
1466: := NVL (NVL (lxfer_rec.LINE_DESCRIPTION, lxfer_rec.HDR_DESCRIPTION), 'OKL Billing');
1467: -- l_trx_lines_tbl(1).QUANTITY_ORDERED := r_xlsv_rec.QUANTITY;
2474: -- Prepare batch_source rec
2475: ---------------------------------------
2476: l_batch_source_rec := l_init_batch_source_rec;
2477:
2478: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Preparing Batch rec '||l_num_cnt);
2479: PREPARE_BATCH_SOURCE_REC(
2480: x_return_status
2481: --start: | 02-APR-07 cklee R12 Billing enhancement project |
2482: ,xfer_rec.TRX_DATE
2482: ,xfer_rec.TRX_DATE
2483: -- ,xsi_rec.TRX_DATE
2484: --end: | 02-APR-07 cklee R12 Billing enhancement project |
2485: ,l_batch_source_rec );
2486: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Done Preparing Batch rec '||l_num_cnt);
2487:
2488: IF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
2489: OKL_API.SET_MESSAGE(p_app_name => 'OKL',
2490: p_msg_name => 'OKL_BPD_RTA_REC_ERR',
2625: END LOOP;
2626: */
2627: --end: | 02-APR-07 cklee R12 Billing enhancement project |
2628:
2629: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Preparing Trx Hdr tbl '||l_num_cnt);
2630: PREPARE_TRX_HDR_TBL(
2631: x_return_status
2632: --start: | 02-APR-07 cklee R12 Billing enhancement project |
2633: ,lxfer_rec
2636: --end: | 02-APR-07 cklee R12 Billing enhancement project |
2637: ,p_source
2638: ,l_trx_header_tbl );
2639:
2640: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Done Preparing Trx Hdr tbl '||l_num_cnt);
2641:
2642:
2643: IF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
2644: OKL_API.SET_MESSAGE(p_app_name => 'OKL',
2653: -- Prepare trx lines tbl
2654: ---------------------------------------
2655: l_trx_lines_tbl := l_init_trx_lines_tbl;
2656:
2657: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Preparing Trx Lines tbl '||l_num_cnt);
2658: PREPARE_TRX_LNS_TBL(
2659: x_return_status
2660: ,l_num_cnt
2661: --start: | 02-APR-07 cklee R12 Billing enhancement project |
2663: -- ,r_xsiv_rec
2664: -- ,r_xlsv_rec
2665: --end: | 02-APR-07 cklee R12 Billing enhancement project |
2666: ,l_trx_lines_tbl );
2667: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Done Preparing Trx Lines tbl '||l_num_cnt);
2668:
2669: IF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
2670: OKL_API.SET_MESSAGE(p_app_name => 'OKL',
2671: p_msg_name => 'OKL_BPD_RTA_REC_ERR',
2691:
2692: l_tax_indx := l_trx_lines_tbl.count + 1;
2693: l_tax_line_number := l_tax_line_number + 1;
2694:
2695: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Preparing Trx Tax Lines tbl '||(l_num_cnt + l_tax_line_number));
2696: --
2697: l_trx_lines_tbl(l_tax_indx).trx_header_id := 110;
2698: l_trx_lines_tbl(l_tax_indx).trx_line_id := (l_num_cnt + l_tax_line_number);
2699: l_trx_lines_tbl(l_tax_indx).link_to_trx_line_id := l_num_cnt;
2726: l_trx_lines_tbl(l_tax_indx).TAX_EXEMPTION_ID := NULL;
2727: l_trx_lines_tbl(l_tax_indx).VAT_TAX_ID := xfer_tax_rec.TAX_RATE_ID;
2728: --
2729:
2730: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Done Preparing Trx Tax Lines tbl '||(l_num_cnt + l_tax_line_number));
2731: END LOOP;
2732: --Bug# 4488818: Sales Tax Billing
2733: */
2734: --end: | 02-APR-07 cklee R12 Billing enhancement project |
2737: -- Prepare trx distributions tbl
2738: ---------------------------------------
2739: l_trx_dist_tbl := l_init_trx_dist_tbl;
2740:
2741: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Preparing Trx Dist tbl '||l_num_cnt);
2742: PREPARE_TRX_DIST_TBL(
2743: x_return_status
2744: ,l_num_cnt
2745: --start: | 02-APR-07 cklee R12 Billing enhancement project |
2747: -- ,r_xsiv_rec
2748: -- ,r_xlsv_rec
2749: --end: | 02-APR-07 cklee R12 Billing enhancement project |
2750: ,l_trx_dist_tbl );
2751: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Done Preparing trx dist tbl '||l_num_cnt);
2752:
2753: IF (x_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
2754: OKL_API.SET_MESSAGE(p_app_name => 'OKL',
2755: p_msg_name => 'OKL_BPD_RTA_REC_ERR',
2781:
2782: -----------------------------
2783: -- Create AR Invoice
2784: -----------------------------
2785: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Invoking Invoice API for'
2786: ||' Contract Number '||xfer_rec.CONTRACT_NUMBER
2787: ||',Stream Type '||xfer_rec.STREAM_TYPE
2788: ||',Invoice Date '||xfer_rec.TRX_DATE
2789: ||',Currency Code '||xfer_rec.CURRENCY_CODE);
2786: ||' Contract Number '||xfer_rec.CONTRACT_NUMBER
2787: ||',Stream Type '||xfer_rec.STREAM_TYPE
2788: ||',Invoice Date '||xfer_rec.TRX_DATE
2789: ||',Currency Code '||xfer_rec.CURRENCY_CODE);
2790: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Before calling invoice Api ');
2791:
2792: -- Establish Savepoint for rollback
2793: DBMS_TRANSACTION.SAVEPOINT('AR_INVOICE_API_PVT');
2794: -- Savepoint established
2859: -- End comment
2860:
2861: --rkuttiya adding debug messages for getting values of attributes passed to
2862: --
2863: FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'Batch Source Id '||l_batch_source_rec.batch_source_id);
2864: FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'Default Date '||
2865: l_batch_source_rec.default_date);
2866:
2867: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Header Id :
2860:
2861: --rkuttiya adding debug messages for getting values of attributes passed to
2862: --
2863: FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'Batch Source Id '||l_batch_source_rec.batch_source_id);
2864: FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'Default Date '||
2865: l_batch_source_rec.default_date);
2866:
2867: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Header Id :
2868: '||l_trx_header_tbl(1).trx_header_id);
2863: FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'Batch Source Id '||l_batch_source_rec.batch_source_id);
2864: FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'Default Date '||
2865: l_batch_source_rec.default_date);
2866:
2867: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Header Id :
2868: '||l_trx_header_tbl(1).trx_header_id);
2869: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Number :
2870: '||l_trx_header_tbl(1).trx_number);
2871: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Date :'||l_trx_header_tbl(1).trx_date);
2865: l_batch_source_rec.default_date);
2866:
2867: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Header Id :
2868: '||l_trx_header_tbl(1).trx_header_id);
2869: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Number :
2870: '||l_trx_header_tbl(1).trx_number);
2871: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Date :'||l_trx_header_tbl(1).trx_date);
2872: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Currency
2873: :'||l_trx_header_tbl(1).trx_currency);
2867: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Header Id :
2868: '||l_trx_header_tbl(1).trx_header_id);
2869: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Number :
2870: '||l_trx_header_tbl(1).trx_number);
2871: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Date :'||l_trx_header_tbl(1).trx_date);
2872: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Currency
2873: :'||l_trx_header_tbl(1).trx_currency);
2874: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Receipt Method Id : '||
2875: l_trx_header_tbl(1).receipt_method_id);
2868: '||l_trx_header_tbl(1).trx_header_id);
2869: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Number :
2870: '||l_trx_header_tbl(1).trx_number);
2871: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Date :'||l_trx_header_tbl(1).trx_date);
2872: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Currency
2873: :'||l_trx_header_tbl(1).trx_currency);
2874: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Receipt Method Id : '||
2875: l_trx_header_tbl(1).receipt_method_id);
2876: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Payment Trxn Extn Id :
2870: '||l_trx_header_tbl(1).trx_number);
2871: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx Date :'||l_trx_header_tbl(1).trx_date);
2872: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Currency
2873: :'||l_trx_header_tbl(1).trx_currency);
2874: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Receipt Method Id : '||
2875: l_trx_header_tbl(1).receipt_method_id);
2876: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Payment Trxn Extn Id :
2877: '||l_trx_header_tbl(1).payment_trxn_extension_id);
2878: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Customer Bank Account Id
2872: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Trx_Currency
2873: :'||l_trx_header_tbl(1).trx_currency);
2874: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Receipt Method Id : '||
2875: l_trx_header_tbl(1).receipt_method_id);
2876: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Payment Trxn Extn Id :
2877: '||l_trx_header_tbl(1).payment_trxn_extension_id);
2878: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Customer Bank Account Id
2879: :'||l_trx_header_tbl(1).customer_bank_account_id);
2880: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Customer Id:
2874: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Receipt Method Id : '||
2875: l_trx_header_tbl(1).receipt_method_id);
2876: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Payment Trxn Extn Id :
2877: '||l_trx_header_tbl(1).payment_trxn_extension_id);
2878: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Customer Bank Account Id
2879: :'||l_trx_header_tbl(1).customer_bank_account_id);
2880: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Customer Id:
2881: '||l_trx_header_tbl(1).bill_to_customer_id);
2882: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Address Id:
2876: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Payment Trxn Extn Id :
2877: '||l_trx_header_tbl(1).payment_trxn_extension_id);
2878: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Customer Bank Account Id
2879: :'||l_trx_header_tbl(1).customer_bank_account_id);
2880: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Customer Id:
2881: '||l_trx_header_tbl(1).bill_to_customer_id);
2882: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Address Id:
2883: '||l_trx_header_tbl(1).bill_to_address_id);
2884: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to customer id:
2878: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Customer Bank Account Id
2879: :'||l_trx_header_tbl(1).customer_bank_account_id);
2880: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Customer Id:
2881: '||l_trx_header_tbl(1).bill_to_customer_id);
2882: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Address Id:
2883: '||l_trx_header_tbl(1).bill_to_address_id);
2884: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to customer id:
2885: '||l_trx_header_tbl(1).ship_to_customer_id);
2886: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to address id:
2880: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Customer Id:
2881: '||l_trx_header_tbl(1).bill_to_customer_id);
2882: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Address Id:
2883: '||l_trx_header_tbl(1).bill_to_address_id);
2884: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to customer id:
2885: '||l_trx_header_tbl(1).ship_to_customer_id);
2886: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to address id:
2887: '||l_trx_header_tbl(1).ship_to_address_id);
2888: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Org Id: '||l_trx_header_tbl(1).org_id);
2882: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Bill to Address Id:
2883: '||l_trx_header_tbl(1).bill_to_address_id);
2884: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to customer id:
2885: '||l_trx_header_tbl(1).ship_to_customer_id);
2886: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to address id:
2887: '||l_trx_header_tbl(1).ship_to_address_id);
2888: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Org Id: '||l_trx_header_tbl(1).org_id);
2889: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Legal Entity Id:
2890: '||l_trx_header_tbl(1).legal_entity_id);
2884: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to customer id:
2885: '||l_trx_header_tbl(1).ship_to_customer_id);
2886: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to address id:
2887: '||l_trx_header_tbl(1).ship_to_address_id);
2888: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Org Id: '||l_trx_header_tbl(1).org_id);
2889: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Legal Entity Id:
2890: '||l_trx_header_tbl(1).legal_entity_id);
2891: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Billing Date
2892: :'||l_trx_header_tbl(1).billing_date);
2885: '||l_trx_header_tbl(1).ship_to_customer_id);
2886: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Ship to address id:
2887: '||l_trx_header_tbl(1).ship_to_address_id);
2888: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Org Id: '||l_trx_header_tbl(1).org_id);
2889: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Legal Entity Id:
2890: '||l_trx_header_tbl(1).legal_entity_id);
2891: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Billing Date
2892: :'||l_trx_header_tbl(1).billing_date);
2893: fnd_file.put_line(fnd_file.output,'Term Id: '||l_trx_header_tbl(1).term_id);
2887: '||l_trx_header_tbl(1).ship_to_address_id);
2888: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Org Id: '||l_trx_header_tbl(1).org_id);
2889: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Legal Entity Id:
2890: '||l_trx_header_tbl(1).legal_entity_id);
2891: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Billing Date
2892: :'||l_trx_header_tbl(1).billing_date);
2893: fnd_file.put_line(fnd_file.output,'Term Id: '||l_trx_header_tbl(1).term_id);
2894: fnd_file.put_line(fnd_file.output,'Comments" '||l_trx_header_tbl(1).comments);
2895:
2889: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Legal Entity Id:
2890: '||l_trx_header_tbl(1).legal_entity_id);
2891: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Billing Date
2892: :'||l_trx_header_tbl(1).billing_date);
2893: fnd_file.put_line(fnd_file.output,'Term Id: '||l_trx_header_tbl(1).term_id);
2894: fnd_file.put_line(fnd_file.output,'Comments" '||l_trx_header_tbl(1).comments);
2895:
2896: fnd_file.put_line(fnd_file.output,'Lines Table');
2897:
2890: '||l_trx_header_tbl(1).legal_entity_id);
2891: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Billing Date
2892: :'||l_trx_header_tbl(1).billing_date);
2893: fnd_file.put_line(fnd_file.output,'Term Id: '||l_trx_header_tbl(1).term_id);
2894: fnd_file.put_line(fnd_file.output,'Comments" '||l_trx_header_tbl(1).comments);
2895:
2896: fnd_file.put_line(fnd_file.output,'Lines Table');
2897:
2898: FOR i in l_trx_lines_tbl.FIRST..l_trx_lines_tbl.LAST LOOP
2892: :'||l_trx_header_tbl(1).billing_date);
2893: fnd_file.put_line(fnd_file.output,'Term Id: '||l_trx_header_tbl(1).term_id);
2894: fnd_file.put_line(fnd_file.output,'Comments" '||l_trx_header_tbl(1).comments);
2895:
2896: fnd_file.put_line(fnd_file.output,'Lines Table');
2897:
2898: FOR i in l_trx_lines_tbl.FIRST..l_trx_lines_tbl.LAST LOOP
2899: fnd_file.put_line(fnd_file.output,'Trx Header Id :'||
2900: l_trx_lines_tbl(i).trx_header_id);
2895:
2896: fnd_file.put_line(fnd_file.output,'Lines Table');
2897:
2898: FOR i in l_trx_lines_tbl.FIRST..l_trx_lines_tbl.LAST LOOP
2899: fnd_file.put_line(fnd_file.output,'Trx Header Id :'||
2900: l_trx_lines_tbl(i).trx_header_id);
2901: fnd_file.put_line(fnd_file.output,'Trx Line Id
2902: :'||l_trx_lines_tbl(i).trx_line_id);
2903: fnd_file.put_line(fnd_file.output,'Line
2897:
2898: FOR i in l_trx_lines_tbl.FIRST..l_trx_lines_tbl.LAST LOOP
2899: fnd_file.put_line(fnd_file.output,'Trx Header Id :'||
2900: l_trx_lines_tbl(i).trx_header_id);
2901: fnd_file.put_line(fnd_file.output,'Trx Line Id
2902: :'||l_trx_lines_tbl(i).trx_line_id);
2903: fnd_file.put_line(fnd_file.output,'Line
2904: Number:'||l_trx_lines_tbl(i).line_number);
2905: fnd_file.put_line(fnd_file.output,'Inventory Item
2899: fnd_file.put_line(fnd_file.output,'Trx Header Id :'||
2900: l_trx_lines_tbl(i).trx_header_id);
2901: fnd_file.put_line(fnd_file.output,'Trx Line Id
2902: :'||l_trx_lines_tbl(i).trx_line_id);
2903: fnd_file.put_line(fnd_file.output,'Line
2904: Number:'||l_trx_lines_tbl(i).line_number);
2905: fnd_file.put_line(fnd_file.output,'Inventory Item
2906: Id:'||l_trx_lines_tbl(i).inventory_item_id);
2907: fnd_file.put_line(fnd_file.output,'Quantity Ordered
2901: fnd_file.put_line(fnd_file.output,'Trx Line Id
2902: :'||l_trx_lines_tbl(i).trx_line_id);
2903: fnd_file.put_line(fnd_file.output,'Line
2904: Number:'||l_trx_lines_tbl(i).line_number);
2905: fnd_file.put_line(fnd_file.output,'Inventory Item
2906: Id:'||l_trx_lines_tbl(i).inventory_item_id);
2907: fnd_file.put_line(fnd_file.output,'Quantity Ordered
2908: :'||l_trx_lines_tbl(i).quantity_ordered);
2909: fnd_file.put_line(fnd_file.output,'unit standard
2903: fnd_file.put_line(fnd_file.output,'Line
2904: Number:'||l_trx_lines_tbl(i).line_number);
2905: fnd_file.put_line(fnd_file.output,'Inventory Item
2906: Id:'||l_trx_lines_tbl(i).inventory_item_id);
2907: fnd_file.put_line(fnd_file.output,'Quantity Ordered
2908: :'||l_trx_lines_tbl(i).quantity_ordered);
2909: fnd_file.put_line(fnd_file.output,'unit standard
2910: price:'||l_trx_lines_tbl(i).unit_standard_price);
2911: fnd_file.put_line(fnd_file.output,'unit selling price
2905: fnd_file.put_line(fnd_file.output,'Inventory Item
2906: Id:'||l_trx_lines_tbl(i).inventory_item_id);
2907: fnd_file.put_line(fnd_file.output,'Quantity Ordered
2908: :'||l_trx_lines_tbl(i).quantity_ordered);
2909: fnd_file.put_line(fnd_file.output,'unit standard
2910: price:'||l_trx_lines_tbl(i).unit_standard_price);
2911: fnd_file.put_line(fnd_file.output,'unit selling price
2912: '||l_trx_lines_tbl(i).unit_selling_price);
2913: fnd_file.put_line(fnd_file.output,'line type:'||l_trx_lines_tbl(i).line_type);
2907: fnd_file.put_line(fnd_file.output,'Quantity Ordered
2908: :'||l_trx_lines_tbl(i).quantity_ordered);
2909: fnd_file.put_line(fnd_file.output,'unit standard
2910: price:'||l_trx_lines_tbl(i).unit_standard_price);
2911: fnd_file.put_line(fnd_file.output,'unit selling price
2912: '||l_trx_lines_tbl(i).unit_selling_price);
2913: fnd_file.put_line(fnd_file.output,'line type:'||l_trx_lines_tbl(i).line_type);
2914: fnd_file.put_line(fnd_file.output,'Interface Line
2915: Context:'||l_trx_lines_tbl(i).interface_line_context);
2909: fnd_file.put_line(fnd_file.output,'unit standard
2910: price:'||l_trx_lines_tbl(i).unit_standard_price);
2911: fnd_file.put_line(fnd_file.output,'unit selling price
2912: '||l_trx_lines_tbl(i).unit_selling_price);
2913: fnd_file.put_line(fnd_file.output,'line type:'||l_trx_lines_tbl(i).line_type);
2914: fnd_file.put_line(fnd_file.output,'Interface Line
2915: Context:'||l_trx_lines_tbl(i).interface_line_context);
2916: fnd_file.put_line(fnd_file.output,'Interface Line Attribute6
2917: :'||l_trx_lines_tbl(i).interface_line_attribute6);
2910: price:'||l_trx_lines_tbl(i).unit_standard_price);
2911: fnd_file.put_line(fnd_file.output,'unit selling price
2912: '||l_trx_lines_tbl(i).unit_selling_price);
2913: fnd_file.put_line(fnd_file.output,'line type:'||l_trx_lines_tbl(i).line_type);
2914: fnd_file.put_line(fnd_file.output,'Interface Line
2915: Context:'||l_trx_lines_tbl(i).interface_line_context);
2916: fnd_file.put_line(fnd_file.output,'Interface Line Attribute6
2917: :'||l_trx_lines_tbl(i).interface_line_attribute6);
2918: fnd_file.put_line(fnd_file.output,'Interface Line Attribute7
2912: '||l_trx_lines_tbl(i).unit_selling_price);
2913: fnd_file.put_line(fnd_file.output,'line type:'||l_trx_lines_tbl(i).line_type);
2914: fnd_file.put_line(fnd_file.output,'Interface Line
2915: Context:'||l_trx_lines_tbl(i).interface_line_context);
2916: fnd_file.put_line(fnd_file.output,'Interface Line Attribute6
2917: :'||l_trx_lines_tbl(i).interface_line_attribute6);
2918: fnd_file.put_line(fnd_file.output,'Interface Line Attribute7
2919: :'||l_trx_lines_tbl(i).interface_line_attribute7);
2920: fnd_file.put_line(fnd_file.output,'Interface Line
2914: fnd_file.put_line(fnd_file.output,'Interface Line
2915: Context:'||l_trx_lines_tbl(i).interface_line_context);
2916: fnd_file.put_line(fnd_file.output,'Interface Line Attribute6
2917: :'||l_trx_lines_tbl(i).interface_line_attribute6);
2918: fnd_file.put_line(fnd_file.output,'Interface Line Attribute7
2919: :'||l_trx_lines_tbl(i).interface_line_attribute7);
2920: fnd_file.put_line(fnd_file.output,'Interface Line
2921: Attribute9:'||l_trx_lines_tbl(i).interface_line_Attribute9);
2922: fnd_file.put_line(fnd_file.output,'Interface Line
2916: fnd_file.put_line(fnd_file.output,'Interface Line Attribute6
2917: :'||l_trx_lines_tbl(i).interface_line_attribute6);
2918: fnd_file.put_line(fnd_file.output,'Interface Line Attribute7
2919: :'||l_trx_lines_tbl(i).interface_line_attribute7);
2920: fnd_file.put_line(fnd_file.output,'Interface Line
2921: Attribute9:'||l_trx_lines_tbl(i).interface_line_Attribute9);
2922: fnd_file.put_line(fnd_file.output,'Interface Line
2923: Attribute10:'||l_trx_lines_tbl(i).interfacE_line_attribute10);
2924: fnd_file.put_line(fnd_file.output,'Interface Line Attribute
2918: fnd_file.put_line(fnd_file.output,'Interface Line Attribute7
2919: :'||l_trx_lines_tbl(i).interface_line_attribute7);
2920: fnd_file.put_line(fnd_file.output,'Interface Line
2921: Attribute9:'||l_trx_lines_tbl(i).interface_line_Attribute9);
2922: fnd_file.put_line(fnd_file.output,'Interface Line
2923: Attribute10:'||l_trx_lines_tbl(i).interfacE_line_attribute10);
2924: fnd_file.put_line(fnd_file.output,'Interface Line Attribute
2925: 13:'||l_trx_lines_tbl(i).interfacE_line_Attribute13);
2926: fnd_file.put_line(fnd_file.output,'Interface Line Atribute14
2920: fnd_file.put_line(fnd_file.output,'Interface Line
2921: Attribute9:'||l_trx_lines_tbl(i).interface_line_Attribute9);
2922: fnd_file.put_line(fnd_file.output,'Interface Line
2923: Attribute10:'||l_trx_lines_tbl(i).interfacE_line_attribute10);
2924: fnd_file.put_line(fnd_file.output,'Interface Line Attribute
2925: 13:'||l_trx_lines_tbl(i).interfacE_line_Attribute13);
2926: fnd_file.put_line(fnd_file.output,'Interface Line Atribute14
2927: :'||l_trx_lines_tbl(i).interface_line_attribute14);
2928: fnd_file.put_line(fnd_file.output,'Amount :'||l_trx_lines_tbl(i).amount);
2922: fnd_file.put_line(fnd_file.output,'Interface Line
2923: Attribute10:'||l_trx_lines_tbl(i).interfacE_line_attribute10);
2924: fnd_file.put_line(fnd_file.output,'Interface Line Attribute
2925: 13:'||l_trx_lines_tbl(i).interfacE_line_Attribute13);
2926: fnd_file.put_line(fnd_file.output,'Interface Line Atribute14
2927: :'||l_trx_lines_tbl(i).interface_line_attribute14);
2928: fnd_file.put_line(fnd_file.output,'Amount :'||l_trx_lines_tbl(i).amount);
2929: fnd_file.put_line(fnd_file.output,'UOM Code :'||l_trx_lines_tbl(i).UOM_CODE);
2930: fnd_file.put_line(fnd_file.output,'Tax Exempt Flag
2924: fnd_file.put_line(fnd_file.output,'Interface Line Attribute
2925: 13:'||l_trx_lines_tbl(i).interfacE_line_Attribute13);
2926: fnd_file.put_line(fnd_file.output,'Interface Line Atribute14
2927: :'||l_trx_lines_tbl(i).interface_line_attribute14);
2928: fnd_file.put_line(fnd_file.output,'Amount :'||l_trx_lines_tbl(i).amount);
2929: fnd_file.put_line(fnd_file.output,'UOM Code :'||l_trx_lines_tbl(i).UOM_CODE);
2930: fnd_file.put_line(fnd_file.output,'Tax Exempt Flag
2931: :'||l_trx_lines_tbl(i).tax_exempt_flag);
2932:
2925: 13:'||l_trx_lines_tbl(i).interfacE_line_Attribute13);
2926: fnd_file.put_line(fnd_file.output,'Interface Line Atribute14
2927: :'||l_trx_lines_tbl(i).interface_line_attribute14);
2928: fnd_file.put_line(fnd_file.output,'Amount :'||l_trx_lines_tbl(i).amount);
2929: fnd_file.put_line(fnd_file.output,'UOM Code :'||l_trx_lines_tbl(i).UOM_CODE);
2930: fnd_file.put_line(fnd_file.output,'Tax Exempt Flag
2931: :'||l_trx_lines_tbl(i).tax_exempt_flag);
2932:
2933: End LOOP;
2926: fnd_file.put_line(fnd_file.output,'Interface Line Atribute14
2927: :'||l_trx_lines_tbl(i).interface_line_attribute14);
2928: fnd_file.put_line(fnd_file.output,'Amount :'||l_trx_lines_tbl(i).amount);
2929: fnd_file.put_line(fnd_file.output,'UOM Code :'||l_trx_lines_tbl(i).UOM_CODE);
2930: fnd_file.put_line(fnd_file.output,'Tax Exempt Flag
2931: :'||l_trx_lines_tbl(i).tax_exempt_flag);
2932:
2933: End LOOP;
2934:
2931: :'||l_trx_lines_tbl(i).tax_exempt_flag);
2932:
2933: End LOOP;
2934:
2935: fnd_file.put_line(fnd_file.output,'Distributions Table');
2936:
2937: FOR j in L_TRX_DIST_TBL.FIRST..L_TRX_DIST_TBL.LAST LOOP
2938: fnd_file.put_line(fnd_file.output,'Trx Dist Id :'||
2939: l_trx_dist_tbl(j).trx_dist_id);
2934:
2935: fnd_file.put_line(fnd_file.output,'Distributions Table');
2936:
2937: FOR j in L_TRX_DIST_TBL.FIRST..L_TRX_DIST_TBL.LAST LOOP
2938: fnd_file.put_line(fnd_file.output,'Trx Dist Id :'||
2939: l_trx_dist_tbl(j).trx_dist_id);
2940: fnd_file.put_line(fnd_file.output,'Trx Header Id
2941: :'||l_trx_dist_tbl(j).trx_line_id);
2942: fnd_file.put_line(fnd_file.output,'Trx Line Id
2936:
2937: FOR j in L_TRX_DIST_TBL.FIRST..L_TRX_DIST_TBL.LAST LOOP
2938: fnd_file.put_line(fnd_file.output,'Trx Dist Id :'||
2939: l_trx_dist_tbl(j).trx_dist_id);
2940: fnd_file.put_line(fnd_file.output,'Trx Header Id
2941: :'||l_trx_dist_tbl(j).trx_line_id);
2942: fnd_file.put_line(fnd_file.output,'Trx Line Id
2943: :'||l_trx_dist_tbl(j).trx_line_id);
2944: fnd_file.put_line(fnd_file.output,'Account class
2938: fnd_file.put_line(fnd_file.output,'Trx Dist Id :'||
2939: l_trx_dist_tbl(j).trx_dist_id);
2940: fnd_file.put_line(fnd_file.output,'Trx Header Id
2941: :'||l_trx_dist_tbl(j).trx_line_id);
2942: fnd_file.put_line(fnd_file.output,'Trx Line Id
2943: :'||l_trx_dist_tbl(j).trx_line_id);
2944: fnd_file.put_line(fnd_file.output,'Account class
2945: :'||l_trx_dist_tbl(j).account_class);
2946: fnd_file.put_line(fnd_file.output,'Amount
2940: fnd_file.put_line(fnd_file.output,'Trx Header Id
2941: :'||l_trx_dist_tbl(j).trx_line_id);
2942: fnd_file.put_line(fnd_file.output,'Trx Line Id
2943: :'||l_trx_dist_tbl(j).trx_line_id);
2944: fnd_file.put_line(fnd_file.output,'Account class
2945: :'||l_trx_dist_tbl(j).account_class);
2946: fnd_file.put_line(fnd_file.output,'Amount
2947: :'||l_trx_dist_tbl(j).amount);
2948: fnd_file.put_line(fnd_file.output,'acctd_amount
2942: fnd_file.put_line(fnd_file.output,'Trx Line Id
2943: :'||l_trx_dist_tbl(j).trx_line_id);
2944: fnd_file.put_line(fnd_file.output,'Account class
2945: :'||l_trx_dist_tbl(j).account_class);
2946: fnd_file.put_line(fnd_file.output,'Amount
2947: :'||l_trx_dist_tbl(j).amount);
2948: fnd_file.put_line(fnd_file.output,'acctd_amount
2949: :'||l_trx_dist_tbl(j).acctd_amount);
2950: fnd_file.put_line(fnd_file.output,'Percent
2944: fnd_file.put_line(fnd_file.output,'Account class
2945: :'||l_trx_dist_tbl(j).account_class);
2946: fnd_file.put_line(fnd_file.output,'Amount
2947: :'||l_trx_dist_tbl(j).amount);
2948: fnd_file.put_line(fnd_file.output,'acctd_amount
2949: :'||l_trx_dist_tbl(j).acctd_amount);
2950: fnd_file.put_line(fnd_file.output,'Percent
2951: '||l_trx_dist_tbl(j).percent);
2952: fnd_file.put_line(fnd_file.output,'Code Combination Id
2946: fnd_file.put_line(fnd_file.output,'Amount
2947: :'||l_trx_dist_tbl(j).amount);
2948: fnd_file.put_line(fnd_file.output,'acctd_amount
2949: :'||l_trx_dist_tbl(j).acctd_amount);
2950: fnd_file.put_line(fnd_file.output,'Percent
2951: '||l_trx_dist_tbl(j).percent);
2952: fnd_file.put_line(fnd_file.output,'Code Combination Id
2953: :'||l_trx_dist_tbl(j).code_combination_id);
2954: End LOOP;
2948: fnd_file.put_line(fnd_file.output,'acctd_amount
2949: :'||l_trx_dist_tbl(j).acctd_amount);
2950: fnd_file.put_line(fnd_file.output,'Percent
2951: '||l_trx_dist_tbl(j).percent);
2952: fnd_file.put_line(fnd_file.output,'Code Combination Id
2953: :'||l_trx_dist_tbl(j).code_combination_id);
2954: End LOOP;
2955:
2956: AR_INVOICE_API_PUB.create_single_invoice(
2965: x_return_status => l_return_status,
2966: x_msg_count => l_msg_count,
2967: x_msg_data => l_msg_data);
2968:
2969: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'After calling Invoice API'||
2970: l_return_status);
2971:
2972: x_ar_inv_tbl(l_num_cnt).receivables_invoice_id := l_customer_trx_id;
2973:
2975: -- cklee 4/4/07 note: set a proper error message!
2976: l_overall_err_sts := 'E';
2977: END IF;
2978:
2979: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'After calling Invoice API '||l_num_cnt
2980: ||'.. Assigned l_customer_trx_id = '||l_customer_trx_id|| ' ret sts '||l_return_status);
2981:
2982:
2983: -- Post Call Processing Block
2981:
2982:
2983: -- Post Call Processing Block
2984: FOR err_rec IN err_csr LOOP
2985: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Error_message: '||err_rec.error_message);
2986: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Invalid_value: '||err_rec.Invalid_value);
2987: END LOOP;
2988:
2989: IF (l_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
2982:
2983: -- Post Call Processing Block
2984: FOR err_rec IN err_csr LOOP
2985: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Error_message: '||err_rec.error_message);
2986: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Invalid_value: '||err_rec.Invalid_value);
2987: END LOOP;
2988:
2989: IF (l_return_status <> OKL_API.G_RET_STS_SUCCESS) THEN
2990: x_msg_count := l_msg_count;
2999:
3000: SELECT count(*) INTO l_cnt
3001: FROM ar_trx_errors_gt;
3002:
3003: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, ' Count is : '||l_cnt);
3004: IF l_cnt > 0 THEN
3005: l_err_cnt := 0;
3006: FOR ar_trx_rec IN ar_trx_errs_csr( 110 ) LOOP
3007: l_err_cnt := l_err_cnt + 1;
3080: --end: | 02-APR-07 cklee R12 Billing enhancement project |
3081:
3082: END LOOP; -- For each rec in XSI loop
3083:
3084: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Assigned Invoice Numbers: '||l_ar_inv_disp_num);
3085:
3086: -- -------------------------------------------------------
3087: -- Invoke Advance Receipts
3088: -- -------------------------------------------------------
3086: -- -------------------------------------------------------
3087: -- Invoke Advance Receipts
3088: -- -------------------------------------------------------
3089: IF p_source = 'ADVANCE_RECEIPTS' THEN
3090: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Begin: Apply Advance Receipts');
3091: OKL_BPD_ADVANCED_CASH_APP_PUB.ADVANCED_CASH_APP
3092: ( p_api_version => p_api_version
3093: ,p_init_msg_list => p_init_msg_list
3094: ,x_return_status => x_return_status
3100: -- ,p_contract_num => p_contract_number
3101: ,p_cross_currency_allowed => 'Y'
3102: );
3103:
3104: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'End: Apply Advance Receipts');
3105: END IF;
3106:
3107: IF p_source = 'PRINCIPAL_PAYDOWN' THEN
3108: x_return_status := l_overall_err_sts;
3128: -- Exception handling
3129: ------------------------------------------------------------
3130:
3131: WHEN Okl_Api.G_EXCEPTION_ERROR THEN
3132: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Error (EXCP) => '||SQLERRM);
3133: x_return_status := Okl_Api.HANDLE_EXCEPTIONS (
3134: p_api_name => l_api_name,
3135: p_pkg_name => G_PKG_NAME,
3136: p_exc_name => 'Okl_Api.G_RET_STS_ERROR',
3138: x_msg_data => x_msg_data,
3139: p_api_type => '_PVT');
3140:
3141: WHEN Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR THEN
3142: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Error (UNEXP) => '||SQLERRM);
3143: x_return_status := Okl_Api.HANDLE_EXCEPTIONS (
3144: p_api_name => l_api_name,
3145: p_pkg_name => G_PKG_NAME,
3146: p_exc_name => 'Okl_Api.G_RET_STS_UNEXP_ERROR',
3147: x_msg_count => x_msg_count,
3148: x_msg_data => x_msg_data,
3149: p_api_type => '_PVT');
3150: WHEN AR_API_CALL_EXCP THEN
3151: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Error (AR_API_CALL_EXCP) => '||SQLERRM);
3152: x_return_status := Okl_Api.HANDLE_EXCEPTIONS (
3153: p_api_name => 'AR_INVOICE_API',
3154: p_pkg_name => G_PKG_NAME,
3155: p_exc_name => 'Okl_Api.G_RET_STS_UNEXP_ERROR',
3157: x_msg_data => x_msg_data,
3158: p_api_type => '_PVT');
3159:
3160: WHEN OTHERS THEN
3161: FND_FILE.PUT_LINE (FND_FILE.OUTPUT, 'Error (OTHERS) => '||SQLERRM);
3162: x_return_status := Okl_Api.HANDLE_EXCEPTIONS (
3163: p_api_name => l_api_name,
3164: p_pkg_name => G_PKG_NAME,
3165: p_exc_name => 'OTHERS',