on 05-10-2006 3:22 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.