AR*更新客户地址联系人
CREATE OR REPLACE PACKAGE BODY cux_ar_party_location_pkg IS
g_pkg_name CONSTANT VARCHAR2() := 'CUX_AR_PARTY_LOCATION_PKG';
-- Debug
g_debug VARCHAR2() := nvl(fnd_profile.value('AFLOG_ENABLED'),
'N');
g_space VARCHAR2() := chr() || 'nbsp';
/*==================================================
Program Name:
PROCESS_REQUEST
Description:
History:
* 1.00 2018-04-19 wang.chen Creation
==================================================*/
PROCEDURE process_request(p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2) IS
l_api_name CONSTANT VARCHAR2() := 'PROCESS_REQUEST';
l_savepoint_name CONSTANT VARCHAR2() := 'PROCESS_REQUEST';
CURSOR cur IS
SELECT t.import_id,
t.party_name,
t.contract_name,
t.contract_phone,
t.address
FROM cux_ar_party_loc_import t;
l_location_rec hz_location_v2pub.location_rec_type;
l_object_version_number NUMBER;
--x_return_status VARCHAR2();
--x_msg_count NUMBER;
--x_msg_data VARCHAR2();
l_error_message VARCHAR2();
BEGIN
x_return_status := cux_api.start_activity(p_pkg_name => g_pkg_name,
p_api_name => l_api_name,
p_init_msg_list => fnd_api.g_true);
IF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
RAISE fnd_api.g_exc_unexpected_error;
ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
RAISE fnd_api.g_exc_error;
END IF;
FOR rec IN cur
LOOP
FOR rec1 IN (SELECT DISTINCT hl.location_id, hl.object_version_number
FROM hz_locations hl, hz_party_sites hps, hz_parties hp
WHERE hps.location_id = hl.location_id
AND hps.party_id = hp.party_id
AND hp.party_name = rec.party_name)
LOOP
l_location_rec.location_id := rec1.location_id;
l_location_rec.address1 := rec.address;
l_location_rec.address2 := rec.contract_name;
l_location_rec.address3 := rec.contract_phone;
hz_location_v2pub.update_location(p_location_rec => l_location_rec,
p_object_version_number => rec1.object_version_number,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
IF x_msg_count > AND x_return_status <> fnd_api.g_ret_sts_success THEN
FOR i IN .. x_msg_count
LOOP
l_error_message := i || ' . ' || substr(fnd_msg_pub.get(p_encoded => fnd_api.g_false),
,
);
cux_conc_utl.log_msg('Party Name: ' || rec.party_name);
cux_conc_utl.log_msg('Orig Location ID: ' || rec1.location_id || ',' ||
l_error_message);
END LOOP;
END IF;
END LOOP;
END LOOP;
-- 输出表尾
cux_api.end_activity(p_pkg_name => g_pkg_name,
p_api_name => l_api_name,
p_commit => p_commit,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
EXCEPTION
WHEN fnd_api.g_exc_error THEN
x_return_status := cux_api.handle_exceptions(p_pkg_name => g_pkg_name,
p_api_name => l_api_name,
--p_savepoint_name => l_savepoint_name,
p_exc_name => cux_api.g_exc_name_error,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
WHEN fnd_api.g_exc_unexpected_error THEN
x_return_status := cux_api.handle_exceptions(p_pkg_name => g_pkg_name,
p_api_name => l_api_name,
-- p_savepoint_name => l_savepoint_name,
p_exc_name => cux_api.g_exc_name_unexp,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
WHEN OTHERS THEN
x_return_status := cux_api.handle_exceptions(p_pkg_name => g_pkg_name,
p_api_name => l_api_name,
--- p_savepoint_name => l_savepoint_name,
p_exc_name => cux_api.g_exc_name_others,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
END process_request;
/*==================================================
* FUNCTION / PROCEDURE
* NAME :
* main
* DESCRIPTION:
* 报表主程序
* HISTORY:
* 1.00 2018-04-19 wang.chen Creation
2 *
================================================== */
PROCEDURE main(errbuf OUT VARCHAR2, retcode OUT VARCHAR2) IS
l_return_status VARCHAR2() := fnd_api.g_ret_sts_success;
l_msg_count NUMBER;
l_msg_data VARCHAR2();
l_api_name CONSTANT VARCHAR2() := 'MAIN';
l_date_from DATE;
l_date_to DATE;
BEGIN
retcode := '';
cux_conc_utl.log_header;
process_request(p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_true,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
IF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
RAISE fnd_api.g_exc_unexpected_error;
ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
RAISE fnd_api.g_exc_error;
END IF;
-- concurrent footer log
cux_conc_utl.log_footer;
EXCEPTION
WHEN fnd_api.g_exc_error THEN
cux_conc_utl.log_message_list;
retcode := '';
errbuf := REPLACE(l_msg_data,
chr(),
' ');
WHEN fnd_api.g_exc_unexpected_error THEN
cux_conc_utl.log_message_list;
retcode := '';
errbuf := REPLACE(l_msg_data,
chr(),
' ');
WHEN OTHERS THEN
fnd_msg_pub.add_exc_msg(p_pkg_name => g_pkg_name,
p_procedure_name => l_api_name,
p_error_text => substrb(SQLERRM,
,
));
cux_conc_utl.log_message_list;
retcode := '';
errbuf := SQLERRM;
END main;
END cux_ar_party_location_pkg;
create table cux_ar_party_loc_import
(IMPORT_ID NUMBER,
PARTY_NAME VARCHAR2(240),
CONTRACT_NAME VARCHAR2(240),
CONTRACT_PHONE VARCHAR2(240),
ADDRESS VARCHAR2(240)
) select * from cux_ar_party_loc_import for update
AR*更新客户地址联系人的更多相关文章
- Oracle EBS AR 更新客户配置文件
DECLARE l_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_custom ...
- Oracle EBS AR 更新客户组织层
declare -- Local variables here i integer; g_module ) := 'TCA_V2_API'; lrec_org hz_party_v2pub.organ ...
- Oracle EBS AR 更新客户账户层
declare x_return_status ); x_msg_count NUMBER; x_msg_data ); x_profile_id NUMBER; l_location_id NUMB ...
- Oracle EBS AR 更新客户
DECLARE l_return_status ); l_msg_count NUMBER; l_msg_data ); l_rec_type hz ...
- Oracle EBS 更新客户地点
--更新客户地点 declare x_return_status ); x_msg_count NUMBER; x_msg_data ); x_profile_id NUMBER; l_locatio ...
- AX2012 常用表关系(客户地址,联系信息)
//客户地址信息 static void CustAddressInformation(Args _args) { CustTable custTable; DirPartyTable dirPart ...
- auto uninstaller (autodesk 修复大师) 简体中文版 更新下载地址
小伙伴是不是遇到 CAD/3dmax/maya/Revit/Inventor 安装失败或者安装不了的问题了呢?AUTODESK系列软件着实令人头疼,CAD/3dmax/maya/Revit/Inven ...
- 第一阶段,第二阶段,第三阶段团队github更新项目地址
第一阶段:https://github.com/yuhancheng/stage-1--last-sprint 第二阶段:https://github.com/yuhancheng/stage-2-- ...
- Oracle EBS AP更新供应商地址
SELECT pvs.vendor_site_id, pvs.party_site_id, hps.party_site_name, hps.object_version_number, hps.pa ...
随机推荐
- linux查看文件相关命令
通过命令+文件名查看内容.如下命令可以查看. 1,cat:由第一行开始显示文件内容:一次性显示文件所有内容 2,tac:从最后一行开始显示,可以看出tac与cat字母顺序相反:一次性显示文件所有内容, ...
- 英语听力,如何成为更好的交谈着https://www.bilibili.com/video/av4279405?from=search&seid=5889429711390689339
and how many of you know at least one person that you because you just do not want to talk to them.y ...
- 洛谷 P1717 钓鱼 题解
每日一题 day46 打卡 Analysis 首先通过题目我们不难发现,为了得到最优解,那么就不能把时间浪费在路上,也就是说不能走回头路.然后很容易可以发现,在每个时刻在不同的鱼塘钓到的鱼的数量是不同 ...
- circus 架构
转自官方文档:https://circus.readthedocs.io/en/latest/design/architecture/ Overall architecture Circus is c ...
- windows 获取时间戳
Windows 批处理时间戳 1.时间戳格式: 取年份: echo %date:~,% 取月份: echo %date:~,% 取日期: echo %date:~,% 取星期: echo %date: ...
- 【区间DP】加分二叉树
https://www.luogu.org/problemnew/show/P1040#sub 题目描述 设一个n个节点的二叉树tree的中序遍历为(1,2,3,…,n),其中数字1,2,3,…,n为 ...
- 市场细分(Market Segmentation)
什么是市场细分? 市场细分其实就是把拥有共同特征的人分在一起.这些共同特征可以是:喜欢喝某个牌子的红酒,飞机总是做头等舱,习惯用windows系统等等. 市场细分有什么用? 1,不同细分市场的需求存在 ...
- mysql 创建主键,修改主键
//添加一个字段pid并且设置为主键(auto_increment)自增(auto_increment),不可为null,类型为int unsigned alter table table1 add ...
- django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applie
Traceback (most recent call last): File "manage.py", line 15, in <module> execute_fr ...
- 【CSP模拟赛】Freda的迷宫(桥)
题目描述 Freda是一个迷宫爱好者,她利用业余时间建造了许多迷宫.每个迷宫都是由若干房间和走廊构成的,每条走廊都连接着两个不同的房间,两个房间之间最多只有一条走廊直接相连,走廊都是双向通过. 黄昏 ...