<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Function Module for Unpacking a shipment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639107#M876440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While Packing Bundle onto Container, following are the values that we are passing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Fill the interface structure for Packing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    lwa_i_packing_item_hu-venum = lv_cont_venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-vepos = lv_vepos.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-velin = '3'.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-sub_hu_venum = wa_vepo-venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-quantity = '1'.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-veanz = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember you have already created a HU via BAPI_HU_CREATE and now are trying to pack this so the quantity will be ONE (one bundle being packed) and NOT THE MATERIAL Qty in HU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The only difference between packing and unpacking will be VEANZ indicator which will be "1" for packing and "-1" for Unpacking.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yaah, you are right I gave you code for Unpacking and forgot to mention the above Point marked in Bold.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do let me know if you still have any queries so that we can help you out..&lt;/P&gt;&lt;P&gt;All the best...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmi Narayana.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2008 04:23:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-21T04:23:43Z</dc:date>
    <item>
      <title>Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639092#M876425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having complications finding the right module to unpack Handling Units from a shipment. Although PROCESS_HU_INBOUND_DLVRY is for deliveries I figured it may work for shipments. However, I can't quite verify this would actually work. I also tried Unpack_Handling_Unit and HU_packing_and_unpacking. I look forward to your responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 21:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639092#M876425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-11T21:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639093#M876426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if these helps -&lt;/P&gt;&lt;P&gt;BAPI_HU_UNPCK&lt;/P&gt;&lt;P&gt;UNPACK_HANDLING_UNIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 22:08:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639093#M876426</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2008-04-11T22:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639094#M876427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christoper Trucker,&lt;/P&gt;&lt;P&gt;                               Try this FM's :&lt;/P&gt;&lt;P&gt;                                       BAPI_HU_UNPACK&lt;/P&gt;&lt;P&gt;                                       MAP2I_BAPIITMUNPACK_TO_HUUNPAC&lt;/P&gt;&lt;P&gt;                                      GET_UNPACK_HU&lt;/P&gt;&lt;P&gt;                                      GET_UNPACK_MAT&lt;/P&gt;&lt;P&gt;                                     GET_UNPACK_PACK&lt;/P&gt;&lt;P&gt;                                     GET_UNPACK_SN&lt;/P&gt;&lt;P&gt;                                     UNPACK_HANDLING_UNIT&lt;/P&gt;&lt;P&gt;                                    HU_UNPACK&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greetson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 22:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639094#M876427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-11T22:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639095#M876428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the full results using 3 function modules in this order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) RV_SHIPMENT_VIEW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) HU_PACKING_AND_UNPACKING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) HU_POST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HU_POST actually updates the header which is probably what I was missing. Thanks for your input!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 13:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639095#M876428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T13:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639096#M876429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to unpack HU for RF Packing and unpacking&lt;/P&gt;&lt;P&gt;I need to know what parameters did u pass to pack or unpack the HU for the FM HU_PACKING_AND_UNPACKING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we need to pass negative quantity while unpacking? but i m getting error saying qty not entered.&lt;/P&gt;&lt;P&gt;Please help me with this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 11:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639096#M876429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T11:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639097#M876430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you get to do packing/unpacking of a HU? In my case, I am able to pack but not to unpack the HU. Any sugestion of which bapi/FM would work? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need an example code for the packing, just let me know &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nisha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 14:26:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639097#M876430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T14:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639098#M876431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nisha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please pass on to me the values that are to be passed onto the FM to pack HUs onto Shipment. I guess you have already done a similar scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coming onto deletion of HU from delivery, I did small recording for the same on VL02N - goto HU's screen and choose find HU from menu - give HU to be deleted and delete it and embedded this code in a RFC for using with our scanner solution.&lt;/P&gt;&lt;P&gt;Though i know that BDC's on enjoy transactions are least preferred but somehow after spending lot of time on identifying BAPI/RFC i had to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can pass on to me the steps of logic which you have used for packing of HU's on shipment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmi Narayana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 05:16:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639098#M876431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T05:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639099#M876432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd need your help to unpack und the pack a delivery from a HU.&lt;/P&gt;&lt;P&gt;The HU is created within a shipment and the delivery is packed into the HU.&lt;/P&gt;&lt;P&gt;We then reveive the picking information from outside. when I then try to pick the batches,&lt;/P&gt;&lt;P&gt;I receive the following error:&lt;/P&gt;&lt;P&gt;"Quantity change not permitted; 30,000 TO are packed in shipment 0000001112" (VL354)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me this seems to be ok, because with the picking i change the packed quantity.&lt;/P&gt;&lt;P&gt;so far, so good. then I tried to unpack the delivery with the BAPI:&lt;/P&gt;&lt;P&gt;BAPI_HU_UNPACK&lt;/P&gt;&lt;P&gt;There I receive the follwing error:&lt;/P&gt;&lt;P&gt;"Processing of HUs for selected objects not possible"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because my object code is "04" and this object type is not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea or example how to unpack a delivery from my HU within my shipment ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 12:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639099#M876432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T12:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639100#M876433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nisha, anyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im having real problems packing using HU_PACKING_AND_UNPACKING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See description of my issue below.  Most grateful if anyone can provide me with any sample code that calls the full suite of function modules in right order to pack a delivery into a HU within a shipment, including how you set up the parameters.  That would be so so great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"I have a shipment that can be viewed via the VTxxN transactions. The shipment has several deliveries in it. I want to emulate the packing of the deliveries into HU's within VT02N (brown cardboard box icon) using a BAPI or fn module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im having difficulties with function module HU_PACKING_AND_UNPACKING which I thought was the one to use, but this fn module has a structure GS_HEADER51 which is populated when called from VT02N but of course its not populated when I test it or call from my code, and the contents of this structure are checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are other BAPI's like BAPI_HU_PACK and BAPI_HU_CREATE but I dont believe these work with deliveries."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 17:14:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639100#M876433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T17:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639101#M876434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The procedure to use HU_PACKING_AND_UNPACKING is like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the central functions of HU operations are based on data access from global memory. So  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Identify all the HUs need to be packed and call the FM, HU_GET_HUS which puts the details of the HUs into Global memory for later processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. loop through the HUs and perform packing or unpacking using HU_PACKING_AND_UNPACKING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Packing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM repack_single_container USING pwa_unpacked_cont&lt;/P&gt;&lt;P&gt;                                                TYPE zsd_dlvry_realoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local data declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA: lwa_i_packing_item_hu TYPE packing_item_hu,&lt;/P&gt;&lt;P&gt;        lwa_e_packing_item_hu TYPE packing_item_hu,&lt;/P&gt;&lt;P&gt;        lwa_es_item TYPE vepovb,&lt;/P&gt;&lt;P&gt;        lwa_header LIKE vekpvb,&lt;/P&gt;&lt;P&gt;        lv_rcode TYPE sy-subrc,&lt;/P&gt;&lt;P&gt;        lv_number TYPE vpobjkey,&lt;/P&gt;&lt;P&gt;        lv_success TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_vekp INTO wa_vekp.&lt;/P&gt;&lt;P&gt;    CLEAR: wa_vepo.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Get VEPO details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    READ TABLE it_vepo INTO wa_vepo&lt;/P&gt;&lt;P&gt;                       WITH KEY unvel = wa_vekp-venum.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Fill the import structure for packing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR: lwa_i_packing_item_hu, lwa_e_packing_item_hu,&lt;/P&gt;&lt;P&gt;           lv_rcode, lwa_es_item.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Fill the interface structure for Un-packing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    lwa_i_packing_item_hu-venum = pwa_unpacked_cont-cont_venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-vepos = wa_vepo-vepos.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-velin = wa_vepo-velin.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-sub_hu_venum = wa_vepo-venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-quantity = '0'.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-veanz = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Un-Pack the Truck/Container on shipment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'HU_PACKING_AND_UNPACKING'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        is_packing_request = lwa_i_packing_item_hu&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ef_rcode           = lv_rcode&lt;/P&gt;&lt;P&gt;        es_p_request       = lwa_e_packing_item_hu&lt;/P&gt;&lt;P&gt;        es_item            = lwa_es_item&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        cs_header          = lwa_header&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        missing_data       = 1&lt;/P&gt;&lt;P&gt;        hu_not_changeable  = 2&lt;/P&gt;&lt;P&gt;        not_possible       = 3&lt;/P&gt;&lt;P&gt;        customizing        = 4&lt;/P&gt;&lt;P&gt;        weight             = 5&lt;/P&gt;&lt;P&gt;        volume             = 6&lt;/P&gt;&lt;P&gt;        serial_nr          = 7&lt;/P&gt;&lt;P&gt;        fatal_error        = 8&lt;/P&gt;&lt;P&gt;        OTHERS             = 9.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Clear the success flag&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR: lv_success.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Error Message: Re-packing of bundle frm container failed&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      PERFORM append_errormessage USING 'E'&lt;/P&gt;&lt;P&gt;                                        text-011&lt;/P&gt;&lt;P&gt;                                        pwa_unpacked_cont-containerno&lt;/P&gt;&lt;P&gt;                                        wa_vekp-exidv&lt;/P&gt;&lt;P&gt;                                        pwa_unpacked_cont-tknum&lt;/P&gt;&lt;P&gt;                                        ''.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      lv_success = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    CLEAR: wa_vekp.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If Un-pack of every bundle on Container/Truck is successful&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF lv_success = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Commit the transaction&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'HU_POST'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        if_synchron = 'X'&lt;/P&gt;&lt;P&gt;        if_commit   = 'X'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ef_number   = lv_number.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      DELETE it_unpacked_cont WHERE tknum = pwa_unpacked_cont-tknum&lt;/P&gt;&lt;P&gt;                                AND cont_venum =&lt;/P&gt;&lt;P&gt;                                    pwa_unpacked_cont-cont_venum.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Error Message: Repacking of bundle frm container failed&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM append_errormessage USING 'E'&lt;/P&gt;&lt;P&gt;                                      text-011&lt;/P&gt;&lt;P&gt;                                      pwa_unpacked_cont-containerno&lt;/P&gt;&lt;P&gt;                                      wa_vekp-exidv&lt;/P&gt;&lt;P&gt;                                      pwa_unpacked_cont-tknum&lt;/P&gt;&lt;P&gt;                                      ''.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                     " repack_single_container&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Unpack:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local data declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA: lwa_i_packing_item_hu TYPE packing_item_hu,&lt;/P&gt;&lt;P&gt;        lwa_e_packing_item_hu TYPE packing_item_hu,&lt;/P&gt;&lt;P&gt;        lwa_vepo    TYPE vepovb,&lt;/P&gt;&lt;P&gt;        lwa_es_item TYPE vepovb,&lt;/P&gt;&lt;P&gt;        lwa_header LIKE vekpvb,&lt;/P&gt;&lt;P&gt;        lv_rcode TYPE sy-subrc,&lt;/P&gt;&lt;P&gt;        lv_number TYPE vpobjkey,&lt;/P&gt;&lt;P&gt;        lv_success TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_vekp INTO wa_vekp.&lt;/P&gt;&lt;P&gt;    CLEAR: wa_vepo, lwa_vepo.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Get VEPO details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    READ TABLE it_vepo INTO wa_vepo&lt;/P&gt;&lt;P&gt;                       WITH KEY venum = wa_vekp-venum.&lt;/P&gt;&lt;P&gt;    READ TABLE it_vepo INTO lwa_vepo&lt;/P&gt;&lt;P&gt;                       WITH KEY unvel = wa_vekp-venum.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Fill the import structure for packing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR: lwa_i_packing_item_hu, lwa_e_packing_item_hu,&lt;/P&gt;&lt;P&gt;           lv_rcode, lwa_es_item.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Fill the interface structure for Un-packing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    lwa_i_packing_item_hu-venum = pwa_dlvry_realoc-cont_venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-vepos = lwa_vepo-vepos.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-velin = lwa_vepo-velin.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-sub_hu_venum = wa_vepo-venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-quantity = '0'.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-veanz = '-1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Un-Pack the Truck/Container on shipment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'HU_PACKING_AND_UNPACKING'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        is_packing_request = lwa_i_packing_item_hu&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ef_rcode           = lv_rcode&lt;/P&gt;&lt;P&gt;        es_p_request       = lwa_e_packing_item_hu&lt;/P&gt;&lt;P&gt;        es_item            = lwa_es_item&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        cs_header          = lwa_header&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        missing_data       = 1&lt;/P&gt;&lt;P&gt;        hu_not_changeable  = 2&lt;/P&gt;&lt;P&gt;        not_possible       = 3&lt;/P&gt;&lt;P&gt;        customizing        = 4&lt;/P&gt;&lt;P&gt;        weight             = 5&lt;/P&gt;&lt;P&gt;        volume             = 6&lt;/P&gt;&lt;P&gt;        serial_nr          = 7&lt;/P&gt;&lt;P&gt;        fatal_error        = 8&lt;/P&gt;&lt;P&gt;        OTHERS             = 9.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Clear the success flag&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR: lv_success.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Error Message: Unpacking of bundle frm container failed&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      PERFORM append_errormessage USING 'E'&lt;/P&gt;&lt;P&gt;                                        text-010&lt;/P&gt;&lt;P&gt;                                        pwa_dlvry_realoc-containerno&lt;/P&gt;&lt;P&gt;                                        wa_vekp-exidv&lt;/P&gt;&lt;P&gt;                                        pwa_dlvry_realoc-tknum&lt;/P&gt;&lt;P&gt;                                        ''.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      lv_success = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    CLEAR: wa_vekp.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If Un-pack of every bundle on Container/Truck is successful&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF lv_success = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Delete the Container/Truck from shipment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM delete_truck_on_shipment&lt;/P&gt;&lt;P&gt;            USING pwa_dlvry_realoc-containerid&lt;/P&gt;&lt;P&gt;                  pwa_dlvry_realoc-tknum&lt;/P&gt;&lt;P&gt;         CHANGING lv_success.&lt;/P&gt;&lt;P&gt;    IF lv_success = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Commit the transaction&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'HU_POST'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          if_synchron = 'X'&lt;/P&gt;&lt;P&gt;          if_commit   = 'X'&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          ef_number   = lv_number.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        wa_unpacked_cont-tknum = pwa_dlvry_realoc-tknum.&lt;/P&gt;&lt;P&gt;        wa_unpacked_cont-cont_venum  = pwa_dlvry_realoc-cont_venum.&lt;/P&gt;&lt;P&gt;        wa_unpacked_cont-containerid = pwa_dlvry_realoc-containerid.&lt;/P&gt;&lt;P&gt;        wa_unpacked_cont-containerno = pwa_dlvry_realoc-containerno.&lt;/P&gt;&lt;P&gt;        APPEND wa_unpacked_cont TO it_unpacked_cont.&lt;/P&gt;&lt;P&gt;        CLEAR: wa_unpacked_cont.&lt;/P&gt;&lt;P&gt;        gv_cont_unpack_success = 'X'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      CLEAR: gv_cont_unpack_success.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    CLEAR: gv_cont_unpack_success.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;All the best &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2008 04:22:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639101#M876434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-08T04:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639102#M876435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPI_HU_UNPACK works only if the HU is not attached to any delivery or shipment. i.e., to unpack a HU into material and batches only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use HU_PACKING_AND_UNPACKING for your purpose. Sample code i had already provided which unpacks all the HUs packed in a Container (another Higher level HU) which is put onto the shipment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can refer to the 3 steps mentioned by christopher in this same link for unpacking or repacking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delayed reply but hope this helps,&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Lakshmi Narayana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2008 04:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639102#M876435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-08T04:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639103#M876436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for the reply.  It is reassuring for me to know I was on the right track but was not using HU_GET_HUS, I was using V51P_FILL_GT and that is probably at the wrong "level".  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see you are using a Z table, does this contain your packed HUs that you want to "mirror" in the shipment document.  If so this is what Im trying to achieve.  I have a hierarchy of Hus in a Z table, with HU ids in the Z table.  At the moment they do not exist as HUs in SAP and I was hoping the HU_PACKING_AND_UNPACKING would create the HU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But perhaps not, and I feel I will have to call BAPI_HU_CREATE or something similar at first to create the HU so that when I call HU_GET_HUS it has something to fetch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lakshmi, I really appreciate the help and confirmation you have given me already, youve made a small team of abapers happy!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Jon-Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2008 09:50:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639103#M876436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-08T09:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639104#M876437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you use BAPI_HU_CREATE to initially create the HU before you packed it?  Did you set up both the header proposal and item proposal?  I am doing this at the moment but coming across some issues with empty data fields - latest field it doesnt like is an empty ls_quan-alt field after performing check_opmng_gt_quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When your code finishes, you do see your HU and packaging material on the top pane of the "pack material" tab dont you?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever encounter any commit or timing issues?  I am using BAPI_TRANSACTION_COMMIT after every BAPI call, but if I just let my code run it gives back a bad subrc, but when I step through in debug it gets past a particular error - seems like a commit problem to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again,&lt;/P&gt;&lt;P&gt;Jon-Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2008 18:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639104#M876437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-08T18:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639105#M876438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you use BAPI_HU_CREATE to initially create the HU before you packed it?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Yes We did.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you set up both the header proposal and item proposal? I am doing this at the moment but coming across some issues with empty data fields - latest field it doesnt like is an empty ls_quan-alt field after performing check_opmng_gt_quantity.&lt;/P&gt;&lt;P&gt;*Yes. we are populating both Header &amp;amp; Item Proposal for HU that will be packed, However we create another HU (container into which we pack the above created HUs) for which we pass only Header Proposal *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When your code finishes, you do see your HU and packaging material on the top pane of the "pack material" tab dont you? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Yes. Please Note that we have defined HUs in 2 categories.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;1. Bundle - HU which will (having material an auxillary parts) be packed into&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;2. Container - HU (which will not have any material but can hold another HU) which can hold the Bundles&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In our Scenario, we create containers(HU) on shipment and then pack bundles(HU) onto them.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So we use BAPI to create first category HUs (bundles) and use the following code to create second category of HUs (Container) like in below code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Fill the interface parameters for Truck/Container Creation*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  &lt;STRONG&gt;lwa_headerproposal-ext_id_hu_2 = pwa_dlvry_realoc-containerno.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;lwa_headerproposal-pack_mat = pwa_dlvry_realoc-vhilm.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Create the Truck/Container with given regitration number*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  &lt;STRONG&gt;CALL FUNCTION 'BAPI_HU_CREATE'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;headerproposal = lwa_headerproposal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;IMPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;huheader       = lwa_huheader&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;hukey          = lv_hukey&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;TABLES&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;return         = lit_return.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;IF NOT lv_hukey IS INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  Apply conversion exit*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &lt;STRONG&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;input  = lv_hukey&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;IMPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;output = gv_container.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  Commit the transaction*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &lt;STRONG&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;wait = 'X'.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  Fill the shipment details*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &lt;STRONG&gt;lwa_huchanged-hu_exid = gv_container.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;lwa_huchanged-pack_mat_object = '04'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;lwa_huchanged-pack_mat_obj_key =  wa_newshipments-tknum.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  Call the FM to assign truck/container to shipment*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &lt;STRONG&gt;CALL FUNCTION 'BAPI_HU_CHANGE_HEADER'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;hukey     = lv_hukey&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;huchanged = lwa_huchanged&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;IMPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;huheader  = lwa_huheader&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;TABLES&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;return    = lit_return.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;IF lit_return[] IS INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;    Commit the transaction*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;      &lt;STRONG&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;wait = 'X'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now, the second category HU (Container created using above code) appears on the top pane of the packing tab and the first category of HU (bundle) will be in the lower level of pane.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now, we use HU_PACKING_AND_UNPACKING to pack the first category HU (bundle) into Second category (container) and after successful operation the Bundle goes off from lower pane.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever encounter any commit or timing issues? I am using BAPI_TRANSACTION_COMMIT after every BAPI call, but if I just let my code run it gives back a bad subrc, but when I step through in debug it gets past a particular error - seems like a commit problem to me.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No Commit Issues faced.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this clarifies some of your queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the Best &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmi Narayana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 04:06:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639105#M876438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T04:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639106#M876439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are well!  Just about finished this but great if you can let me know the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you created your HU bundle did you populate itemproposal and what type did you use?  Did you add the quantity here, or did you wait until the packing stage to specify your packed quantity?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im creating the initial HU with type 1 and specifying quantity when calling BAPI_HU_CREATE, but when I come to pack this and specifying VELIN as type 1 I have to specify quantity and thus the quantity doubles up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using VELIN type 1 (material type) or 2 (auxiliary) when packing the bundle onto the container?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately your code listed for packing is your unpacking code I think, as you specify quantity of 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Jon-Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 21:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639106#M876439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T21:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639107#M876440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While Packing Bundle onto Container, following are the values that we are passing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Fill the interface structure for Packing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    lwa_i_packing_item_hu-venum = lv_cont_venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-vepos = lv_vepos.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-velin = '3'.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-sub_hu_venum = wa_vepo-venum.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-quantity = '1'.&lt;/P&gt;&lt;P&gt;    lwa_i_packing_item_hu-veanz = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember you have already created a HU via BAPI_HU_CREATE and now are trying to pack this so the quantity will be ONE (one bundle being packed) and NOT THE MATERIAL Qty in HU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The only difference between packing and unpacking will be VEANZ indicator which will be "1" for packing and "-1" for Unpacking.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yaah, you are right I gave you code for Unpacking and forgot to mention the above Point marked in Bold.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do let me know if you still have any queries so that we can help you out..&lt;/P&gt;&lt;P&gt;All the best...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshmi Narayana.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 04:23:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639107#M876440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T04:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639108#M876441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards the packing, in your code did you refer or specify the deliveries you were packing at either the HU creation point (VPOBJ=01 outbound delivery), or at the packing point (did you pack the lowest level HU with no sub specified, but specified is_packing_request-belnr and is_packing_request-posnr)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or did you not specify the delivery at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you pack everything as handling units type 3 (and not material types as type 1)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Jon-Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 17:24:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639108#M876441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T17:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639109#M876442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way I seem to be able to get the materials on the lower pane of the packing screen to disappear is to use HU_PACKING_AND_UNPACKING, specifying the HU for the material and as HU type 1 - material type, with quantity of 1, with no sub HUs, and importantly, the delivery and delivery item.  It removes the material from the lower pane as fully packed, but adds 1 extra quantity!  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess this is because Ive used type 1 - material type, rather than HU type 3, but is I use type 3 the packing doesnt work as structure LS_VEKP does not get filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Jon-Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 17:49:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639109#M876442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T17:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639110#M876443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great if you can help I so want to get this finally finished, so close!! lol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 18:36:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639110#M876443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T18:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Unpacking a shipment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639111#M876444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to summarise what Im currently doing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1 - Create HU item type 1, pack_mat_object = 04 with key for shipment, to pack the material and packed quantity.  This has itemproposal populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2 - Create HU for containing HU, pack_mat_object = 04 with key for shipment.  Itemproposal not populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point no delivery numbers have yet been specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3 - Call fn module HU_GET_HUS to populate buffers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 4 - Call fn module HU_PACKING_AND_UNPACKING using just the HU from step 1 as the venum and exidv.  No sub venum or exidv specified.  Velin = 1. Quantity = 1.  This has been the only way Ive been able to link the lowest level item to its associated delivery item shown in VT02N, and been the only way to get the entry on the lower pane of the packing screen to disappear as thus fully packed.  However it adds an additional quantity of 1, as I suspect its because Im saying this is a material item, rather than a containing HU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 5 - Call fn module HU_GET_HUS again to update the buffers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 6 - Call fn module HU_PACKING_AND_UNPACKING to pack the HU from step 1 into the handling HU from step 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above works in that the packing hierarchy is correct, it packs HU's into the correct containing HUs, but as Ive had to do step 4 to link the lowest level HU from step 1 I get an extra packed quantity of 1!  Not good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I dont do Step 4 the unpacked items on the lower pane of the packing screen dont disappear.  If I dont do step 4 ths system seems to be able to determine the delivery, I guess from material and quantity etc, but the lower pane entries dont disappear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can help, thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 19:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-a-shipment/m-p/3639111#M876444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T19:13:18Z</dc:date>
    </item>
  </channel>
</rss>

