OEBS API: Создание расчетного счета на отделении поставщика
20 Ноябрь 2012
Нет комментариев
Пример скрипта для создания расчетного счета на отделении поставщика:
DECLARE l_bank_acct_rec apps.iby_ext_bankacct_pub.extbankacct_rec_type; out_mesg apps.iby_fndcpt_common_pub.result_rec_type; l_acct NUMBER; l_bank_id NUMBER := 0; --!!! установить значение l_branch_id NUMBER := 0; --!!! l_acct_owner_party_id NUMBER := 0; --!!! l_supplier_site_id NUMBER := 0; --!!! l_party_site_id NUMBER := 0; --!!! -- x_return_status VARCHAR2(1); x_msg_count NUMBER; x_msg_data VARCHAR2(4000); BEGIN FND_MSG_PUB.initialize; fnd_global.apps_initialize(1, 20639, 200); --Диспетчер кредиторов - Кредиторы l_bank_acct_rec.bank_id := l_bank_id; l_bank_acct_rec.branch_id := l_branch_id; l_bank_acct_rec.country_code := 'RU'; l_bank_acct_rec.bank_account_name := '3321615678101831567890'; l_bank_acct_rec.bank_account_num := 3321615678101831567890; l_bank_acct_rec.acct_owner_party_id := l_acct_owner_party_id; l_bank_acct_rec.currency := 'RUB'; l_bank_acct_rec.object_version_number := 1.0; l_bank_acct_rec.start_date := sysdate; l_bank_acct_rec.foreign_payment_use_flag := 'Y'; l_bank_acct_rec.payment_factor_flag := 'N'; apps.iby_ext_bankacct_pub.create_ext_bank_acct(p_api_version => 1.0, p_init_msg_list => 'F', p_ext_bank_acct_rec => l_bank_acct_rec, p_association_level => 'SS', p_supplier_site_id => l_supplier_site_id, p_party_site_id => l_party_site_id, p_org_id => 82, p_org_type => 'OPERATING_UNIT', x_acct_id => l_acct, x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data, x_response => out_mesg); COMMIT; dbms_output.put_line('x_return_status='||x_return_status); dbms_output.put_line('out_mesg.Result_Code ='||out_mesg.Result_Code); dbms_output.put_line('out_mesg.Result_Category ='||out_mesg.Result_Category); dbms_output.put_line('out_mesg.Result_Message ='||out_mesg.Result_Message); if x_return_status <> 'S' THEN fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data); dbms_output.put_line(chr(10)||'x_msg_count='||x_msg_count); if x_msg_count = 1 then dbms_output.put_line(x_msg_data); else FOR i IN 1 .. x_msg_count LOOP dbms_output.put_line(fnd_msg_pub.get(fnd_msg_pub.g_next, fnd_api.g_false)); END LOOP; end if; end if; end;
Последние комментарии