<?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 Handling Unit from Inbound Delivery in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501065#M1421776</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;Check this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pack componet HU to Overpack HU. *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    l_packing_req-venum = g_ovrp_venum.                  "Overpack Internal HU&lt;/P&gt;&lt;P&gt;    l_packing_req-exidv = g_ovrp_exidv.                  "Overpack External HU&lt;/P&gt;&lt;P&gt;    l_packing_req-veanz = '1'.                     "PACK Constant&lt;/P&gt;&lt;P&gt;    l_packing_req-sub_hu_venum = l_int_venum.&lt;/P&gt;&lt;P&gt;    l_packing_req-sub_hu_exidv = l_int_exidv.       "Componet External HU&lt;/P&gt;&lt;P&gt;    l_packing_req-velin = '3'.                      "HU Type Constant&lt;/P&gt;&lt;P&gt;    l_packing_req-quantity = '1.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&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 = l_packing_req&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;&lt;/P&gt;&lt;P&gt;&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;error&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      clear: v_msgv1, v_msgv2, v_msgv3.&lt;/P&gt;&lt;P&gt;      v_msgv1 = text-031.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PERFORM display_message USING v_msgv1 v_msgv2 v_msgv3.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      leave to screen sy-dynnr.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;No Errors --&amp;gt; POST HU&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;&lt;/P&gt;&lt;P&gt;plz write what you are passing to 'HU_PACKING_AND_UNPACKING' and hu_post fm.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mohinder Singh Chauhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jan 2010 03:54:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-06T03:54:37Z</dc:date>
    <item>
      <title>Function Module for UNPACKING Handling Unit from Inbound Delivery</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501064#M1421775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hello Experts,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a RFID program to Receive goods from vendor... &lt;/P&gt;&lt;P&gt;One of the steps of the program should CHANGE the quantity inside a received batch.&lt;/P&gt;&lt;P&gt;To do so, I need to UNPACK the Handling Unit first... then change the quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following Function Modules to do so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- 'HU_GET_HUS'&lt;/P&gt;&lt;P&gt;- 'V51P_FILL_GT'&lt;/P&gt;&lt;P&gt;- 'HU_PACKING_AND_UNPACKING'&lt;/P&gt;&lt;P&gt;- 'HU_POST'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First 2 FM works fine... &lt;/P&gt;&lt;P&gt;But when I get to the 3rd one, I keep getting "NOT_POSSIBLE" error... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have anyone done this before??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the code I've done to do some testing before putting it into my code... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PLEEEEEEEEEEEASE HELP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS: vsep. PARAMETERS: p_venum LIKE vekp-venum.

DATA: wa_object LIKE hum_object,
      it_object TYPE TABLE OF hum_object.

DATA: wa_v51vp LIKE v51vp,
      it_v51vp TYPE TABLE OF v51vp.

DATA: flag LIKE v51p_select_flags.

DATA: it_venum            TYPE STANDARD TABLE OF hum_venum,
      ef_rcode            LIKE sy-subrc,
      et_vekp             TYPE STANDARD TABLE OF vsep_s_vekp,
      et_vepo             TYPE STANDARD TABLE OF vsep_s_vepo,
      et_vevw             TYPE vsep_t_vevw,
      et_highest_level    TYPE vsep_t_venum,
      et_messages         TYPE huitem_messages_t,
      is_packing_request  TYPE vsep_s_pithu,
      es_p_request        TYPE vsep_s_pithu,
      es_item             LIKE vepovb,
      cs_header           LIKE vekpvb,
      ef_number           TYPE vpobjkey,
      et_header           TYPE STANDARD TABLE OF vekpvb,
      et_items            TYPE STANDARD TABLE OF vepovb,
      et_item_serialno    TYPE vsep_t_rserob,
      et_history          TYPE hum_history_t,
      et_highest_levels   TYPE hum_venum_t.

DATA: wa_venum            LIKE hum_venum,
      wa_vepo             TYPE vsep_s_vepo,
      wa_vekp             TYPE vsep_s_vekp,
      wa_items            TYPE vepovb,
      wa_header           TYPE vekpvb.

