Wednesday, March 26, 2014

Script to Update Shipping Attributes in wsh_delivery_details


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;

17 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. 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
  3. 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
  4. Nice post... The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. Thank you for sharing such a great blog.. Software Testing Training Institute in Chennai | Selenium Training Institute in Chennai | ISTQB Training Institute in Chennai

    ReplyDelete
  5. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.
    dotnet training in bangalore

    ReplyDelete
  6. I really enjoyed while reading your article, the information you have delivered in this post was damn good. Keep sharing your post with efficient news. RPA Training Institute in Chennai | UI Path Training Institute in Chennai | Blue Prism Training Institute in Chennai

    ReplyDelete
  7. The strategy you have posted on the oracle hepled me to get into the next level of this technology and had lot of informations in it.
    Best VMware Training Institute in Chennai | Best VMware Training Institute in Velachery

    ReplyDelete
  8. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas. Automation Anywhere Training in Chennai | RPA Training Institute in Chennai | UI Path Training Institute in Chennai | Blue Prism Training Institute in Chennai

    ReplyDelete
  9. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    blue prism training in chennai

    ReplyDelete
  10. Bottles Filled with Liquids. Perhaps understandably, it is not advisable to ship open bottles filled with liquids or other contents in cargo containers for international shipment. atlantic way russia

    ReplyDelete
  11. Excellent information with unique content and it is very useful to know about the information based on blogs... Digital Marketing Summer Camp in Velachery | Digital Marketing Summer Classes in Chennai | Digital Marketing Summer courses in Taramani

    ReplyDelete
  12. Love how wonderfully every word is written with proper balance.
    importados da china

    ReplyDelete

Note: Only a member of this blog may post a comment.