Friday, 21 August 2015

Ap supplier site update API in oracle apps

/* Formatted on 8/12/2015 12:49:32 PM (QP5 v5.240.12305.39446) */
DECLARE
   l_vendor_site_rec   AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
   l_vendor_rec        AP_VENDOR_PUB_PKG.r_vendor_rec_type;
   x_vendor_site_id    NUMBER;
   x_vendor_id         NUMBER;
   x_msg_data          VARCHAR2 (1000);
   x_msg_count         NUMBER;
   p_count             NUMBER;
   x_return_status     VARCHAR2 (10);

   CURSOR lcu_rec
   IS
      SELECT vendor_id,
             vendor_site_id,
             purchasing_site_flag,
             org_id
        FROM ap_supplier_sites_all
       WHERE vendor_site_id = 1136620;

BEGIN
   FOR i IN lcu_rec
   LOOP
      l_vendor_site_rec.vendor_id := i.vendor_id;               -- Supplier Id
      l_vendor_site_rec.org_id := i.org_id;               -- Operating Unit id
      x_vendor_site_id := i.vendor_site_id;           -- Site Id to be updated
      --      l_vendor_site_rec.match_option := 'R';
      l_vendor_site_rec.purchasing_site_flag := 'N'; -- eg: purchasing_site_flag

      AP_VENDOR_PUB_PKG.Update_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,
         p_vendor_site_id    => x_vendor_site_id);
      COMMIT;
   END LOOP;
END;

2 comments:

  1. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, Oracle Manufacturing, BI Publisher, OAF, ADF, SQL, PL/SQL, D2K at sridevikoduru@oracleappstechnical.com | +91 - 9581017828.

    ReplyDelete
  2. Sridevi ,
    Comments are to leave feedback for the hard work author put in to share the knowledge or to ask questions . So please stop using it for your own publicity .So please stop using it for your own publicity .So please stop using it for your own publicity

    ReplyDelete