0% found this document useful (0 votes)
146 views

Script To Update The Supplier Sites "Auto - Tax - Calc - Flag" (Options: Y, N and NULL)

This script updates the "auto_tax_calc_flag" field for supplier sites in Oracle Applications to 'N'. It loops through a cursor of supplier site IDs, sets the flag to 'N', calls an API to update the site, commits or rolls back based on the return status, and outputs any messages. The script is intended to be run against supplier sites for a specific segment in a given organization.

Uploaded by

Prithi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views

Script To Update The Supplier Sites "Auto - Tax - Calc - Flag" (Options: Y, N and NULL)

This script updates the "auto_tax_calc_flag" field for supplier sites in Oracle Applications to 'N'. It loops through a cursor of supplier site IDs, sets the flag to 'N', calls an API to update the site, commits or rolls back based on the return status, and outputs any messages. The script is intended to be run against supplier sites for a specific segment in a given organization.

Uploaded by

Prithi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

11/5/2019 Oracle Applications: Script to update the Supplier Sites "auto_tax_calc_flag" (Options : Y,N and NULL)

More

Home AP AR GL INV PO OM HR PA FAQS SCRIPTS PL-SQL TECH OAF FUSIO

SATURDAY, DECEMBER 2, 2017

Script to update the Supplier Sites "auto_tax_calc_flag" (Options : Y,N and NULL)

DECLARE
CURSOR CUR_SITES
IS
select
asa.vendor_site_id
from
ap_suppliers aps
,ap_supplier_sites_all asa
where 1=1
and aps.vendor_id = asa.vendor_id
and NVL(vendor_type_lookup_code,0) != 'EMPLOYEE'
and asa.inactive_date is null
and asa.org_id = 204
and aps.segment1 in ('5689')
order by asa.auto_tax_calc_flag,aps.VENDOR_NAME,asa.vendor_site_code
;

l_vendor_site_id NUMBER;
l_SITES_msg_count NUMBER;
l_SITES_msg_data VARCHAR2(4000);
l_SITES_return_status VARCHAR2(10);
l_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;

BEGIN
FND_GLOBAL.apps_initialize(1230,50239,200);

FOR SITES_REC IN CUR_SITES


LOOP
l_vendor_site_id := SITES_REC.VENDOR_SITE_ID;
l_vendor_site_rec.AUTO_TAX_CALC_FLAG := 'N';

AP_VENDOR_PUB_PKG.UPDATE_VENDOR_SITE
(p_api_version => '1.0',
p_init_msg_list => FND_API.G_TRUE ,
p_commit => FND_API.G_TRUE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
p_vendor_site_id => l_vendor_site_id,
p_vendor_site_rec => l_vendor_site_rec,
x_return_status => l_SITES_return_status,
x_msg_count => l_SITES_msg_count,
x_msg_data => l_SITES_msg_data
);

IF l_SITES_return_status = 'S'
THEN
COMMIT;
dbms_output.put_line('Vendor Site ID : '||l_vendor_site_id||' Status is : '||l_SITES_return_status);
ELSE
ROLLBACK;
dbms_output.put_line('Vendor Site ID : '||l_vendor_site_id||' Status is : '||l_SITES_return_status);
END IF;

FOR I IN 1..l_SITES_msg_count
LOOP
l_SITES_msg_data := SUBSTR(FND_MSG_PUB.GET(p_encoded=>'T'),1,255);
dbms_output.put_line(l_SITES_msg_data);
END LOOP ;
END LOOP ;

END;

oracleapps88.blogspot.com/2017/12/script-to-update-supplier-sites.html 1/3
11/5/2019 Oracle Applications: Script to update the Supplier Sites "auto_tax_calc_flag" (Options : Y,N and NULL)

Best Blogger Gadgets

Posted by Raju Chinthapatla at 7:53:00 PM

Labels: AP, API, CONVERSIONS, SCRIPTS, SUPPLIERS

No comments:

Post a Comment

Enter your comment...

Comment as: Google Accoun

Publish Preview

Links to this post


Create a Link

Newer Post Home Older Po

Subscribe to: Post Comments (Atom)

oracleapps88.blogspot.com/2017/12/script-to-update-supplier-sites.html 2/3
11/5/2019 Oracle Applications: Script to update the Supplier Sites "auto_tax_calc_flag" (Options : Y,N and NULL)

Email : [email protected]. Picture Window theme. Theme images by konradlew. Powered by Blogger.

Get Flower Effect

oracleapps88.blogspot.com/2017/12/script-to-update-supplier-sites.html 3/3

You might also like