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;
p_bank_id NUMBER;
p_branch_name VARCHAR2(200);
p_branch_number VARCHAR2(200);
p_branch_type VARCHAR2(200);
p_alternate_branch_name VARCHAR2(200);
p_rfc_identifier VARCHAR2(200);
x_branch_id NUMBER;
BEGIN
p_init_msg_list := fnd_api.g_true;
p_country_code := 'US';
p_bank_name := 'Test Bank5';
p_bank_number := '14258';
p_alternate_bank_name := 'Alternate Test Bank';
p_short_bank_name := 'IDFC';
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;
--
p_init_msg_list := fnd_api.g_true;
p_bank_id := x_bank_id; -- PARTY_ID of the BANK
p_branch_name := 'Test Branch';
p_alternate_branch_name := 'Alternate Branch Name';
p_description := 'TEST Branch description';
-- branch number/Routing Transit Number is subjected to
-- the check digit validation
p_branch_number := 111000025;
-- Validated against AR_LOOKUPS with lookup_type = BANK_BRANCH_TYPE
p_branch_type := 'SWIFT';
-- Validated against CE_LOOKUPS with lookup_type = RFC_IDENTIFIER
--p_rfc_identifier := 'AFC';
--
CE_BANK_PUB.CREATE_BANK_BRANCH(p_init_msg_list => p_init_msg_list,
p_bank_id => p_bank_id,
p_branch_name => p_branch_name,
p_branch_number => p_branch_number,
p_branch_type => p_branch_type,
p_alternate_branch_name => p_alternate_branch_name,
p_description => p_description,
p_rfc_identifier => p_rfc_identifier,
x_branch_id => x_branch_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
DBMS_OUTPUT.put_line('BRANCH_ID/PARTY_ID = ' || x_branch_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;
API创建银行-支行
最新推荐文章于 2023-07-14 14:46:15 发布