详解EBS接口开发之供应商导入补充-供应商地点增加实例

DECLARE
--v_org_id number;
v_vendor_interface_id NUMBER;
v_vendor_site_interface_id NUMBER; --接口表的id
v_vendor_contact_interface_id NUMBER; --接口表的id
v_temp_ext_bank_acct_id NUMBER;
v_org_id NUMBER; v_vendor_id NUMBER;
l_vendor_site_id NUMBER;
l_party_site_id NUMBER;
l_location_id NUMBER; l_result_rec iby_fndcpt_common_pub.result_rec_type;
l_bank_acct_id NUMBER;
l_return_status VARCHAR2(30);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
v_party_id NUMBER;
v_count_lov NUMBER;
v_vendor_num NUMBER;
g_vendor_count NUMBER;
g_vendor_site NUMBER;
g_vendor_contact NUMBER;
l_ext_bank_acct_rec iby_ext_bankacct_pub.extbankacct_rec_type; l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type; --根据批处理id取得多个ou,实现根据ou提交标准请求
CURSOR cur_ou IS --取得系统中所有OU
SELECT DISTINCT hr.organization_id org_id
--INTO l_org_id
FROM hr_operating_units hr,
gl_sets_of_books gsob,
financials_system_params_all fsp
WHERE hr.set_of_books_id = gsob.set_of_books_id
AND hr.organization_id = fsp.org_id;
BEGIN
FOR rec_ou IN cur_ou LOOP
v_org_id := NULL; --初始化ou
v_org_id := rec_ou.org_id;
/*IF l_debug = 'Y' THEN
cux_conc_utl.log_msg('v_org_id:' || v_org_id);
END IF;*/
mo_global.set_policy_context(p_access_mode => 'S',
p_org_id => v_org_id);
l_vendor_site_rec.org_id := v_org_id;
l_vendor_site_rec.vendor_id := 5414; --V_PHILIPS
l_vendor_site_rec.vendor_site_code := 'V_PHILIPSDAP';
--l_vendor_site_rec.terms_name := rec_vendors.term_name;
l_vendor_site_rec.pay_site_flag := 'Y';
l_vendor_site_rec.purchasing_site_flag := 'Y';
l_vendor_site_rec.country := 'CN'; --必输字段
l_vendor_site_rec.primary_pay_site_flag := 'N';
l_vendor_site_rec.address_line1 := '飞利浦(中国)投资有限公司小家电事业部';
--cux_conc_utl.log_msg('---------@@@@@@@@@@@@--------');
pos_vendor_pub_pkg.create_vendor_site(p_vendor_site_rec => l_vendor_site_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_vendor_site_id => l_vendor_site_id,
x_party_site_id => l_party_site_id,
x_location_id => l_location_id);
IF l_return_status <> fnd_api.g_ret_sts_success THEN
FOR i IN 1 .. l_msg_count LOOP
l_msg_data := fnd_msg_pub.get(p_msg_index => i, p_encoded => 'F');
dbms_output.put_line('11111111:'||l_msg_data);
END LOOP;
END IF;
END LOOP;
END;
上一篇:maven私服搭建nexus/windows/linux(一)


下一篇:linux环境下jdk 安装以及maven私服搭建