Oracle EBS AR 更新客户组织层
declare
-- Local variables here
i integer;
g_module varchar2(30) := 'TCA_V2_API';
lrec_org hz_party_v2pub.organization_rec_type;
lrec_party hz_party_v2pub.party_rec_type;
l_return_status varchar2(1);
l_msg_count number;
l_msg_data varchar2(2000);
l_party_id number;
l_party_number hz_parties.party_number%type;
l_profile_id number;
v_error_msg varchar2(2000);
v_version_number number;
cursor cur_DT is
SELECT loc.location_id,
loc.object_version_number,
addr.PARTY_SITE_ID,
hc.ACCOUNT_NUMBER,
hc.CUST_ACCOUNT_ID,
party_site.PARTY_SITE_NAME,
hcp.CUST_ACCOUNT_PROFILE_ID,
hcp.CREDIT_HOLD,
hc.CREATION_DATE,
hc.CREATED_BY,
hc.ORIG_SYSTEM_REFERENCE,
hc.PARTY_ID,
hc.STATUS STATUS1,
hz.STATUS STATUS2
FROM hz_cust_acct_sites_all addr,
hz_party_sites party_site,
hz_locations loc,
HZ_CUSTOMER_PROFILES hcp,
HZ_CUST_ACCOUNTS hc,
hz_parties hz
WHERE 1 = 1
AND addr.party_site_id = party_site.party_site_id
AND loc.location_id = party_site.location_id
and hc.PARTY_ID = party_site.PARTY_ID
and hc.CUST_ACCOUNT_ID = hcp.CUST_ACCOUNT_ID
and hz.PARTY_ID = party_site.PARTY_ID
and hz.PARTY_NUMBER = '';
begin
-- Test statements here
fnd_global.apps_initialize(0, 50738, 20003);
mo_global.init('AR');
FOR rec IN CUR_DT LOOP
begin
select h.OBJECT_VERSION_NUMBER
into v_version_number
from hz_parties h
where h.PARTY_ID = rec.PARTY_ID;
end;
lrec_party.party_id := rec.party_id;
lrec_party.status := 'I';
lrec_org.party_rec := lrec_party;
hz_party_v2pub.update_organization(p_init_msg_list => fnd_api.G_TRUE
,p_organization_rec => lrec_org
,p_party_object_version_number => v_version_number
,x_profile_id => l_profile_id
,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_error THEN
l_msg_count := fnd_msg_pub.count_msg;
l_msg_data := substr(fnd_msg_pub.get(fnd_msg_pub.g_first,
fnd_api.g_false),
1,
512);
dbms_output.put_line(l_msg_data);
fnd_msg_pub.delete_msg();
RAISE fnd_api.g_exc_error;
ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
l_msg_count := fnd_msg_pub.count_msg;
l_msg_data := substr(fnd_msg_pub.get(fnd_msg_pub.g_first,
fnd_api.g_false),
1,
512);
dbms_output.put_line(l_msg_data); fnd_msg_pub.delete_msg();
RAISE fnd_api.g_exc_unexpected_error;
END IF;
IF l_return_status = fnd_api.g_ret_sts_success THEN
dbms_output.put_line('------------------Update Success-------------------'); END IF;
end loop;
end;
Oracle EBS AR 更新客户组织层的更多相关文章
- 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_rec_profile_t hz_customer_profile_v2pub.customer_profile_rec_type; l_rec_profile hz_custom ...
- Oracle EBS AR 更新客户
DECLARE l_return_status ); l_msg_count NUMBER; l_msg_data ); l_rec_type hz ...
- Oracle EBS AR 客户API
------------------------------------ 1. Set Environment ------------------------------------ -- 1a. ...
- Oracle EBS AR 客户取数SQL
SELECT acct.cust_account_id, acct.party_id, acct.account_number, party.party_name, lkp1.meaning part ...
- 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 ...
- Oracle EBS AR 收款核销行关联到事务处理
select ra.trx_number from ar_cash_receipts_all cr, ar_receivable_applications_all ar,ra_customer_trx ...
- Oracle EBS AR 事务处理到期余额总计API
declare -- Local variables here i integer; x_line_original NUMBER; x_line_remaining NUMBER; ...
- Oracle EBS AR 删除应收发票
DECLARE -- Non-scalar parameters require additional processing p_errors arp_trx_validate.mess ...
随机推荐
- Android_PullListView
ListView 下拉刷新,上拉加载更多的原理: (1)主要是onScroll()方法和onTouchEvent()方法,先是onTouchEvent()的ACTION_DOWN,然后是 ACTION ...
- golang协程池
type GoroutinePoll struct { Queue chan func() error Total, Num int Result chan error FinishCallBack ...
- redis-redisTemplate模糊匹配删除
前几天需要一个模糊删除redis中key的功能, 没有多想, 直接 String key = "noteUserListenedPoi:*"; redisTemplate.del ...
- ASP.NET Core 中的缓存
目录 缓存的基本概念 缓存原理 缓存设计 分布式缓存 Memcache 与 Redis 的比较 缓存穿透,缓存击穿,缓存雪崩解决方案 数据一致性 使用内置 MemoryCache 使用分布式缓存 Re ...
- lucene源码分析(1)基本要素
1.源码包 core: Lucene core library analyzers-common: Analyzers for indexing content in different langua ...
- [CQOI 2018]解锁屏幕
Description 题库链接 给出平面上 \(n\) 个点,一开始你可以选任何一个点作为起点,接着对于每一个你在的位置,你可以选取一个未走过的点.将路径(线段)上所有的点均选上(包括起点终点),并 ...
- centos6.5下yum安装mysql5.5
第一步就是看linu是否安装了mysql,经过rpm -qa|grep mysql查看到centos下安装了mysql5.1,那就开始卸载咯 2 接下来就是卸载mysql5.1了,命令:rpm -e ...
- template-web.js 真分页绑定表格
<div class="layui-table-box"> <div class="layui-tabl ...
- WPF绑定之索引器值变化通知
背景 在某些应用中,需要在界面上绑定到索引器,并在值发生变化时实时更新. 解决方案 只要将包含索引器的类实现INotifyPropertyChanged接口,并在索引值更改时引发PropertyCha ...
- Rafy中的IOC
Rafy是什么可以通过下面博客来了解 Rafy 领域实体框架演示(3) - 快速使用 C/S 架构部署 - BloodyAngel - 博客园 以下是看源码中的一点记录,供以后学习使用 主要是Rafy ...