Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

WS_DELIVERY_UPDATE - Change qty of dlv and unpack at the same time

$
0
0

Hello,

 

 

i have the following demand.

 

I want to change the quantity of a delivery which is completely packed.

 

So i.e. there is 1 position with qty of 4.

 

Now i want to unpack 1 and change the qty to 3.

 

 

So far the FB 'WS_DELIVERY_UPDATE' can both, but not at the same time. Because i always get the message, that the qty of 4 is already packed.

 

 

Is there any possiblity to do both?

 

Thanks for your help.

 

Kind regards,

Robert

 

 

 


"Fill LT_VBKOK

ls_vbkok-vbeln_vl   = '8000004711'.

ls_vbkok-vbeln      = '8000004711'.

ls_vbkok-vbtyp_vl   = 'J'.

ls_vbkok-komue      = abap_true.

ls_vbkok-kodat      = sy-datum.

ls_vbkok-kouhr      = sy-uzeit.

 

insert ls_vbkok into table lt_vbkok.

 

"Fill LT_VBPOK

ls_vbpok-vbeln_vl = lv_vbeln.

ls_vbpok-posnr_vl = '8000004711'.

ls_vbpok-lianp    = abap_true.

ls_vbpok-vbeln    = '8000004711'.

ls_vbpok-vbtyp_n  = 'J'.

ls_vbpok-posnn    = '0010'.

ls_vbpok-lfimg    = 4.

ls_vbpok-pikmg    = 4.

ls_vbpok-meins    = 'ST'.

ls_vbpok-vrkme    = 'ST'.

 

insert ls_vbpok into table lt_vbpok.

 

 

"Fill LT_VERKO

ls_verko-exidv = '100003615'.

insert ls_verko into table et_verko.

 

"Fill LT_VERPO

 

ls_verpo-exidv_ob  = '100003615'.

ls_verpo-vbeln     = '8000004711'.

ls_verpo-posnr     = '0010'.

ls_verpo-tmeng     = -1.

ls_verpo-vrkme     = 'ST'.

 

insert ls_verpo into table et_verpo.



call function 'WS_DELIVERY_UPDATE'

     exporting

       vbkok_wa        = is_vbkok

       delivery        = iv_vbeln

       update_picking = abap_true

       synchron        = abap_true

     tables

       vbpok_tab       = lt_vbpok

       prot            = lt_prott

       verko_tab       = lt_verko

       verpo_tab       = lt_verpo.

   exceptions

       error_message  = 1

      others          = 2.

 


Viewing all articles
Browse latest Browse all 3458

Trending Articles