15: g_errbuf VARCHAR2(500);
16: g_retcode NUMBER := 0;
17: g_customer_id NUMBER; --ra_customer_trx_all.bill_to_customer_id%TYPE;
18: g_currency VARCHAR2(30):='USD'; --ra_customer_trx_all.invoice_currency_code%TYPE;
19: g_coll_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
20: g_rec_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
21: g_coll_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
22: g_rec_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
23: g_coll_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
16: g_retcode NUMBER := 0;
17: g_customer_id NUMBER; --ra_customer_trx_all.bill_to_customer_id%TYPE;
18: g_currency VARCHAR2(30):='USD'; --ra_customer_trx_all.invoice_currency_code%TYPE;
19: g_coll_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
20: g_rec_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
21: g_coll_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
22: g_rec_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
23: g_coll_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
24: g_rec_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
17: g_customer_id NUMBER; --ra_customer_trx_all.bill_to_customer_id%TYPE;
18: g_currency VARCHAR2(30):='USD'; --ra_customer_trx_all.invoice_currency_code%TYPE;
19: g_coll_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
20: g_rec_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
21: g_coll_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
22: g_rec_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
23: g_coll_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
24: g_rec_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
25: g_trx_coll_hdr_id NUMBER;
18: g_currency VARCHAR2(30):='USD'; --ra_customer_trx_all.invoice_currency_code%TYPE;
19: g_coll_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
20: g_rec_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
21: g_coll_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
22: g_rec_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
23: g_coll_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
24: g_rec_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
25: g_trx_coll_hdr_id NUMBER;
26: g_trx_rec_hdr_id NUMBER;
19: g_coll_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
20: g_rec_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
21: g_coll_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
22: g_rec_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
23: g_coll_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
24: g_rec_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
25: g_trx_coll_hdr_id NUMBER;
26: g_trx_rec_hdr_id NUMBER;
27: g_header_printed BOOLEAN := FALSE;
20: g_rec_hdr_tbl ar_invoice_api_pub.trx_header_tbl_type;
21: g_coll_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
22: g_rec_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
23: g_coll_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
24: g_rec_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
25: g_trx_coll_hdr_id NUMBER;
26: g_trx_rec_hdr_id NUMBER;
27: g_header_printed BOOLEAN := FALSE;
28: i INTEGER := 0;
53: GET_SEGMENTS_EXCEP EXCEPTION;
54: GET_QUALIFIER_SEGNUM_EXCEP EXCEPTION;
55: GET_COMBINATION_ID_EXCEP EXCEPTION;
56:
57: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
58: g_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type;
59: g_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
60: g_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
61: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
54: GET_QUALIFIER_SEGNUM_EXCEP EXCEPTION;
55: GET_COMBINATION_ID_EXCEP EXCEPTION;
56:
57: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
58: g_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type;
59: g_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
60: g_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
61: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
62: l_return_status varchar2(250);
55: GET_COMBINATION_ID_EXCEP EXCEPTION;
56:
57: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
58: g_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type;
59: g_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
60: g_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
61: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
62: l_return_status varchar2(250);
63: l_msg_count number;
56:
57: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
58: g_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type;
59: g_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
60: g_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
61: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
62: l_return_status varchar2(250);
63: l_msg_count number;
64: l_msg_data varchar2(2000);
57: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
58: g_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type;
59: g_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type;
60: g_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type;
61: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
62: l_return_status varchar2(250);
63: l_msg_count number;
64: l_msg_data varchar2(2000);
65: l_customer_trx_id number;
69: p_level IN NUMBER,
70: p_procedure_name IN VARCHAR2,
71: p_debug_info IN VARCHAR2);
72:
73: PROCEDURE Create_AR_Trx(p_trx_header_tbl IN ar_invoice_api_pub.trx_header_tbl_type,
74: p_trx_lines_tbl IN ar_invoice_api_pub.trx_line_tbl_type,
75: p_trx_dist_tbl IN ar_invoice_api_pub.trx_dist_tbl_type);
76:
77: PROCEDURE create_header(p_trx_type IN VARCHAR2);
70: p_procedure_name IN VARCHAR2,
71: p_debug_info IN VARCHAR2);
72:
73: PROCEDURE Create_AR_Trx(p_trx_header_tbl IN ar_invoice_api_pub.trx_header_tbl_type,
74: p_trx_lines_tbl IN ar_invoice_api_pub.trx_line_tbl_type,
75: p_trx_dist_tbl IN ar_invoice_api_pub.trx_dist_tbl_type);
76:
77: PROCEDURE create_header(p_trx_type IN VARCHAR2);
78:
71: p_debug_info IN VARCHAR2);
72:
73: PROCEDURE Create_AR_Trx(p_trx_header_tbl IN ar_invoice_api_pub.trx_header_tbl_type,
74: p_trx_lines_tbl IN ar_invoice_api_pub.trx_line_tbl_type,
75: p_trx_dist_tbl IN ar_invoice_api_pub.trx_dist_tbl_type);
76:
77: PROCEDURE create_header(p_trx_type IN VARCHAR2);
78:
79: PROCEDURE create_line_dist(p_trx_type IN VARCHAR2,
616: p_debug_info);
617: END IF;
618: END log;
619: -------------------------------------------------------------------------------
620: PROCEDURE Create_AR_Trx(p_trx_header_tbl IN ar_invoice_api_pub.trx_header_tbl_type,
621: p_trx_lines_tbl IN ar_invoice_api_pub.trx_line_tbl_type,
622: p_trx_dist_tbl IN ar_invoice_api_pub.trx_dist_tbl_type)
623:
624: IS
617: END IF;
618: END log;
619: -------------------------------------------------------------------------------
620: PROCEDURE Create_AR_Trx(p_trx_header_tbl IN ar_invoice_api_pub.trx_header_tbl_type,
621: p_trx_lines_tbl IN ar_invoice_api_pub.trx_line_tbl_type,
622: p_trx_dist_tbl IN ar_invoice_api_pub.trx_dist_tbl_type)
623:
624: IS
625: l_module VARCHAR2(240) := g_module_name||'Create_AR_Trx';
618: END log;
619: -------------------------------------------------------------------------------
620: PROCEDURE Create_AR_Trx(p_trx_header_tbl IN ar_invoice_api_pub.trx_header_tbl_type,
621: p_trx_lines_tbl IN ar_invoice_api_pub.trx_line_tbl_type,
622: p_trx_dist_tbl IN ar_invoice_api_pub.trx_dist_tbl_type)
623:
624: IS
625: l_module VARCHAR2(240) := g_module_name||'Create_AR_Trx';
626: l_debug_info VARCHAR2(240);
632: l_msg_count number;
633: l_msg_data varchar2(2000);
634: l_customer_trx_id number;
635: l_cnt number := 0;
636: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
637: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
638:
639: l_reimb_agree_num VARCHAR2(50);
640: l_api_version CONSTANT NUMBER := 1.0;
633: l_msg_data varchar2(2000);
634: l_customer_trx_id number;
635: l_cnt number := 0;
636: l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type;
637: l_trx_salescredits_tbl ar_invoice_api_pub.trx_salescredits_tbl_type;
638:
639: l_reimb_agree_num VARCHAR2(50);
640: l_api_version CONSTANT NUMBER := 1.0;
641:
736: l_batch_source_rec.batch_source_id :=g_trx_source_id;
737: log(C_STATE_LEVEL, l_module, 'g_trx_source_id: '||l_batch_source_rec.batch_source_id);
738:
739:
740: AR_INVOICE_API_PUB.create_single_invoice(
741: p_api_version => l_api_version,
742: p_init_msg_list => FND_API.G_TRUE,
743: p_commit => FND_API.G_FALSE,
744: p_batch_source_rec => l_batch_source_rec,