Thursday, June 4, 2015
AP_VENDOR_PUB_PKG.UPDATE_VENDOR_SITE - API to update Vendor/Supplier Site in Oracle Apps R12
Script
SET SERVEROUTPUT ON;
DECLARE
p_api_version NUMBER;
p_init_msg_list VARCHAR2(200);
p_commit VARCHAR2(200);
p_validation_level NUMBER;
x_return_status VARCHAR2(200);
x_msg_count NUMBER;
x_msg_data VARCHAR2(200);
lr_vendor_site_rec apps.ap_vendor_pub_pkg.r_vendor_site_rec_type;
lr_existing_vendor_site_rec ap_supplier_sites_all%ROWTYPE;
p_vendor_site_id NUMBER;
p_calling_prog VARCHAR2(200);
BEGIN
-- Initialize apps session
fnd_global.apps_initialize(1119, 50833, 200);
mo_global.init('SQLAP');
fnd_client_info.set_org_context(101);
-- Assign Basic Values
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 := 2040; -- to be end dated
p_calling_prog := 'XXCUSTOM';
BEGIN
SELECT *
INTO lr_existing_vendor_site_rec
FROM ap_supplier_sites_all assa
WHERE assa.vendor_site_id = p_vendor_site_id;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('Unable to derive the supplier site information for site id:' ||
p_vendor_site_id);
END;
-- Assign Vendor Site Details
lr_vendor_site_rec.vendor_site_id := lr_existing_vendor_site_rec.vendor_site_id;
lr_vendor_site_rec.last_update_date := SYSDATE;
lr_vendor_site_rec.last_updated_by := 1119;
lr_vendor_site_rec.vendor_id := lr_existing_vendor_site_rec.vendor_id;
lr_vendor_site_rec.org_id := lr_existing_vendor_site_rec.org_id;
lr_vendor_site_rec.inactive_date := SYSDATE;
AP_VENDOR_PUB_PKG.UPDATE_VENDOR_SITE(p_api_version => p_api_version,
p_init_msg_list => p_init_msg_list,
p_commit => p_commit,
p_validation_level => p_validation_level,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_vendor_site_rec => lr_vendor_site_rec,
p_vendor_site_id => p_vendor_site_id,
p_calling_prog => p_calling_prog);
DBMS_OUTPUT.put_line('X_RETURN_STATUS = ' || x_return_status);
DBMS_OUTPUT.put_line('X_MSG_COUNT = ' || x_msg_count);
DBMS_OUTPUT.put_line('X_MSG_DATA = ' || x_msg_data);
END;
/
Test Results:
2 Responses to “AP_VENDOR_PUB_PKG.UPDATE_VENDOR_SITE - API to update Vendor/Supplier Site in Oracle Apps R12”
February 23, 2016 at 11:33 PM
I certainly agree to some points that you have discussed on this post. I appreciate that you have shared some reliable tips on this review.
February 26, 2021 at 1:27 AM
p_calling_prog := 'XXCUSTOM';
Program or short name???
Post a Comment