9 Responses to Supplier API in R12

  1. Vivek says:

    I am new to Oracle Apps and want to create supplier details. I created Supplier,Supplier Site but while creating supplier contact saying
    Column subject_id must have a value.
    Column object_id must have a value.
    Column party_id must have a value.
    Column location_id must have a value.
    Column owner_table_id must have a value.
    Invalid value for owner_table_id. Please enter party_id value from hz_parties.
    Column owner_table_id must have a value.
    Invalid value for owner_table_id. Please enter party_id value from hz_parties.
    Column owner_table_id must have a value.
    Invalid value for owner_table_id. Please enter party_id value from hz_parties.

    Can you please give an example of
    POS_VENDOR_PUB_PKG.Create_Vendor_Contact

    Thanks
    Vivek

  2. Use the sample script to create a supplier contact.

    DECLARE
    l_vendor_contact_rec ap_vendor_pub_pkg.r_vendor_contact_rec_type;
    l_return_status VARCHAR2(10);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(1000);
    l_vendor_contact_id NUMBER;
    l_per_party_id NUMBER;
    l_rel_party_id NUMBER;
    l_rel_id NUMBER;
    l_org_contact_id NUMBER;
    l_party_site_id NUMBER;
    BEGIN

    — Required

    SELECT vendor_id
    INTO l_vendor_contact_rec.vendor_id
    FROM pos_po_vendors_v
    WHERE vendor_name = ‘TestVendor’;
    l_vendor_contact_rec.org_id := ‘204’;
    l_vendor_contact_rec.person_first_name := ‘John’;
    l_vendor_contact_rec.person_last_name := ‘Anderson’;

    — Optional

    l_vendor_contact_rec.phone := ‘2459860’;
    l_vendor_contact_rec.email_address := ‘ajohn@gmail.com’;
    — etc… —
    pos_vendor_pub_pkg.create_vendor_contact(
    p_vendor_contact_rec => l_vendor_contact_rec,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data,
    x_vendor_contact_id => l_vendor_contact_id,
    x_per_party_id => l_per_party_id,
    x_rel_party_id => l_rel_party_id,
    x_rel_id => l_rel_id,
    x_org_contact_id => l_org_contact_id,
    x_party_site_id => l_party_site_id);
    COMMIT;
    dbms_output.put_line(‘return_status: ‘||l_return_status);
    dbms_output.put_line(‘msg_data: ‘||l_msg_data);
    dbms_output.put_line(‘vendor_contact_id: ‘||l_vendor_contact_id);
    dbms_output.put_line(‘party_site_id: ‘||l_party_site_id);
    dbms_output.put_line(‘per_party_id: ‘||l_per_party_id);
    dbms_output.put_line(‘rel_party_id: ‘||l_rel_party_id);
    dbms_output.put_line(‘rel_id: ‘||l_rel_id);
    dbms_output.put_line(‘org_contact_id: ‘||l_org_contact_id);
    END;
    /

    Thanks….

  3. kishan says:

    Hi,
    I am new to Oracle Apps and want to create supplier details. I created Supplier,Supplier Site but
    while creating supplier contact throwing me the below error..

    Column subject_id must have a value.
    Column object_id must have a value.
    Column party_id must have a value.
    Column location_id must have a value.

    TEST CODE :
    Please look into it and provide me the solution …

    declare
    l_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type;
    l_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
    l_vendor_site_con_rec AP_VENDOR_PUB_PKG.r_vendor_contact_rec_type;
    x_return_status VARCHAR2(2000);
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(2000);
    l_upd number := 0;
    x_vendor_id number;
    x_party_id number;
    x_vendor_site_id number;
    x_party_site_id number;
    x_location_id number;
    l_party_site_id number;
    l_organization_id number;
    x_per_party_id NUMBER;
    x_rel_party_id NUMBER;
    x_rel_id NUMBER;
    x_org_contact_id NUMBER;
    — x_party_site_id NUMBER;
    x_vendor_contact_id NUMBER;
    begin
    –mo_global.set_policy_context(‘S’,204);
    l_vendor_rec.SEGMENT1 := ‘241’;
    l_vendor_rec.VENDOR_NAME := ‘KU’;
    l_vendor_rec.SUMMARY_FLAG := ‘N’;
    l_vendor_rec.ENABLED_FLAG := ‘Y’;

    AP_VENDOR_PUB_PKG.Create_Vendor
    ( p_api_version => 1,
    x_return_status => x_return_status,
    x_msg_count => x_msg_count,
    x_msg_data => x_msg_data,
    p_vendor_rec => l_vendor_rec,
    x_vendor_id => x_vendor_id,
    x_party_id => x_party_id
    );

    if (x_return_status ‘S’) then
    dbms_output.put_line(‘Encountered ERROR in supplier creation!!!’);
    dbms_output.put_line(‘————————————–‘);
    dbms_output.put_line(x_msg_data);

    IF x_msg_count > 1 THEN
    FOR i IN 1..x_msg_count LOOP
    dbms_output.put_line(substr(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ),1,255));
    END LOOP;
    END IF;
    else

    l_vendor_site_rec.vendor_id := x_vendor_id;
    l_vendor_site_rec.VENDOR_SITE_CODE := ‘HJSU’;
    l_vendor_site_rec.org_id := 204;
    l_vendor_site_rec.COUNTRY := ‘AE’;
    l_vendor_site_rec.ADDRESS_LINE1 :=’Abu Dhabi’;
    l_vendor_site_rec.PURCHASING_SITE_FLAG := ‘Y’;
    l_vendor_site_rec.PAY_SITE_FLAG := ‘Y’;
    l_vendor_site_rec.COUNTY :=’New York’;
    l_vendor_site_rec.CITY := ‘hyd’;
    l_vendor_site_rec.ZIP :=9023;
    l_vendor_site_rec.STATE :=’ff’ ;
    l_vendor_site_rec.ORG_NAME :=’Vision Operations’;
    AP_VENDOR_PUB_PKG.Create_Vendor_Site
    ( p_api_version => 1,
    x_return_status => x_return_status,
    x_msg_count => x_msg_count,
    x_msg_data => x_msg_data,
    p_vendor_site_rec => l_vendor_site_rec,
    x_vendor_site_id => x_vendor_site_id,
    x_party_site_id => x_party_site_id,
    x_location_id => x_location_id
    );

    if (x_return_status ‘S’) then
    dbms_output.put_line(‘Encountered ERROR in supplier site creation!!!’);
    dbms_output.put_line(‘————————————–‘);
    dbms_output.put_line(x_msg_data);
    IF x_msg_count > 1 THEN
    FOR i IN 1..x_msg_count LOOP
    dbms_output.put_line(substr(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ),1,255));
    END LOOP;
    END IF;
    ELSE
    dbms_output.put_line(‘Supplier Site Created!!!’);
    l_vendor_site_con_rec.PERSON_LAST_NAME:=’DDH’;
    l_vendor_site_con_rec.VENDOR_SITE_CODE:=’HJSU’;

    AP_VENDOR_PUB_PKG.Create_Vendor_Contact
    ( p_api_version => 1,
    x_return_status =>x_return_status,
    x_msg_count => x_msg_count,
    x_msg_data => x_msg_data,
    p_vendor_contact_rec =>l_vendor_site_con_rec,
    x_vendor_contact_id => x_vendor_contact_id,
    x_per_party_id => x_per_party_id,
    x_rel_party_id =>x_rel_party_id,
    x_rel_id => x_rel_id,
    x_org_contact_id =>x_org_contact_id,
    x_party_site_id =>x_party_site_id);

    if (x_return_status ‘S’) then
    dbms_output.put_line(‘Encountered ERROR in supplier site CONTACT creation!!!’);
    dbms_output.put_line(‘————————————–‘);
    dbms_output.put_line(x_msg_data);
    IF x_msg_count > 1 THEN
    FOR i IN 1..x_msg_count LOOP
    dbms_output.put_line(substr(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ),1,255));
    END LOOP;
    END IF;
    ELSE

    dbms_output.put_line(‘Supplier Site CONTACT Created!!!’);

    end if;
    end if;
    END IF;

    end;

    • I think there is some issue with AP_VENDOR_PUB_PKG.create_vendor_contact() API from Release: 12.0 and later. There is a MOS Note -How To Create Supplier Contacts Using Supplier Contact Import? [ID 1186663.1] – says that….

      AP_VENDOR_PUB_PKG.create_vendor_contact() is not intended to be used as an API. The only fully supported way to create a supplier Contact and have it associated with a specific Supplier Address ID is to use the seeded concurrent program Supplier Site Contacts Open Interface Import. The name of this program is a bit misleading as it actually creates Supplier Address Contacts. It uses AP_SUP_SITE_CONTACT_INT as an interface table. The program will run through all rows in that table that have not already been processed to create contacts and make the necessary links between the contact and the address.

      The following SQL will populate the interface table with a row that would create a contact and associate it with an address. There is no direct Party_Site_ID column in the interface table. The system will derive the address for the Supplier Site based on Vendor_Site_ID.

      INSERT INTO ap_sup_site_contact_int
      (vendor_site_id, vendor_site_code, — One or the other is required
      org_id, operating_unit_name, — One or the other is required
      first_name, last_name, prefix, title, mail_stop, area_code,
      phone, department, status, email_address, url, alt_area_code,
      alt_phone, fax_area_code, fax, vendor_id, vendor_contact_interface_id)
      VALUES (, NULL,
      , NULL,
      ”, ”, NULL, NULL, NULL, ‘999’,
      ‘999-9999’, NULL, ‘NEW’, NULL, NULL, NULL,
      NULL, NULL, NULL, , AP_SUP_SITE_CONTACT_INT_S.NextVal)

      Thanks..

  4. kishan says:

    Thanks ,

  5. kishan says:

    HI,
    I am new to oracle applications,
    Please tell me the difference between organization_id and master organization_id..

    Thanks

  6. Arsalan says:

    Hi,

    The POS_VENDOR_PUB_PKG only updates AP tables of Vendor. Is there any package available to update the TCA side as well.

    Thanks.

    • Please refer the below Metalink Note:
      Using TCA API’s Including Examples [ID 201243.1]

  7. Santhu says:

    One of the my program updating vat_code in ap_suppliers Table by using ap_vendor_pkg in 11i
    But in R12 vat_code removed in the Same package. is there any other API available to update vat_code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: