API to create bank branch in Oracle AP R12
Important Note: Please visit my post
'API to create bank in Oracle Applications R12' in this blog to know how to create bank in Oracle Applications.
'API to create bank account in Oracle Applications R12' in this blog to know how to create bank account in Oracle Applications.
'API to associate bank account to supplier site in Oracle Applications R12' in this blog to know how to associate created bank account to supllier site.
--Declaration
x_msg_count NUMBER;
x_bank_id NUMBER;
v_return_status_account VARCHAR2 (100);
x_response_rec iby_fndcpt_common_pub.result_rec_type;
x_msg_data VARCHAR2 (2000);
x_error_message VARCHAR2 (2000);
--r_ext_bank_branch_rec this is record type
--CHECK BRANCH OF THAT BANK OR NOT by passing branch number
SELECT COUNT (1), branch_party_id,bank_party_id
INTO x_bank_branch_count, v_branch_party_id,v_bank_party_id
FROM iby_ext_bank_branches_v
WHERE UPPER (branch_number) = UPPER(c_validate_vendor_site_rec.branch_number )
GROUP BY branch_party_id, bank_party_id;
iby_ext_bankacct_pub.create_ext_bank_branch
(p_api_version => 1.0,
p_init_msg_list => fnd_api.g_true,
p_ext_bank_branch_rec => r_ext_bank_branch_rec,
x_branch_id => x_branch_id,
x_return_status => v_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_response => x_response_rec
);
COMMIT;
IF v_return_status_account <> 'S'
THEN
--error
--print error message or use x_msg_data
x_error_message:=fnd_msg_pub.get_detail (x_msg_count, 'F' );
FOR i IN x_msg_count .. 1
LOOP
fnd_msg_pub.delete_msg (i);
END LOOP;
else
--success
end if;
No comments:
Post a Comment