START-OF-SELECTION.

  wa_venum-venum = p_venum.
  APPEND wa_venum TO it_venum.

  CALL FUNCTION 'HU_GET_HUS'
    EXPORTING
      it_venum          = it_venum
    IMPORTING
      et_header         = et_header
      et_items          = et_items
      et_item_serialno  = et_item_serialno
      et_history        = et_history
      et_highest_levels = et_highest_levels
      et_messages       = et_messages
    EXCEPTIONS
      hus_locked        = 1
      no_hu_found       = 2
      fatal_error       = 3
      OTHERS            = 4.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  READ TABLE et_header INDEX 1 INTO wa_header.
  CALL FUNCTION 'V51P_FILL_GT'
    EXPORTING
      it_venum         = it_venum
    IMPORTING
      ef_rcode         = ef_rcode
      et_vekp          = et_vekp
      et_vepo          = et_vepo
      et_vevw          = et_vevw
      et_highest_level = et_highest_level
      et_messages      = et_messages
    EXCEPTIONS
      hu_locked        = 1
      no_hu_found      = 2
      fatal_error      = 3
      OTHERS           = 4.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  READ TABLE et_vepo INDEX 1 INTO wa_vepo.
  READ TABLE et_vekp INDEX 1 INTO wa_vekp.

  MOVE-CORRESPONDING wa_vepo TO  is_packing_request.
  is_packing_request-belnr    = wa_vepo-vbeln.
  is_packing_request-quantity = wa_vepo-vemng.
  is_packing_request-veanz    = '-1'.
  is_packing_request-meins    = wa_vepo-vemeh.
  is_packing_request-exidv    = wa_vekp-exidv.

  CALL FUNCTION 'HU_PACKING_AND_UNPACKING'
    EXPORTING
      is_packing_request = is_packing_request
    IMPORTING
      ef_rcode           = ef_rcode
      es_p_request       = es_p_request
      es_item            = es_item
    CHANGING
      cs_header          = cs_header
    EXCEPTIONS
      missing_data       = 1
      hu_not_changeable  = 2
      not_possible       = 3
      customizing        = 4
      weight             = 5
      volume             = 6
      serial_nr          = 7
      fatal_error        = 8
      OTHERS             = 9.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CALL FUNCTION 'HU_POST'
    EXPORTING
      if_synchron = 'X'
      if_commit   = 'X'
    IMPORTING
      ef_number   = ef_number.

  break nunfx004.

  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Fernanda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 00:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501064#M1421775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T00:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for UNPACKING Handling Unit from Inbound Delivery</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501065#M1421776</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;Check this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pack componet HU to Overpack HU. *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    l_packing_req-venum = g_ovrp_venum.                  "Overpack Internal HU&lt;/P&gt;&lt;P&gt;    l_packing_req-exidv = g_ovrp_exidv.                  "Overpack External HU&lt;/P&gt;&lt;P&gt;    l_packing_req-veanz = '1'.                     "PACK Constant&lt;/P&gt;&lt;P&gt;    l_packing_req-sub_hu_venum = l_int_venum.&lt;/P&gt;&lt;P&gt;    l_packing_req-sub_hu_exidv = l_int_exidv.       "Componet External HU&lt;/P&gt;&lt;P&gt;    l_packing_req-velin = '3'.                      "HU Type Constant&lt;/P&gt;&lt;P&gt;    l_packing_req-quantity = '1.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&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 = l_packing_req&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;&lt;/P&gt;&lt;P&gt;&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;error&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      clear: v_msgv1, v_msgv2, v_msgv3.&lt;/P&gt;&lt;P&gt;      v_msgv1 = text-031.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PERFORM display_message USING v_msgv1 v_msgv2 v_msgv3.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      leave to screen sy-dynnr.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;No Errors --&amp;gt; POST HU&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;&lt;/P&gt;&lt;P&gt;plz write what you are passing to 'HU_PACKING_AND_UNPACKING' and hu_post fm.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mohinder Singh Chauhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 03:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501065#M1421776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T03:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for UNPACKING Handling Unit from Inbound Delivery</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501066#M1421777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohinder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;In my case, the functions wouldn't work since my HU was already assigned to an Inbound Delivery!&lt;/P&gt;&lt;P&gt;I had to use BDC in the end!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Fernanda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2010 23:45:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-unpacking-handling-unit-from-inbound-delivery/m-p/6501066#M1421777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-19T23:45:07Z</dc:date>
    </item>
  </channel>
</rss>

