Create a Customer A/C Site Use Code
====================================================================
DECLARE
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 := 3580;
p_cust_site_use_rec.site_use_code := ’INV’;
p_cust_site_use_rec.location := ’TCA’;
p_cust_site_use_rec.created_by_module := ’TCA_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(SubStr(’x_return_status = ’||x_return_status,
1,255));
dbms_output.put_line(’x_msg_count = ’||TO_CHAR(x_msg_count));
dbms_output.put_line(SubStr(’x_msg_data = ’||x_msg_data,1,255));
IF x_msg_count >1 THEN
FOR I IN 1..x_msg_count
LOOP
dbms_output.put_line(I||’. ’||SubStr(FND_MSG_PUB.Get(p_encoded =>
FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;
=========================================================================
DECLARE
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 := 3580;
p_cust_site_use_rec.site_use_code := ’INV’;
p_cust_site_use_rec.location := ’TCA’;
p_cust_site_use_rec.created_by_module := ’TCA_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(SubStr(’x_return_status = ’||x_return_status,
1,255));
dbms_output.put_line(’x_msg_count = ’||TO_CHAR(x_msg_count));
dbms_output.put_line(SubStr(’x_msg_data = ’||x_msg_data,1,255));
IF x_msg_count >1 THEN
FOR I IN 1..x_msg_count
LOOP
dbms_output.put_line(I||’. ’||SubStr(FND_MSG_PUB.Get(p_encoded =>
FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;
No comments:
Post a Comment