时间:2021-07-01 10:21:17 帮助过:95人阅读
创建银行
-- Create Bank DECLARE p_init_msg_list VARCHAR2(200); p_country_code VARCHAR2(200); p_bank_name VARCHAR2(200); p_bank_number VARCHAR2(200); p_alternate_bank_name VARCHAR2(200); p_short_bank_name VARCHAR2(200); p_description VARCHAR2(200); p_tax_payer_id VARCHAR2(200); p_tax_registration_number VARCHAR2(200); x_bank_id NUMBER; x_return_status VARCHAR2(200); x_msg_count NUMBER; x_msg_data VARCHAR2(200); p_count NUMBER; BEGIN p_init_msg_list := fnd_api.g_true; p_country_code := ‘US‘; p_bank_name := ‘Bank1‘; p_bank_number := ‘123‘; p_alternate_bank_name := ‘Alternate Test Bank‘; p_short_bank_name := ‘B1‘; p_description := ‘Test Bank Creation API‘; ce_bank_pub.create_bank(p_init_msg_list => p_init_msg_list ,p_country_code => p_country_code ,p_bank_name => p_bank_name ,p_bank_number => p_bank_number ,p_alternate_bank_name => p_alternate_bank_name ,p_short_bank_name => p_short_bank_name ,p_description => p_description ,x_bank_id => x_bank_id ,x_return_status => x_return_status ,x_msg_count => x_msg_count ,x_msg_data => x_msg_data); dbms_output.put_line(‘BANK_ID/PARTY_ID = ‘ || x_bank_id); dbms_output.put_line(‘X_RETURN_STATUS = ‘ || x_return_status); dbms_output.put_line(‘X_MSG_COUNT = ‘ || x_msg_count); dbms_output.put_line(‘X_MSG_DATA = ‘ || x_msg_data); IF x_msg_count = 1 THEN dbms_output.put_line(‘x_msg_data ‘ || x_msg_data); ELSIF x_msg_count > 1 THEN LOOP p_count := p_count + 1; x_msg_data := fnd_msg_pub.get(fnd_msg_pub.g_next ,fnd_api.g_false); IF x_msg_data IS NULL THEN EXIT; END IF; dbms_output.put_line(‘Message‘ || p_count || ‘ ---‘ || x_msg_data); END LOOP; END IF; END;
创建分行,也可用于创建供应商时创建的银行分行账户,在供应商创建一行环节,只能创建分行账户,银行账户是取系统已有的银行,换句话说,供应商处不能创建银行只能创建分行。
--创建供应商银行分行 created by jenrry 20170419 DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; l_msg_data VARCHAR2(1000); l_bank_rec hz_bank_pub.bank_rec_type := hz_bank_pub.g_miss_bank_rec; l_orga_rec hz_party_v2pub.organization_rec_type := hz_party_v2pub.g_miss_organization_rec; l_party_rec hz_party_v2pub.party_rec_type := hz_party_v2pub.g_miss_party_rec; p_bank_id number; x_party_id NUMBER; x_party_number hz_parties.party_number%TYPE; x_profile_id NUMBER; x_relationship_id NUMBER; x_rel_party_id NUMBER; x_rel_party_number hz_parties.party_number%TYPE; x_bitcode_assignment_id NUMBER; x_bbtcode_assignment_id NUMBER; x_rfccode_assignment_id NUMBER; x_pobject_version_number NUMBER; x_bbtobject_version_number NUMBER; x_rfcobject_version_number NUMBER; BEGIN fnd_global.apps_initialize(0, 50737, 20005); mo_global.init(‘SQLAP‘); l_orga_rec.organization_name := ‘酒仙桥支行‘; --支行名称 l_orga_rec.created_by_module := ‘CE‘; l_bank_rec.branch_type := ‘ABA‘; --分行类型 --l_bank_rec.bank_or_branch_number := ‘‘; --支行编号 l_bank_rec.inactive_date := fnd_api.g_miss_date; l_bank_rec.institution_type := ‘BANK_BRANCH‘; l_bank_rec.organization_rec := l_orga_rec; hz_bank_pub.create_bank_branch(p_init_msg_list => fnd_api.g_false, p_bank_rec => l_bank_rec, p_bank_party_id => 5050, x_party_id => x_party_id, x_party_number => x_party_number, x_profile_id => x_profile_id, x_relationship_id => x_relationship_id, x_rel_party_id => x_rel_party_id, x_rel_party_number => x_rel_party_number, x_bitcode_assignment_id => x_bitcode_assignment_id, x_bbtcode_assignment_id => x_bbtcode_assignment_id, x_rfccode_assignment_id => x_rfccode_assignment_id, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data); dbms_output.put_line(‘l_return_status:‘ || l_return_status); dbms_output.put_line(‘l_msg_count:‘ || l_msg_count); dbms_output.put_line(‘l_msg_data:‘ || l_msg_data); dbms_output.put_line(‘x_party_id:‘ || x_party_id); dbms_output.put_line(fnd_msg_pub.get_detail(1, ‘F‘)); END;
Oracle EBS 银行账户API
标签:turn oop lap number bit 名称 branch active str