DECLARE
l_rec_pmt_int_asig iby_fndcpt_setup_pub.pmtinstrassignment_rec_type := NULL;
l_rec_payeecontext iby_disbursement_setup_pub.payeecontext_rec_type := NULL;
l_num_party_id NUMBER;
l_num_vendor_id NUMBER;
l_num_assign_id NUMBER;
l_num_acct_id NUMBER;
l_num_branch_id NUMBER;
l_chr_return_status VARCHAR2(200) := NULL;
l_num_msg_count NUMBER := 0;
l_chr_msg_data VARCHAR2(200) := NULL;
l_rec_response iby_fndcpt_common_pub.result_rec_type := NULL;
l_msg VARCHAR2(2000);
BEGIN
dbms_output.put_line('program start');
l_rec_pmt_int_asig.priority := 1;
l_rec_pmt_int_asig.start_date := SYSDATE;
l_rec_pmt_int_asig.instrument.instrument_type := 'BANKACCOUNT';
l_rec_pmt_int_asig.instrument.instrument_id := 224771;--iby_ext_bank_accounts_v.EXT_BANK_ACCOUNT_ID
l_rec_payeecontext.party_id := 12182106;--l_num_party_id; --ap_suppliers.party_id
l_rec_payeecontext.payment_function := 'PAYABLES_DISB';
l_rec_payeecontext.org_type := 'OPERATING_UNIT';
l_rec_payeecontext.org_id := 142;
l_rec_payeecontext.party_site_id :=10582852;--ap_supplier_sites_all.party_site_id
l_rec_payeecontext.supplier_site_id :=1867031;--ap_supplier_sites_all.vendor_site_id
/*l_rec_payeecontext.org_type := NULL;--'OPERATING_UNIT';
l_rec_payeecontext.org_id := NULL;--142;--82;
l_rec_payeecontext.party_site_id := NULL;--10576832;--site_rec.party_site_id;
l_rec_payeecontext.supplier_site_id := NULL;--1857039;--site_rec.vendor_site_id; */
dbms_output.put_line('api start');
iby_disbursement_setup_pub.set_payee_instr_assignment
(p_api_version => 1,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_true,
x_return_status=> l_chr_return_status,
x_msg_count => l_num_msg_count,
x_msg_data => l_chr_msg_data,
p_payee => l_rec_payeecontext,
p_assignment_attribs => l_rec_pmt_int_asig,
x_assign_id => l_num_assign_id,
x_response => l_rec_response);
COMMIT;
dbms_output.put_line('l_chr_return_status' || l_chr_return_status);
dbms_output.put_line('l_num_msg_count.' || l_num_msg_count);
dbms_output.put_line('l_chr_msg_data.' || l_chr_msg_data);
dbms_output.put_line('l_num_assign_id' || l_num_assign_id);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('main exception.');
END;
Script output
------------------------------
program start
api start
l_chr_return_statusS
l_num_msg_count.1
l_chr_msg_data.IBY
l_num_assign_id:10239388
Query
-----------------------------
select * from IBY_PMT_INSTR_USES_ALL where
--INSTRUMENT_ID =224771
INSTRUMENT_PAYMENT_USE_ID=10239388
Note: Record will be inserted into IBY_PMT_INSTR_USES_ALL table.
Assign bank to supplier level then pass below parameters to NULL.
l_rec_payeecontext.org_type := NULL;
l_rec_payeecontext.org_id := NULL;
l_rec_payeecontext.party_site_id := NULL;
l_rec_payeecontext.supplier_site_id := NULL;
No comments:
Post a Comment