-- 增加行
DECLARE
v_row_id VARCHAR2(1000);
v_line_number number;
g_user_id CONSTANT NUMBER := fnd_global.user_id;
g_login_id CONSTANT NUMBER := fnd_global.conc_login_id;
g_request_id CONSTANT NUMBER := fnd_global.conc_request_id;
g_prog_appl_id CONSTANT NUMBER := fnd_global.prog_appl_id;
g_conc_program_id CONSTANT NUMBER := fnd_global.conc_program_id;
x_ccid number;
BEGIN
select max(line_number)
into v_line_number
from AP_INVOICE_LINES_ALL
where invoice_id = 123000;
cux_cuxaprebate_utl.create_account(p_org_id =>106,
p_ccid =>3036,
x_ccid =>x_ccid);
ap_ail_table_handler_pkg.insert_row(p_rowid => v_row_id,
p_invoice_id => 123000,
p_line_number => v_line_number + 1,
p_line_type_lookup_code => 'MISCELLANEOUS',--杂项
p_line_group_number => NULL,
p_requester_id => NULL,
p_description => NULL,
p_line_source => NULL,
p_org_id => NULL,
p_inventory_item_id => NULL,
p_item_description => NULL,
p_serial_number => NULL,
p_manufacturer => NULL,
p_model_number => NULL,
p_warranty_number => NULL,
p_generate_dists => NULL,
p_match_type => NULL,
p_distribution_set_id => NULL,
p_account_segment => NULL,
p_balancing_segment => NULL,
p_cost_center_segment => NULL,
p_overlay_dist_code_concat => NULL,
p_default_dist_ccid => x_ccid,--ccid
p_prorate_across_all_items => NULL,
p_accounting_date => sysdate,--gl_date
p_period_name => NULL,
p_deferred_acctg_flag => NULL,
p_def_acctg_start_date => NULL,
p_def_acctg_end_date => NULL,
p_def_acctg_number_of_periods => NULL,
p_def_acctg_period_type => NULL,
p_set_of_books_id => 2021,--
p_amount => 2,--金额
p_base_amount => NULL,
p_rounding_amt => NULL,
p_quantity_invoiced => NULL,
p_unit_meas_lookup_code => NULL,
p_unit_price => NULL,
p_wfapproval_status => 'NOT REQUIRED',--
p_discarded_flag => NULL,
p_original_amount => NULL,
p_original_base_amount => NULL,
p_original_rounding_amt => NULL,
p_cancelled_flag => NULL,
p_income_tax_region => NULL,
p_type_1099 => NULL,
p_stat_amount => NULL,
p_prepay_invoice_id => NULL,
p_prepay_line_number => NULL,
p_invoice_includes_prepay_flag => NULL,
p_corrected_inv_id => NULL,
p_corrected_line_number => NULL,
p_po_header_id => NULL,
p_po_line_id => NULL,
p_po_release_id => NULL,
p_po_l