--Disable customer site
DECLARE
lv_party_site_number VARCHAR2(30) := &p_party_site_number;
lr_party_site_rec_type hz_party_site_v2pub.party_site_rec_type;
lr_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type;
lr_cust_site_use_rec_type hz_cust_account_site_v2pub.cust_site_use_rec_type;
lr_orig_sys_reference_rec hz_orig_system_ref_pub.orig_sys_reference_rec_type;
ln_version_num NUMBER;
ln_version_num_party_site NUMBER;
x_return_status VARCHAR2(10);
x_msg_count NUMBER;
x_msg_data VARCHAR2(1000);
ln_failed_count NUMBER := 0;
api_exception EXCEPTION;
lv_errmsg VARCHAR2(2000);
BEGIN
dbms_output.put_line('Customer site number: ' || lv_party_site_number);
--begin to disable customer site use
SELECT hcas.cust_acct_site_id,
hcas.org_id
INTO lr_cust_acct_site_rec.cust_acct_site_id,
lr_cust_acct_site_rec.org_id
FROM hz_cust_accounts hca,
hz_cust_acct_sites_all hcas,
hz_party_sites hps
WHERE hca.cust_account_id = hcas.cust_account_id
AND hcas.party_site_id = hps.party_site_id
AND hps.party_site_number = lv_party_site_number;
mo_global.init('AR');
mo_global.set_policy_context('S', lr_cust_acct_site_rec.org_id);
dbms_output.put_line('Org id : ' || lr_cust_acct_site_rec.org_id);
dbms_output.put_line(' ');
dbms_output.put_line('==========================Disable site use======&#
使用API失效客户地址Demo
最新推荐文章于 2022-10-28 16:15:12 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)