cancel
Showing results for 
Search instead for 
Did you mean: 

Howto change the status of HU in coding?

Former Member
0 Kudos
3,987

Hi experts,

i found FM HU_STATUS_SET and set the if_activity = 'HU03' , handing unit information.

Before the execution, the status of the HU is I0513 and I0001(inactive).

But after execution of this FM, the status of the inputted HU was not updated. There is also no any error or exception.

I want to know how to use this FM? Or maybe there is any way else to change the status.

Thanks for reading.

View Entire Topic
ethan_dong
Associate
Associate
0 Kudos

Hello,

FM 'HU_POST' should be called after FM "HU_STATUS_SET".

Here is an example:

DATA:ls_handling_unit TYPE huitem_from.

ls_handling_unit-venum = '0000001166'.

ls_handling_unit-exidv = '00000000002000008853'.

CALL FUNCTION 'HU_STATUS_SET'

EXPORTING

if_object = '12'

if_activity = 'HU03'

IF_COMPL_CONTENS = 'X'

is_handling_unit = ls_handling_unit

EXCEPTIONS

not_possible = 1

error = 2

OTHERS = 3

.

IF sy-subrc <> 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_COMMIT = 'X'

.

Former Member
0 Kudos

Thanks a lot, Ethan. What a wonderful answer!