具体解释ebs接口之客户配置文件导入(二)
------------------------------------
-- 1a. Setup the Org_id
------------------------------------
------------------------------------
-- 1b. Show the output variables
------------------------------------
------------------------------------
-- 2a. Create a party and an account
------------------------------------
p_cust_account_rec HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE;
p_organization_rec HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE;
p_customer_profile_rec
HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
x_cust_account_id NUMBER;
x_account_number VARCHAR2(2000);
x_party_id NUMBER;
x_party_number VARCHAR2(2000);
x_profile_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
p_create_profile_amt VARCHAR2(2000);
BEGIN
-- record for the account
p_cust_account_rec.account_name := 'FennerProfAPIamtc002';
p_cust_account_rec.created_by_module := 'TCAPI_EXAMPLE';
-- p_cust_account_rec.orig_system_reference := '001_001'; -- is not mandatory
-- record for the organization
p_organization_rec.organization_name := 'FennerProfAPIamtc002';
p_organization_rec.created_by_module := 'TCAPI_EXAMPLE';
-- record for the profile (this will use he DEFAULT profile but change these fields)
p_customer_profile_rec.credit_checking := 'Y';
p_customer_profile_rec.interest_charges := 'N';
-- as interest charges is N, you need to set this two values in null
p_customer_profile_rec.charge_on_finance_charge_flag := FND_API.G_MISS_CHAR;
p_customer_profile_rec.interest_period_days := FND_API.G_MISS_NUM;
p_customer_profile_rec.created_by_module := 'TCAPI_EXAMPLE';
-- Record for the profile amounts
-- You are not able to assign values for the amounts in this API
-- As you want to create specific values for the amounts set the field in 'F'
-- You will insertthe information later
p_create_profile_amt := 'F';
hz_cust_account_v2pub.create_cust_account(
'T',
p_cust_account_rec,
p_organization_rec,
p_customer_profile_rec,
p_create_profile_amt,
x_cust_account_id,
x_account_number,
x_party_id,
x_party_number,
x_profile_id,
x_return_status,
x_msg_count,
x_msg_data);
dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
dbms_output.put_line('x_cust_account_id: '||x_cust_account_id);
dbms_output.put_line('x_account_number: '||x_account_number);
dbms_output.put_line('x_party_id: '||x_party_id);
dbms_output.put_line('x_party_number: '||x_party_number);
dbms_output.put_line('x_profile_id: '||x_profile_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('***************************');
END;
/
***************************
Output information ....
x_cust_account_id: 7744
x_account_number: 3991
x_party_id: 19566
x_party_number: 16479
x_profile_id: 8679
x_return_status: S
x_msg_count: 0
x_msg_data:
***************************
------------------------------------
-- 2b. Create the profile amounts record
------------------------------------
p_cpamt_rec HZ_CUSTOMER_PROFILE_V2PUB.cust_profile_amt_rec_type;
v_cust_account_profile_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_cust_acct_profile_amt_id NUMBER;
BEGIN
select cust_account_profile_id into v_cust_account_profile_id
from hz_customer_profiles where cust_account_id = 7744; --<<value for cust_account_id from step 2a
p_cpamt_rec.cust_account_profile_id := v_cust_account_profile_id;
p_cpamt_rec.currency_code := 'USD'; --<< Currency Code
p_cpamt_rec.created_by_module := 'TCAPI_EXAMPLE';
p_cpamt_rec.overall_credit_limit := 1000000;
p_cpamt_rec.cust_account_id := 7744; --<<value for cust_account_id from step 2a
HZ_CUSTOMER_PROFILE_V2PUB.create_cust_profile_amt (
'T',
'T',
p_cpamt_rec,
x_cust_acct_profile_amt_id,
x_return_status,
x_msg_count,
x_msg_data
);
dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
dbms_output.put_line('<x_cust_acct_profile_amt_id: '||x_cust_acct_profile_amt_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('***************************');
END;
/
***************************
Output information ....
<x_cust_acct_profile_amt_id: 14883
x_return_status: S
x_msg_count: 0
x_msg_data:
***************************
/* BEGIN address */
------------------------------------
-- 3. Create a physical location
------------------------------------
p_location_rec HZ_LOCATION_V2PUB.LOCATION_REC_TYPE;
x_location_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
BEGIN
p_location_rec.country := 'US';
p_location_rec.address1 := 'FennerProfAPIamtc002';
p_location_rec.city := 'San Mateo';
p_location_rec.postal_code := '94401';
p_location_rec.state := 'CA';
p_location_rec.created_by_module := 'TCAPI_EXAMPLE';
hz_location_v2pub.create_location(
'T',
p_location_rec,
x_location_id,
x_return_status,
x_msg_count,
x_msg_data);
dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
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('***************************');
END;
/
***************************
Output information ....
x_location_id: 15538
x_return_status: S
x_msg_count: 0
x_msg_data:
***************************
------------------------------------
-- 4. Create a party site using party_id from step 2a and location_id from step 3
------------------------------------
p_party_site_rec HZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE;
x_party_site_id NUMBER;
x_party_site_number VARCHAR2(2000);
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
BEGIN
p_party_site_rec.party_id := 19566; --<<value for party_id from step 2a>
p_party_site_rec.location_id := 15538; --<<value for location_id from step 3>
p_party_site_rec.identifying_address_flag := 'Y';
p_party_site_rec.created_by_module := 'TCAPI_EXAMPLE';
hz_party_site_v2pub.create_party_site(
'T',
p_party_site_rec,
x_party_site_id,
x_party_site_number,
x_return_status,
x_msg_count,
x_msg_data);
dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
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('***************************');
END;
/
***************************
Output information ....
x_party_site_id: 10710
x_party_site_number: 8437
x_return_status: S
x_msg_count: 0
x_msg_data:
***************************
------------------------------------
-- 5. Create an account site using cust_account_id from step 2a and party_site_id from step 4.
------------------------------------
p_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_cust_acct_site_id NUMBER;
BEGIN
p_cust_acct_site_rec.cust_account_id := 7744; --<<value for cust_account_id you get from step 2a>
p_cust_acct_site_rec.party_site_id := 10710; --<<value for party_site_id from step 4>
p_cust_acct_site_rec.language := 'US';
p_cust_acct_site_rec.created_by_module := 'TCAPI_EXAMPLE';
hz_cust_account_site_v2pub.create_cust_acct_site(
'T',
p_cust_acct_site_rec,
x_cust_acct_site_id,
x_return_status,
x_msg_count,
x_msg_data);
dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
dbms_output.put_line('x_cust_acct_site_id: '||x_cust_acct_site_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('***************************');
END;
/
***************************
Output information ....
x_cust_acct_site_id: 7261
x_return_status: S
x_msg_count: 0
x_msg_data:
***************************
------------------------------------
-- 6. Create an account site use using cust_acct_site_id from step 5 and site_use_code='BILL_TO'
------------------------------------
p_cust_site_use_rec HZ_CUST_ACCOUNT_SITE_V2PUB.CUST_SITE_USE_REC_TYPE;
p_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
x_site_use_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
BEGIN
p_cust_site_use_rec.cust_acct_site_id := 7261; --<<value for cust_acct_site_id from step 5>
p_cust_site_use_rec.site_use_code := 'BILL_TO';
p_cust_site_use_rec.created_by_module := 'TCAPI_EXAMPLE';
hz_cust_account_site_v2pub.create_cust_site_use(
'T',
p_cust_site_use_rec,
p_customer_profile_rec,
'',
'',
x_site_use_id,
x_return_status,
x_msg_count,
x_msg_data);
dbms_output.put_line('***************************');
dbms_output.put_line('Output information ....');
dbms_output.put_line('x_site_use_id: '||x_site_use_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_count);
dbms_output.put_line('***************************');
END;
/
***************************
Output information ....
x_site_use_id: 8943
x_return_status: S
x_msg_count: 0
x_msg_data: 0
***************************
/* END address */
具体解释ebs接口之客户配置文件导入(二)的更多相关文章
- 详解ebs接口之客户配置文件导入(二)
------------------------------------ -- 1a. Setup the Org_id ------------------------------------ ex ...
- 详解ebs接口之客户配置文件导入(一)
DECLARE l_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_custom ...
- 具体解释EBS接口开发之物料导入API
create_item inv_item_grp.create_item(p_commit => fnd_api.g_true, -- p_item_rec => l_item_rec, ...
- 供应商API补充(详解EBS接口开发之供应商导入)(转)
原文地址 供应商导入的API补充(详解EBS接口开发之供应商导入) --供应商 --创建 AP_VENDOR_PUB_PKG.Create_Vendor ( p_api_version IN NUM ...
- 具体解释EBS接口开发之WIP模块接口
整体说明 文档目的 本文档针对WIP模块业务功能和接口进行分析和研究,对採用并发请求方式和调用API方式分别进行介绍 内容 WIP模块经常使用标准表简单介绍 WIP事物处理组成 WIP相关业务流程 W ...
- 详解EBS接口开发之供应商导入
(一)供应商常用标准表简介 1.1 常用标准表 如下表中列出了与供应商相关的表和说明: 表名 说明 其他信息 ap_suppliers 供应商头表 供应商的头信息如:供应商名.供应商编码.税号等 ...
- 供应商导入的API补充(详解EBS接口开发之供应商导入)
--供应商 --创建 AP_VENDOR_PUB_PKG.Create_Vendor ( p_api_version IN NUMBER, p_init_msg_list IN VARCHAR2 := ...
- Oracle EBS AR 更新客户配置文件
DECLARE l_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_custom ...
- 详解EBS接口开发之供应商导入(补充)--错误信息处理
check reject details on records of AP_SUPPLIER_INT SELECT s.parent_table,s.reject_lookup_code,S.LAST ...
随机推荐
- BZOJ 2708 [Violet 1]木偶 DP
题意:id=2708">链接 方法: DP 解析: 这题太神辣. 做梦都没想到DP啊,反正我不会. 先谈一个我有过的错的想法. 最小费用最大流? 能匹配的边连费用为1的,不能匹配的连费 ...
- 在jsp页面中导入BootStrap中的文件
BootStrap应该放在项目的根目录下面 然后因为我的jsp页面跟html页面是写在HTML文件夹中,所以我路径的导入应该像下面的图一样,退回到上级目录再写路径.
- colorscheme-如何vim颜色风格
我们vim默认的风格是黑底的,如果我们想要更换其他的风格,比如字体高亮的颜色.注释的颜色等.这时候我们就需要一个属性了,如下 colorscheme darkblue 这个属性的值,其实是在 /usr ...
- vue-cli 搭建
一.安装vue-cli 安装vue-cli的前提是你已经安装了npm,安装npm你可以直接下载node的安装包进行安装.你可以在命令行工具里输入npm -v 检测你是否安装了npm和版本情况.出现版 ...
- DOM节点的创建、插入、删除、查找、替换
在前端开发中,js与html联系最紧密的莫过于对DOM的操作了,本文为大家分享一些DOM节点的基本操作. 一.创建DOM节点 使用的命令是 var oDiv = document.createElem ...
- 37.cgi网页交互
1.Apache的安装 地址:链接:https://pan.baidu.com/s/1kWdSWwZ 密码:nuqo 2.在相应路径下写html如图所示 new.html代码: <html> ...
- CentOS6.5下的Nagios安装配置详解(图文)
最近因为,科研需要,接触上了Nagios,这里,我将安装笔记做个详解.为自己后续需要和博友们学习! VMware workstation 11 的下载 VMWare Workstation 11的安装 ...
- MATLAB —— 编程基础
字符串 abs —— 输出字符串ascii码 strvcat —— 把多个字符串横向连接成长字符串 fprintf —— 把格式化的文本写到文件中或显示屏上 int2str —— 整数转换成字符串 n ...
- LuoguP2754 [CTSC1999]家园(分层图,最大流)
题目背景 none! 题目描述 由于人类对自然资源的消耗,人们意识到大约在 2300 年之后,地球就不能再居住了.于是在月球上建立了新的绿地,以便在需要时移民.令人意想不到的是,2177 年冬由于未知 ...
- 【DRF解析器和渲染器】
目录 解析器 Django中的解析器 DRF中的解析器 DRF中的渲染器 @ *** 解析器 解析器的作用就是服务端接收客户端传过来的数据,把数据解析成自己想要的数据类型的过程. 本质就是对请求体中的 ...