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: 

Picking with SD_DELIVERY_UPDATE_PICKING

Former Member
0 Kudos

Hello,

I am using function module SD_DELIVERY_UPDATE_PICKING to pick delivery items. This FM is being called in a loop for each delivery item. Delivery has two items, and each item has to be picked in two batches. This FM call is working fine if there is only one item in delivery. When delivery with two items are processed, 2nd item throws error message as "Item 900003: Only 0 qty from material xxxx are available". But when I check the delivery after the FM call, it shows first item as picked correctly under two batches.

Here I have showed the code I am using to call FM.

Loop at delivery_itab.

wa_vbkok-vbeln_vl = wa_e1edl20-vbeln.

wa_vbkok-wadat_ist = lv_pgidate.

wa_vbpok-vbeln = wa_e1edl20-vbeln.

wa_vbpok-posnn = wa_e1edl24-posnr.

wa_vbpok-vbeln_vl = wa_e1edl20-vbeln.

wa_vbpok-posnr_vl = wa_e1edl24-posnr.

wa_vbpok-charg = wa_e1edl24-charg.

wa_vbpok-matnr = wa_e1edl24-matnr.

wa_vbpok-vbtyp_n = 'J'.

wa_vbpok-taqui = 'X'.

APPEND wa_vbpok TO lt_vbpok.

...For each delivery item...

CALL FUNCTION 'SD_DELIVERY_UPDATE_PICKING'

EXPORTING

vbkok_wa = wa_vbkok

synchron = 'X'

nicht_sperren = 'X'

if_error_messages_send = 'X'

TABLES

vbpok_tab = lt_vbpok

prot = lt_prot.

Endloop.

I also tried function module WS_DELIVERY_UPDATE in the same place of code. That also gives the same issue. I tried WS_DELIVERY_UPDATE as showed below.

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

vbkok_wa = wa_vbkok

synchron = 'X'

commit = 'X'

delivery = wa_vbkok-vbeln_vl

update_picking = 'X'

TABLES

vbpok_tab = lt_vbpok

prot = lt_prot

EXCEPTIONS

error_message = 99.

Can you pls suggest me if I am missing any parameters / any thing here ? I would greatly appreciate your help.

Thanks

Hari

5 REPLIES 5

Former Member
0 Kudos

SD_DELIVERY_UPDATE_PICKING_1 is for collective processing. Maybe play with that one?

Lamont

sunilachyut
Contributor
0 Kudos

Have you tried adding all the delivery items to the internal table first (lt_vbpok) and then call either WS_DELIVERY_UPDATE or 'SD_DELIVERY_UPDATE_PICKING. Normally a delivery updates to the table takes sometime and any updates should be combined rather than calling in the loop.

Sunil Achyut

0 Kudos

Sunil,

Thanks much for response. I tried already the way you have proposed. I did call the FM with all the delivery items appended in itab lt_vbpok. That doesn't work, gives the same error message. I have also taken care to wait until delivery update is commited. Also I am doing Enque and Deque for the delivery document.

0 Kudos

Hari,

i´ve made a test with this function module SD_DELIVERY_UPDATE_PICKING, and works very well ,even with more than 1 item.

The message you refer i think that it´s about stock failure, not for any parameter that is not filled.

Regards,

AOL

Former Member
0 Kudos

I was trying to use SD_DELIVERY_UPDATE_PICKING to insert batches to a delivery item. And it did not work!!!

After a while i noticed, that my deliveries always got the overall picking status C (completely processed). That was the reason, why SD_DELIVERY_UPDATE_PICKING had no influence on my delivery but I got no error message.

--> automatic picing was activated. When saving the delivery, the delivery quantity was automatically put into the field picked quantity!

To deactivate this, goto SPRO - enterprise structure - definition of shipping points

Under section 'print picking list' the 'send time' might be set on 4 - send immediately

Set it to 3 and your delivery will not be picked automatically

V_TVST-VSZTP = 3