- AP_PO_VENDOR_APIS_PKG (appvapib.pls) has been replaced in R12 by AP_VENDOR_PUB_PKG(appvndrb.pls). Both processes perform essentially the same function.
- The supplier’s forms were replaced with OA Framework HTML style pages in R12. Oracle kept in R12 Forms for some aspects, but Suppliers screen was changed. In R12 you now have new tables AP_SUPPLIERS_ALL & AP_SUPPLIER_SITES_ALL. The old form (in 11.5) was working against PO_VENDORS & PO_VENDOR_SITES_ALL. In R12 those tables became views, and the new OA Framework is working against AP_SUPPLIERS_ALL & AP_SUPPLIER_SITES_ALL. That is why you can't use Suppliers old form in R12, and why it will not be supported
- AP_VENDOR_PUB_PKG is not intended to be used an API for the creation/maintenance of Suppliers. Using the procedures directly in custom SQL is not supported. There is an existing set of Concurrent programs "Supplier Open Interface Import", "Supplier Sites Open Interface Import", and "Supplier Site Contacts Open Interface Import". These concurrent programs use the Supplier Interface tables (AP_SUPPLIERS_INT, AP_SUPPLIER_SITES_INT, and AP_SUP_SITE_CONTACTS_INT) to create suppliers using the procedures in AP_VENDOR_PUB_PKG. They are the only means we will support for the import of Suppliers.
AP_SUP_SITE_CONTACT_INT interface used in 11i for loading supplier contact. Currently in R12 contacts can not be loaded using the interface table.
ap_vendor_pub_pkg.create_vendor_contact API is used in R12 and the program has to be registered as a concurrent program.
### Sample R12 Code
BEGIN
v_party_usg_assignment_id := NULL;
v_relationship_id := NULL;
v_directional_flag := NULL;
v_rel_rowid := NULL;
fnd_file.put_line (fnd_file.LOG,
'Vendor code :'
|| rec.vendor_name
|| ' Vendor site code :'
|| rec.vendor_site_code
|| ' Person Last Name : '
|| rec.person_last_name
);
l_vendor_contact.vendor_id := rec.vendor_id;
l_vendor_contact.vendor_site_id := rec.vendor_site_id;
l_vendor_contact.org_id := rec.org_id;
l_vendor_contact.person_first_name := rec.person_first_name;
l_vendor_contact.person_middle_name := rec.person_middle_name;
l_vendor_contact.person_last_name := rec.person_last_name;
l_vendor_contact.phone := rec.phone;
l_vendor_contact.email_address := rec.email_address;
p_init_msg_list := fnd_api.g_true;
p_commit := fnd_api.g_false;
x_return_status := NULL;
x_msg_count := NULL;
x_msg_data := NULL;
IF rec.process_flag = 'I'
THEN
fnd_file.put_line (fnd_file.LOG, 'Creating contacts....');
ap_vendor_pub_pkg.create_vendor_contact
(p_api_version => p_api_version,
p_init_msg_list => p_init_msg_list,
p_commit => p_commit,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_vendor_contact_rec => l_vendor_contact,
x_vendor_contact_id => l_vendor_contact.vendor_contact_id,
x_per_party_id => l_vendor_contact.per_party_id,
x_rel_party_id => l_vendor_contact.relationship_id,
x_rel_id => l_vendor_contact.rel_party_id,
x_org_contact_id => l_vendor_contact.org_contact_id,
x_party_site_id => l_vendor_contact.party_site_id
);
error_handling (rec.r_id, x_return_status, x_msg_count, x_msg_data);
fnd_file.put_line (fnd_file.LOG, '*************');
END IF;
END;
-------------------------------
11i Supplier API
ap_po_vendors_apis_pkg.insert_new_vendor
(p_vendor_name => v_vendor.vendor_name,
p_vendor_type_lookup_code => l_lookup_code,
p_taxpayer_id => NULL,
p_tax_registration_id => NULL,
p_women_owned_flag => NULL,
p_small_business_flag => NULL,
p_minority_group_lookup_code => NULL,
p_supplier_number => v_vendor.vendor_no,
x_vendor_id,
x_status,
x_exception_msg);
ap_po_vendors_apis_pkg.insert_new_vendor_site
(p_vendor_site_code => v_vendor_site.vendor_site_code,
p_vendor_id => l_vendor_id,
p_org_id => l_org_id,
p_address_line1 => v_vendor_site.address_line1,
p_address_line2 => v_vendor_site.address_line2,
p_address_line3 => v_vendor_site.address_line3,
p_address_line4 => v_vendor_site.address_line4,
p_city => v_vendor_site.city,
p_state => v_vendor_site.state,
p_zip => v_vendor_site.zip,
p_province => NULL,
p_county => v_vendor_site.county,
p_country => v_vendor_site.country,
p_area_code => v_vendor_site.area_code,
p_phone => v_vendor_site.phone,
p_fax_area_code => v_vendor_site.fax_area_code,
p_fax => v_vendor_site.fax,
p_email_address => NULL,
p_purchasing_site_flag => v_vendor_site.purchasing_site_flag,
p_pay_site_flag => NULL,
p_rfq_only_site_flag => NULL,
x_vendor_site_id,
x_status,
x_exception_msg);
ap_po_vendors_apis_pkg.insert_new_vendor_contact
(p_vendor_site_id => l_vendor_site_id,
p_first_name => v_vendor_site_contact.FIRST_NAME,
p_last_name => v_vendor_site_contact.LAST_NAME,
p_middle_name => v_vendor_site_contact.MIDDLE_NAME,
p_prefix => v_vendor_site_contact.PREFIX,
p_title => v_vendor_site_contact.TITLE,
p_mail_stop => v_vendor_site_contact.MAIL_STOP,
p_area_code => v_vendor_site_contact.CONTACT_AREA_CODE,
p_phone => v_vendor_site_contact.CONTACT_PHONE,
p_alt_area_code => NULL,
p_alt_phone => NULL,
p_fax_area_code => NULL,
p_fax => NULL,
p_email_address => NULL,
p_url => NULL,
x_vendor_contact_id,
x_status,
x_exception_msg);
Credit goes to the below website(s) :
http://www.oracleerp4u.com/2010/07/r11i-vendor-load-thru-api.html
Thanks for giving valuable info..
ReplyDeleteRegards
ReplyDeleteSridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at sridevikoduru@oracleappstechnical.com | +91 - 9581017828.
Found your blog in the Yahoo bulk turtleneck shirts directory, very nice job, thanks. Vietnam Supplier Management
ReplyDelete