/* Formatted on 2012/05/09 16:24 (Formatter Plus v4.8.8) */
CREATE OR REPLACE PROCEDURE accts_pay_code (
errbuf OUT VARCHAR2,
retcode OUT VARCHAR2
)
IS
--Local Variable Declaration
l_msg_count NUMBER := 0;
l_msg_data VARCHAR2 (2000) := NULL;
l_checkmsg_data VARCHAR2 (2000) := NULL;
l_msg_data_err VARCHAR2 (2000) := NULL;
l_return_status VARCHAR2 (10) := NULL;
l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_vendor_site_id ap_supplier_sites.vendor_site_id%TYPE;
v_vendor_site_id ap_supplier_sites.vendor_site_id%TYPE;
l_msg_index_out NUMBER;
CURSOR c_supplier_site
IS
SELECT vendor_site_id
FROM po_vendor_sites_all
WHERE accts_pay_code_combination_id = 10008;
--vendor_site_id = '79';
BEGIN
FOR crec_supplier_site IN c_supplier_site
LOOP
mo_global.init ('SQLAP');
mo_global.set_policy_context ('S', '2658');
-- Initialize values of API attributes
l_vendor_site_id := crec_supplier_site.vendor_site_id; --113005;
l_vendor_site_rec.accts_pay_code_combination_id := '4001';
----l_vendor_site_rec.email_address := 'Titaporn_Tuchinda1@mckinsey.com';
--l_vendor_site_rec.remittance_email := 'Titaporn_Tuchinda1@mckinsey.com';
--l_vendor_site_rec.remit_advice_delivery_method := 'EMAIL';
--l_vendor_site_rec.ext_payee_rec.default_pmt_method := 'EFT';
--l_vendor_site_rec.ext_payee_rec.remit_advice_email := 'Titaporn_Tuchinda@mckinsey.com';
--l_vendor_site_rec.inactive_date := FND_API.G_MISS_DATE;
--l_vendor_site_rec.org_id := 2658;
-- Added by Sreekumar nair on 07-Mar-2012 in order to deactivate a supplier site, if required.
-- API Call for supplier site updation
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_false,
p_validation_level => fnd_api.g_valid_level_full,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_vendor_site_rec => l_vendor_site_rec,
p_vendor_site_id => l_vendor_site_id
);
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLERRM);
END;
CREATE OR REPLACE PROCEDURE accts_pay_code (
errbuf OUT VARCHAR2,
retcode OUT VARCHAR2
)
IS
--Local Variable Declaration
l_msg_count NUMBER := 0;
l_msg_data VARCHAR2 (2000) := NULL;
l_checkmsg_data VARCHAR2 (2000) := NULL;
l_msg_data_err VARCHAR2 (2000) := NULL;
l_return_status VARCHAR2 (10) := NULL;
l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_vendor_site_id ap_supplier_sites.vendor_site_id%TYPE;
v_vendor_site_id ap_supplier_sites.vendor_site_id%TYPE;
l_msg_index_out NUMBER;
CURSOR c_supplier_site
IS
SELECT vendor_site_id
FROM po_vendor_sites_all
WHERE accts_pay_code_combination_id = 10008;
--vendor_site_id = '79';
BEGIN
FOR crec_supplier_site IN c_supplier_site
LOOP
mo_global.init ('SQLAP');
mo_global.set_policy_context ('S', '2658');
-- Initialize values of API attributes
l_vendor_site_id := crec_supplier_site.vendor_site_id; --113005;
l_vendor_site_rec.accts_pay_code_combination_id := '4001';
----l_vendor_site_rec.email_address := 'Titaporn_Tuchinda1@mckinsey.com';
--l_vendor_site_rec.remittance_email := 'Titaporn_Tuchinda1@mckinsey.com';
--l_vendor_site_rec.remit_advice_delivery_method := 'EMAIL';
--l_vendor_site_rec.ext_payee_rec.default_pmt_method := 'EFT';
--l_vendor_site_rec.ext_payee_rec.remit_advice_email := 'Titaporn_Tuchinda@mckinsey.com';
--l_vendor_site_rec.inactive_date := FND_API.G_MISS_DATE;
--l_vendor_site_rec.org_id := 2658;
-- Added by Sreekumar nair on 07-Mar-2012 in order to deactivate a supplier site, if required.
-- API Call for supplier site updation
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_false,
p_validation_level => fnd_api.g_valid_level_full,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_vendor_site_rec => l_vendor_site_rec,
p_vendor_site_id => l_vendor_site_id
);
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLERRM);
END;
No comments:
Post a Comment