Wednesday, 27 December 2017

API to Update Customer Sites and assign Tax code in Oracle apps


API to Update Customer Sites and assign Tax code in Oracle apps

 

This below script helps to update Customer Sites and Assign Vat Tax code/Tax Code and Vat Registration No/ Tax Registration No in Customer Master in Oracle.
This is the complete API to Update Customer Sites Information in Oracle Apps.


We are using Standard Oracle API to Achieve this Below requirement.


API to Update Customer Sites and assign Tax code in Oracle apps


DECLARE

x_return_status varchar2(10);

l_init_msg_list VARCHAR2 (1000) := FND_API.G_TRUE;

x_msg_count number(10);

x_msg_data varchar2(1200);

p_object_version_number number(10):=18;



l_cust_site_use_rec APPS.hz_cust_account_site_v2pub.cust_site_use_rec_type;



begin

fnd_global.apps_initialize(61477,61595,222);

dbms_output.put_line('API STARTED' );



 mo_global.set_policy_context('S',5674);



fnd_profile.initialize(61470,61515,222);



l_cust_site_use_rec.SITE_USE_ID:=264031;



l_cust_site_use_rec.cust_acct_site_id:=225246;



l_cust_site_use_rec.TAX_CODE := ‘XX_VAT_5';

--l_cust_site_use_rec.status := 'I';

dbms_output.put_line('API STARTED EXECUTION' );


hz_cust_account_site_v2pub.update_cust_site_use(fnd_api.g_true,

l_cust_site_use_rec,

p_object_version_number,

x_return_status,

x_msg_count,

x_msg_data);IF x_return_status = 'S' THEN

dbms_output.put_line(' Now site use is active' );

ELSE

IF NVL (x_msg_count, 0) > 1 THEN

 FOR i IN 1 .. x_msg_count LOOP

 dbms_output.put_line(' Error Status ' ||x_return_status);

 dbms_output.put_line(' Error message ' ||x_msg_data);

 END LOOP;

 ELSE

 dbms_output.put_line(' Error message ' ||x_msg_data);

 END IF;

 END IF;

 commit;

 exception when others then

 dbms_output.put_line(' Error Here'||sqlcode||sqlerrm);

 end;

Please share your comments if you like this post and pls email me if you are getting any issue in that.

 
API to Update Customer Sites and assign Tax code in Oracle apps

6 comments:

Rifath said...

Thanks For providng this blog, i learn About Procurement In Your Blog.
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training

basha said...

Magnificent blog I visit this blog it's extremely wonderful. Interestingly, in this blog content composed plainly and reasonable. The substance of data is useful.
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Big Data and Hadoop Training In Hyderabad
Oracle Fusion HCM Training In Hyderabad

Anonymous said...

Good blog, Thanks for sharing this informative article. It would be helpful to all if you write a full article.
Oracle Fusion HCM Online Training"

shaik shah said...

Goodblog, thanks for sharing this informative article. It would be helpful to all .your way of explaining in this good in this article.
Oracle Fusion HCM Online Training

yamuna said...
This comment has been removed by the author.
Rainbow Training Institute said...

Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article

Big Data and Hadoop Online Training
Big Data Hadoop Training
Hyderabad

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *