--创建分行地址api
DECLARE
l_location_rec hz_location_v2pub.location_rec_type;
l_party_site_rec hz_party_site_v2pub.party_site_rec_type;
x_location_id NUMBER;
x_party_site_id NUMBER;
x_party_site_number NUMBER;
x_return_status VARCHAR2(10);
x_msg_count NUMBER;
x_msg_data VARCHAR2(4000);
BEGIN
--init
fnd_msg_pub.initialize;
l_location_rec.country := 'CN'; --国家
l_location_rec.address1 := '测试地址1';
l_location_rec.address2 := NULL;
l_location_rec.address3 := NULL;
l_location_rec.address4 := NULL;
l_location_rec.city := '深圳市'; --城市
l_location_rec.postal_code := '10086'; --邮编
l_location_rec.state := NULL; --州
l_location_rec.province := NULL; --省
l_location_rec.county := NULL; --县
l_location_rec.created_by_module := 'HZ_CPUI'; --查找类型 HZ_CREATED_BY_MODULES 中定义的值
-- Call the procedure
hz_location_v2pub.create_location(p_init_msg_list => 'F',
p_location_rec => l_location_rec,
x_location_id => x_location_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
dbms_output.put_line('x_location_id:' || x_location_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);
dbms_output.put_line('');
IF x_msg_count > 0 THEN
FOR i IN 1 .. x_msg_count LOOP
dbms_output.put_line(fnd_msg_pub.get(i, 'F'));
END LOOP;
END IF;
IF x_return_status <> 'S' THEN
RETURN;
END IF;
l_party_site_rec.party_id := 5057;
l_party_site_rec.location_id := x_location_id;
l_party_site_rec.identifying_address_flag := 'Y';
l_party_site_rec.status := 'A';
l_party_site_rec.created_by_module := 'HZ_CPUI';
-- Call the procedure
hz_bank_pub.create_bank_site(p_init_msg_list => 'F',
p_party_site_rec => l_party_site_rec,
x_party_site_id => x_party_site_id,
x_party_site_number => x_party_site_number,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
dbms_output.put_line('x_party_site_id:' || x_party_site_id);
dbms_output.put_line('x_party_site_number:' || x_party_site_number);
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);
dbms_output.put_line('');
IF x_msg_count > 0 THEN
FOR i IN 1 .. x_msg_count LOOP
dbms_output.put_line(fnd_msg_pub.get(i, 'F'));
END LOOP;
END IF;
--IF x_return_status = 'S' THEN
--COMMIT;
--END IF;
END;
【CE】创建分行地址API
猜你喜欢
转载自blog.csdn.net/qingshimoon4/article/details/114122696
今日推荐
周排行