cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Handling Unit

Former Member
0 Kudos

Hi All,

Can anyone guide me which BAPI/FM to use to create Handling unit?

And, How to update the delivery with the HU information?

Was able to get the Handling Unit number through FM V51P_FIND_HEADER given the packaging Material number.

Regards,

Raj

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Handling unit creation:

At the minimum, we need the SSCC# (serialized shipping container# which is used for packing),

delivery doc#, line# and quantity. Populate VERPO & VERKO temp tables and then execute the

function module WS_DELIVERY_UPDATE. Sample code as follows.

Also needs some config for the HU number range.

REFRESH: T_VERPO, T_VERKO.

LOOP AT ITAB_PACK2.

CLEAR: T_VERKO, T_VERPO.

T_VERKO-EXIDV = ITAB_PACK2-SSCC.

T_VERKO-VHILM = C_pack_matl. "default matl# for packing

APPEND T_VERKO.

T_VERPO-EXIDV_OB = ITAB_PACK2-SSCC.

T_VERPO-VBELN = ITAB_PACK2-VBELN.

T_VERPO-POSNR = ITAB_PACK2_POSNR.

T_VERPO-TMENG = ITAB_PACK2-TMENG.

APPEND T_VERPO.

ENDLOOP.

    • Update Packing

CLEAR E_VBKOK.

REFRESH: T_VBPOK. CLEAR T_VBPOK.

E_VBKOK-VBELN_VL = WA_HDR-VBELN.

E_VBKOK-VBELN = WA_HDR-VBELN.

E_VBKOK-KOMUE = 'X'.

E_VBKOK-WABUC = ' '.

REFRESH: P_PROT.

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

VBKOK_WA = E_VBKOK

SYNCHRON = ' '

  • NO_MESSAGES_UPDATE = ' '

COMMIT = ' '

DELIVERY = WA_HDR-VBELN

UPDATE_PICKING = ' '

  • NICHT_SPERREN = ' '

IF_CONFIRM_CENTRAL = SPACE

TABLES

PROT = P_PROT

VERKO_TAB = T_VERKO

VERPO_TAB = T_VERPO

VBPOK_TAB = T_VBPOK

EXCEPTIONS

ERROR_MESSAGE = 8

OTHERS = 9 .

IF NOT SY-SUBRC IS INITIAL.

error message.

ENDIF.

Former Member
0 Kudos

Hi,

You should use BAPI_HU_CREATE followed by WS_DELIVERY_UPDATE FUNCTION.

The same has been discussed in detail in this thread.

Regards,

Ravi

Note : Please mark the helpful answers