<?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 BAPI_HU_REPACK is having Error 155 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-hu-repack-is-having-error-155/m-p/12380427#M1994158</link>
    <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;I'm trying to do a repack here, from one HU to another HU.&lt;/P&gt;
  &lt;P&gt;Basically, I want to repack all item from HU A to HU B. So this repack badi seems fit for it.&lt;/P&gt;
  &lt;P&gt;Below is my code. After I execute it from the code and from Test function module. I've having the same error. Error 155. But the message error is empty. When I search for error 155, it is about &lt;STRONG&gt;HU &amp;amp;1 is assigned to an object that cannot be processed here.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;No further clue about this error. Anyone care to point any error in my code? Or the error itself is pointing to another issue? I'm not so sure.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA : ls_repack LIKE bapihurepack,
       lt_repack TYPE TABLE OF bapihurepack,
       w_return LIKE bapiret2 OCCURS 0,
       lv_hukey TYPE bapihukey-hu_exid.


lv_hukey = 'JZ001'.
ls_repack-source_hu = 'Z003'.
ls_repack-flag_packhu = 'X'.

COLLECT ls_repack INTO lt_repack.

CALL FUNCTION 'BAPI_HU_REPACK'
  EXPORTING
    hukey  = lv_hukey

  TABLES
    repack = lt_repack
    return = w_return.

READ TABLE w_return[] ASSIGNING FIELD-SYMBOL(&amp;lt;fs_w_return&amp;gt;) INDEX 1.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-field.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-number.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-id.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-log_msg_no.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-log_no.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-message.


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 28 Feb 2021 15:40:45 GMT</pubDate>
    <dc:creator>former_member681748</dc:creator>
    <dc:date>2021-02-28T15:40:45Z</dc:date>
    <item>
      <title>BAPI_HU_REPACK is having Error 155</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-hu-repack-is-having-error-155/m-p/12380427#M1994158</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;I'm trying to do a repack here, from one HU to another HU.&lt;/P&gt;
  &lt;P&gt;Basically, I want to repack all item from HU A to HU B. So this repack badi seems fit for it.&lt;/P&gt;
  &lt;P&gt;Below is my code. After I execute it from the code and from Test function module. I've having the same error. Error 155. But the message error is empty. When I search for error 155, it is about &lt;STRONG&gt;HU &amp;amp;1 is assigned to an object that cannot be processed here.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;No further clue about this error. Anyone care to point any error in my code? Or the error itself is pointing to another issue? I'm not so sure.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA : ls_repack LIKE bapihurepack,
       lt_repack TYPE TABLE OF bapihurepack,
       w_return LIKE bapiret2 OCCURS 0,
       lv_hukey TYPE bapihukey-hu_exid.


lv_hukey = 'JZ001'.
ls_repack-source_hu = 'Z003'.
ls_repack-flag_packhu = 'X'.

COLLECT ls_repack INTO lt_repack.

CALL FUNCTION 'BAPI_HU_REPACK'
  EXPORTING
    hukey  = lv_hukey

  TABLES
    repack = lt_repack
    return = w_return.

READ TABLE w_return[] ASSIGNING FIELD-SYMBOL(&amp;lt;fs_w_return&amp;gt;) INDEX 1.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-field.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-number.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-id.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-log_msg_no.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-log_no.
WRITE:/ &amp;lt;fs_w_return&amp;gt;-message.


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Feb 2021 15:40:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-hu-repack-is-having-error-155/m-p/12380427#M1994158</guid>
      <dc:creator>former_member681748</dc:creator>
      <dc:date>2021-02-28T15:40:45Z</dc:date>
    </item>
  </channel>
</rss>

