DECLARE l_return_status varchar2(1); p_count NUMBER; l_msg_count number; l_msg_data varchar2(2000); l_batch_id number; l_cnt number := 0; l_batch_source_rec ar_invoice_api_pub.batch_source_rec_type; l_trx_header_tbl ar_invoice_api_pub.trx_header_tbl_type; l_trx_lines_tbl ar_invoice_api_pub.trx_line_tbl_type; l_trx_dist_tbl ar_invoice_api_pub.trx_dist_tbl_type; l_trx_salescredits_tbl…