2021 Feb 28 3:40 PM
Hello experts,
I'm trying to do a repack here, from one HU to another HU.
Basically, I want to repack all item from HU A to HU B. So this repack badi seems fit for it.
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 HU &1 is assigned to an object that cannot be processed here.
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.
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(<fs_w_return>) INDEX 1.
WRITE:/ <fs_w_return>-field.
WRITE:/ <fs_w_return>-number.
WRITE:/ <fs_w_return>-id.
WRITE:/ <fs_w_return>-log_msg_no.
WRITE:/ <fs_w_return>-log_no.
WRITE:/ <fs_w_return>-message.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.