Wednesday, March 26, 2014

Script to Update Shipping Attributes in wsh_delivery_details

Your Ad Here


DECLARE
   CURSOR dev_header_cur
   IS
      SELECT *
        FROM apps.wsh_delivery_details
       WHERE delivery_detail_id IN
                (970938993, 970938998, 970938997); -- Provide delivery_detail_id

   l_index                     NUMBER;
   l_msg_return                NUMBER;
   x_return_status             VARCHAR2 (1);
   x_msg_count                 NUMBER;
   x_msg_data                  VARCHAR2 (2000);
   l_changedattributetabtype   wsh_delivery_details_pub.changedattributetabtype;
   l_file_name                 VARCHAR2 (32767);
   l_return_status             VARCHAR2 (32767);
   l_msg_data                  VARCHAR2 (32767);
   l_msg_count                 NUMBER;
BEGIN
   fnd_global.APPS_INITIALIZE (2861, 67384, 660); -- Provide user_id, resp_id and appl_id to initialize

   fnd_profile.put ('WSH_DEBUG_MODULE', '%');
   fnd_profile.put ('WSH_DEBUG_LEVEL', WSH_DEBUG_SV.C_STMT_LEVEL);
   DBMS_OUTPUT.PUT_LINE ('Start');
   wsh_debug_sv.start_debugger (l_file_name,
                                l_return_status,
                                l_msg_data,
                                l_msg_count);
   l_index := 0;

   FOR dev_header_rec IN dev_header_cur
   LOOP
      l_index := L_index + 1;

      l_changedattributetabtype (l_index).delivery_detail_id :=
         Dev_header_rec.delivery_detail_id;
      l_changedattributetabtype (l_index).subinventory := 'ICENI'; -- Provide subinventory to update
   END LOOP;

   wsh_delivery_details_pub.Update_Shipping_Attributes (
      p_api_version_number   => 1.0,
      p_init_msg_list        => FND_API.G_FALSE,
      p_commit               => FND_API.G_FALSE,
      x_return_status        => X_return_status,
      x_msg_count            => X_msg_count,
      x_msg_data             => X_msg_data,
      p_changed_attributes   => l_changedattributetabtype,
      p_source_code          => 'OE');

   COMMIT;

   IF x_return_status <> fnd_api.G_RET_STS_SUCCESS
   THEN
      FOR i IN 1 .. x_msg_count
      LOOP
         fnd_msg_pub.get (p_msg_index       => I,
                          P_encoded         => 'F',
                          P_data            => X_msg_data,
                          P_msg_index_out   => l_msg_return);
         DBMS_OUTPUT.PUT_LINE (x_msg_data);
      END LOOP;
   ELSE
      DBMS_OUTPUT.PUT_LINE ('S');
   END IF;
END;
Your Ad Here

8 comments:

  1. Thanks for your informative post. Placement training is excellent option for students willing to enter software development industry with lucrative salary package.

    ReplyDelete
  2. The best thing is that your blog really informative thanks for your great information!
    erp software in chennai

    ReplyDelete
  3. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
    No.1 IOS Training Institute in Chennai | Best Android Training Institute in Chennai | Java Training Institute in Chennai

    ReplyDelete
  4. Very interesting blog which helps me to get the in depth knowledge about the technology, Thanks for sharing such a nice blog.MatLab Training Institute in Chennai | Mat Lab Project Center in Chennai | Online Training in Chennai

    ReplyDelete
  5. Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.
    Java Training Institute in Chennai | DotNet Training Institute in Chennai | Web Designing Training Institute in Chennai

    ReplyDelete