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 ...
随机推荐
- 2020年假期sql excel文件 获取
下载地址: https://files.cnblogs.com/files/shmily3929/2020.zip 说明:sql 不区分节假期和周六周末 excel文件区分节假日和周六周末
- 图书检索系统C版本
原创,转载请注明出处! 程序具有一下功能窗口界面1,Input输入(读入文件,所有的文件都读入)2,Output输出(检验是否读取正确,从结构体数组读入)3,Length统计(此文件里有110本图书) ...
- 2-STM32+W5500+GPRS(2G)基础篇-(W5500-学习说明)
https://www.cnblogs.com/yangfengwu/p/11220042.html 定版: 这一节先直接说明怎么把官方的源码应用在我做的这块开发板上 https://www.w550 ...
- rust-vmm 学习
V0.1.0 feature base knowledge: Architecture of the Kernel-based Virtual Machine (KVM) 用rust-vmm打造未来的 ...
- Kafka 消费者到底是什么 以及消费者位移主题到底是什么(Python 客户端 1.01 broker)
Kafka 中有这样一个概念消费者组,所有我们去订阅 topic 和 topic 交互的一些操作我们都是通过消费者组去交互的. 在 consumer 端设置了消费者的名字之后,该客户端可以对多个 to ...
- Android中如何引入已经存在的标题栏
在写程序中很多时候很多页面的标题布局大致都是一样的,这时候不需要挨着都写一遍,只需要写一个xml文件,在所需要的时候进行引用就可以了 只需要这一行代码: <include layout=&quo ...
- SDN第六次上机作业
1.实验拓扑 实验拓扑图如下: 搭建代码如下: 创建py脚本文件,并编写代码,如下: class MyTopo(Topo): def __init__(self): # initilaize topo ...
- Mysql索引面试题
转载:https://mp.weixin.qq.com/s/_bk2JVOm2SkXfdcvki6-0w 本文来自一位不愿意透露姓名的粉丝投稿,由Hollis整理并"还原"了面试现 ...
- golang 文件传输小demo(转载)
转载地址:https://www.cnblogs.com/qq702368956/p/10195497.html 获取文件信息需要用到os. Stat接口,发送文件前开启接收者(服务端),启动客户端先 ...
- 安装关系型数据库MySQL 安装大数据处理框架Hadoop
作业要求来自:https://edu.cnblogs.com/campus/gzcc/GZCC-16SE2/homework/3161 1.Hadoop的介绍 Hadoop最早起源于Nutch.Nut ...