Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Using FM WS_DELIVERY_UPDATE to pack material in HU

Former Member
0 Kudos

I've been browsing the forums, and, despite the many examples available I can't put this FM to work.

The goal is to do the same thing as transaction vl02n when

- the pack button is pushed

- you pick the pack material tab

- you alter the partial quantity on one of the existing positions

- you press pack

- you save.

Last thing I've tried is something I found on Internet:

DATA:

wa_vbkok TYPE vbkok,

wa_hus TYPE TABLE OF vekpvb,

wa_pack TYPE REPACK_HU_WM OCCURS 0 WITH HEADER LINE.

wa_vbkok-vbeln = pvbeln.

wa_vbkok-vbeln_vl = pvbeln.

wa_pack-desthu = pexidv.

wa_pack-quantity = pqty.

wa_pack-meins = pmeins.

wa_pack-matnr = pmatnr.

wa_pack-charg = pcharg.

wa_pack-werks = pwerks.

wa_pack-lgort = plgort.

wa_pack-vbeln_vl = pvbeln.

wa_pack-posnr_vl = pposnr.

wa_pack-object = '01'.

wa_pack-objkey = pvbeln.

APPEND wa_pack.

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

VBKOK_WA = wa_vbkok

SYNCHRON = 'X'

COMMIT = 'X'

DELIVERY = wa_vbkok-vbeln

TABLES

IT_PACKING = wa_pack

ET_CREATED_HUS = wa_hus

EXCEPTIONS

ERROR_MESSAGE = 1

OTHERS = 2.

Excepting pcharg which I don't have as a datum and therefore I have left empty.

I a price error determination (?) because I lack some compulsory condition ZP03.

Someone can help?

Thanks in advance.

4 REPLIES 4

Former Member
0 Kudos

Hi Soledad,

I used the same FM as you and it worked for me. I am attaching my code, although I don't see anything wrong in yours. In fact, I think is same to mine...

Realizamos el packing por la cantidad indicada

wa_vbkok_packing-vbeln = i_ltap-vbeln.

wa_vbkok_packing-vbeln_vl = i_ltap-vbeln.

wa_pack-desthu = i_ltap-exidv.

wa_pack-quantity = i_ltap-pikmg.

wa_pack-meins = i_ltap-meins.

wa_pack-matnr = i_ltap-matnr.

  • wa_pack-charg = .

wa_pack-werks = i_ltap-werks.

wa_pack-lgort = i_ltap-lgort.

wa_pack-vbeln_vl = i_ltap-vbeln.

wa_pack-posnr_vl = i_ltap-posnr.

wa_pack-object = '01'.

wa_pack-objkey = i_ltap-vbeln.

APPEND wa_pack.

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

VBKOK_WA = wa_vbkok_packing

SYNCHRON = 'X'

COMMIT = 'X'

DELIVERY = wa_vbkok_packing-vbeln

TABLES

IT_PACKING = wa_pack

ET_CREATED_HUS = wa_hus_packing

EXCEPTIONS

ERROR_MESSAGE = 1

OTHERS = 2.

The only problem for me is that no positions for the HU are created (in table VEPO).

Hope it helps you...

Nisha

0 Kudos

Hi Friend,

can i call you on handling unit information?

Regards,

deva

0 Kudos

Hi Nisha,

I am also using the same FM to do Picking, Packing and  PGI.

Packing is happening. Sales document no. is taking for picking request. but in manual process, current date is taking.

For Ex: Picking request 20140726

What exactly I missed to pass in structure VBPOK ?

How to pass the handling unit no for packing?

"wa_pack-desthu = i_ltap-exidv."


Thanks in Advance

Regards,

Rajasekar M

0 Kudos

Hi guys

The code you provided does not work for me, please can you help me ?

I have the error :

Partial quantity to be repacked. Specification of source HU missing

BR

Arnold