--创建供应商地址上的电话号码 created by jenrry 20170419
DECLARE
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_vendor_contact_rec hz_contact_point_v2pub.contact_point_rec_type;
l_vendor_edi_rec hz_contact_point_v2pub.edi_rec_type;
l_vendor_email_rec hz_contact_point_v2pub.email_rec_type;
l_vendor_phone_rec hz_contact_point_v2pub.phone_rec_type;
l_vendor_fax_rec hz_contact_point_v2pub.telex_rec_type;
l_vendor_web_rec hz_contact_point_v2pub.web_rec_type;
l_vendor_contact_id NUMBER; BEGIN
fnd_global.apps_initialize(0, 50737, 20005);
mo_global.init('SQLAP');
--
l_vendor_contact_rec.owner_table_name := 'HZ_PARTY_SITES';
l_vendor_contact_rec.owner_table_id := 7037;
l_vendor_contact_rec.contact_point_type := 'PHONE';
l_vendor_contact_rec.created_by_module := 'POS_SUPPLIER_MGMT'; l_vendor_phone_rec.phone_area_code := '010';
l_vendor_phone_rec.phone_number := '017809091134';
l_vendor_phone_rec.phone_line_type := 'GEN';--电话 hz_contact_point_v2pub.create_contact_point(p_init_msg_list => fnd_api.g_true,
p_contact_point_rec => l_vendor_contact_rec,
p_edi_rec => l_vendor_edi_rec,
p_email_rec => l_vendor_email_rec,
p_phone_rec => l_vendor_phone_rec,
p_telex_rec => l_vendor_fax_rec,
p_web_rec => l_vendor_web_rec,
x_contact_point_id => l_vendor_contact_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('l_vendor_contact_id:' || l_vendor_contact_id);
dbms_output.put_line(fnd_msg_pub.get_detail(1, 'F'));
END; --创建供应商地址上的传真号码
DECLARE
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_vendor_contact_rec hz_contact_point_v2pub.contact_point_rec_type;
l_vendor_edi_rec hz_contact_point_v2pub.edi_rec_type;
l_vendor_email_rec hz_contact_point_v2pub.email_rec_type;
l_vendor_phone_rec hz_contact_point_v2pub.phone_rec_type;
l_vendor_fax_rec hz_contact_point_v2pub.telex_rec_type;
l_vendor_web_rec hz_contact_point_v2pub.web_rec_type;
l_vendor_contact_id NUMBER; BEGIN
fnd_global.apps_initialize(0, 50737, 20005);
mo_global.init('SQLAP');
--
l_vendor_contact_rec.owner_table_name := 'HZ_PARTY_SITES';
l_vendor_contact_rec.owner_table_id := 7037;
l_vendor_contact_rec.contact_point_type := 'PHONE';
l_vendor_contact_rec.created_by_module := 'POS_SUPPLIER_MGMT'; l_vendor_phone_rec.phone_area_code := '010';
l_vendor_phone_rec.phone_number := '017809091134';
l_vendor_phone_rec.phone_line_type := 'FAX';--传真 hz_contact_point_v2pub.create_contact_point(p_init_msg_list => fnd_api.g_true,
p_contact_point_rec => l_vendor_contact_rec,
p_edi_rec => l_vendor_edi_rec,
p_email_rec => l_vendor_email_rec,
p_phone_rec => l_vendor_phone_rec,
p_telex_rec => l_vendor_fax_rec,
p_web_rec => l_vendor_web_rec,
x_contact_point_id => l_vendor_contact_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('l_vendor_contact_id:' || l_vendor_contact_id);
dbms_output.put_line(fnd_msg_pub.get_detail(1, 'F'));
END;

  创建供应商联系人目录的联系人信息

DECLARE
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_vendor_contact_rec ap_vendor_pub_pkg.r_vendor_contact_rec_type;
l_vendor_contact_id NUMBER;
l_per_party_id NUMBER;
l_rel_party_id NUMBER;
l_rel_id NUMBER;
l_org_contact_id NUMBER;
l_party_site_id NUMBER;
BEGIN
fnd_global.apps_initialize(1670, 50728, 200);
mo_global.init('SQLAP');
--
l_vendor_contact_rec.vendor_id := 133003;
l_vendor_contact_rec.person_last_name := '赵六';
l_vendor_contact_rec.person_title := '销售经理'; l_vendor_contact_rec.area_code := '010';
l_vendor_contact_rec.phone := '12345678';
l_vendor_contact_rec.fax_area_code := '010';
l_vendor_contact_rec.fax_phone := '12345678';
l_vendor_contact_rec.email_address := 'xxx@163.com';
ap_vendor_pub_pkg.create_vendor_contact(p_api_version => 1.0,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_false,
p_validation_level => fnd_api.g_valid_level_full,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_vendor_contact_rec => l_vendor_contact_rec,
x_vendor_contact_id => l_vendor_contact_id,
x_per_party_id => l_per_party_id,
x_rel_party_id => l_rel_party_id,
x_rel_id => l_rel_id,
x_org_contact_id => l_org_contact_id,
x_party_site_id => l_party_site_id);
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('l_vendor_contact_id:' || l_vendor_contact_id);
dbms_output.put_line('l_per_party_id:' || l_per_party_id);
dbms_output.put_line('l_rel_party_id:' || l_rel_party_id);
dbms_output.put_line('l_rel_id:' || l_rel_id);
dbms_output.put_line('l_org_contact_id:' || l_org_contact_id);
dbms_output.put_line('l_party_site_id:' || l_party_site_id);
dbms_output.put_line(fnd_msg_pub.get_detail(1, 'F'));
END;

  创建供应商银行账户/创建银行账户

--创建供应商银行账户 created by jenrry 20170419
DECLARE
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
x_bank_acct_id number;
l_joint_acct_owner_id number;
l_ext_bank_acct_rec iby_ext_bankacct_pub.extbankacct_rec_type;
x_response_rec iby_fndcpt_common_pub.result_rec_type; BEGIN
fnd_global.apps_initialize(0, 50737, 20005);
mo_global.init('SQLAP');
--
l_ext_bank_acct_rec.bank_account_name := '银行账号006';
l_ext_bank_acct_rec.bank_account_num := '20170418006';
l_ext_bank_acct_rec.acct_owner_party_id := 9057;
l_ext_bank_acct_rec.country_code := 'CN';
l_ext_bank_acct_rec.bank_id := 5050;
l_ext_bank_acct_rec.branch_id := 5051;
l_ext_bank_acct_rec.START_DATE := sysdate; iby_ext_bankacct_pub.create_ext_bank_acct(p_api_version => 1.0,
p_init_msg_list => fnd_api.G_FALSE,
p_ext_bank_acct_rec => l_ext_bank_acct_rec,
p_association_level => 'AO',
p_supplier_site_id => 3007,
p_party_site_id => 7037,
p_org_id => 142,
p_org_type => 'OPERATING_UNIT', --Bug7136876: new parameter
x_acct_id => x_bank_acct_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_response => x_response_rec);
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_bank_acct_id:' || x_bank_acct_id);
dbms_output.put_line(fnd_msg_pub.get_detail(1, 'F')); END;
/*
The details of the mandatory parameters to be passed for each level is given below: 1.Supplier level: p_association_level should have 'S' (case sensitive)
2.Supplier site level: p_association_level should have 'SS'(case sensitive)
p_supplier_site_id should have the supplier id.
3.Address level: p_association_level should have 'A'(case sensitive)
p_party_site_id should have the party_site_id of particular address
4.Address- operating unit: p_association_level should have 'AO'(case sensitive)
p_party_site_id should have the party_site_id of the address
p_org_id should have the org_id.
*/

  

Oracle EBS AP 供应商API的更多相关文章

  1. Oracle EBS AP 供应商取值

    SELECT --nvl(substr(po.vendor_name,1,instr(po.vendor_name,',',1)-1),po.vendor_name) vendor_name, po. ...

  2. Oracle EBS AP 供应商地点失效

    /* 供应商地点失效 creation: created by jenrry 20161108 1.00 */ DECLARE lv_return_status ) := NULL; ln_msg_c ...

  3. Oracle EBS AP更新供应商地址

    SELECT pvs.vendor_site_id, pvs.party_site_id, hps.party_site_name, hps.object_version_number, hps.pa ...

  4. Oracle EBS OM 主要API示例

    1, Book order Oe_Order_Pub.Process_Order ( 1 , Fnd_Api.G_FALSE , Fnd_Api.G_FALSE , Fnd_Api.G_FALSE , ...

  5. Oracle EBS 银行账户API

     创建银行 -- Create Bank DECLARE p_init_msg_list VARCHAR2(200); p_country_code VARCHAR2(200); p_bank_nam ...

  6. Oracle EBS AP取消核销

    --取消核销 created by jenrry 20170425 DECLARE l_result BOOLEAN; l_msg_count NUMBER; l_result_n varchar2( ...

  7. Oracle EBS AR 其他API

    DECLARE L_CR_ID NUMBER; L_ATTRIBUTE_REC AR_RECEIPT_API_PUB.ATTRIBUTE_REC_TYPE; L_GLOBAL_ATT_REC AR_R ...

  8. Oracle EBS AP 已经完全付款的发票仍然可以选择并进行零金额的付款

    1>找出相应的发票; SELECT DISTINCT ai.invoice_id, ai.invoice_num invoice_num, pv.segment1 vendor_num, pv. ...

  9. ORACLE EBS AP invoice 到付款的数据流

    --1.Invoice创建时生成数据如下表 --Invoice主表 SELECT * FROM AP_INVOICES_ALL A WHERE A.INVOICE_NUM = '20111213001 ...

随机推荐

  1. TiDB 部署及数据同步

    简介 TiDB 是 PingCAP 公司受 Google Spanner / F1 论文启发而设计的开源分布式 HTAP (Hybrid Transactional and Analytical Pr ...

  2. 19-hadoop-fof好友推荐

    好友推荐的案例, 需要两个job, 第一个进行好友关系度计算, 第二个job将计算的关系进行推荐 1, fof关系类 package com.wenbronk.friend; import org.a ...

  3. 对CAP原理的理解

    对CAP原理的理解 CAP原理按照定义,指的是C(Consistency)一致性,A(Availability)可用性,P(Partition tolerance)分区容错性在一个完整的计算机系统中三 ...

  4. 【IT笔试面试题整理】二叉搜索树转换为双向链表

    [试题描述] 将二叉搜索树转换为双向链表 对于二叉搜索树,可以将其转换为双向链表,其中,节点的左子树指针在链表中指向前一个节点,右子树指针在链表中指向后一个节点. 思路一: 采用递归思想,对于二叉搜索 ...

  5. React Router基础教程

    React是个技术栈,单单使用React很难构建复杂的Web应用程序,很多情况下我们需要引入其他相关的技术 React Router是React的路由库,保持相关页面部件与URL间的同步 下面就来简单 ...

  6. 如何使SpringBoot作为Maven构建的项目的一个子模块

    1.问题 一般使用springboot都会引用springboot作为parent,在实际项目中web只是系统模块的一个子集.当然你可以做两个项目来管理,一个项目用来做各种支持包,一个项目专门做web ...

  7. AutoMapper之嵌套映射

    8.嵌套映射 嵌套映射就是一个类中包含有另一个类,这种情况下我们应该如何映射呢? /// <summary> /// 源对象 /// </summary> public cla ...

  8. winform窗体 小程序【三级联动】

    三级联动[省,市,区] 类似地区选择,当选的某个省份,后面的下拉框相对变成对应省份的区县 实现省市区联动关键是数据库的表,[每个省内区的AreaCode列是同样的] public Form2() { ...

  9. SQL Server T—SQL 学生选课数据库SQL语句考试题(45道题)

    题目  设有一数据库,包括四个表:学生表(Student).课程表(Course).成绩表(Score)以及教师信息表(Teacher).四个表的结构分别如表1-1的表(一)~表(四)所示,数据如表1 ...

  10. Unity主线程和子线程跳转调用(1)

    Unity除了一些基本的数据类型,几乎所有的API都不能在非unity线程中调用,如果项目中有一段很耗时操作,unity可能会出现“假死”.如果这段操作是和unity无关的,我们可以把这个耗时的操作放 ...