Showing posts with label API to Update Customer Sites and assign Tax code in Oracle apps. Show all posts
Showing posts with label API to Update Customer Sites and assign Tax code in Oracle apps. Show all posts

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

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

Name

Email *

Message *