0% found this document useful (0 votes)
69 views1 page

SAP Delivery Update and Picking Logic

The document contains code that is updating delivery data. It is taking the delivery number and item data from variables and structures and using it to populate delivery header and item structures. It is then calling a function to update the delivery with the new picking data and any errors are returned.

Uploaded by

Max Dos Anjos
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views1 page

SAP Delivery Update and Picking Logic

The document contains code that is updating delivery data. It is taking the delivery number and item data from variables and structures and using it to populate delivery header and item structures. It is then calling a function to update the delivery with the new picking data and any errors are returned.

Uploaded by

Max Dos Anjos
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ls_vbkok-vbeln_vl = <fs_fornecimento>-vbeln.

ls_vbkok-vbeln = <fs_fornecimento>-vbeln.
ls_vbkok-anzpk = <fs_fornecimento>-anzpk.
ls_vbkok-kzapk = 'X'.

ls_vbpok-vbeln_vl = ls_transport_header-vbeln_for.
ls_vbpok-posnr_vl = ls_transport_item-posnr.
ls_vbpok-vbeln = ls_transport_header-vbeln_for.
ls_vbpok-posnn = ls_transport_item-posnr.
ls_vbpok-pikmg = ld_lgmng_use.

CLEAR ld_pikmg.
CALL FUNCTION 'WB2_GET_PICK_QUANTITY'
EXPORTING
i_vbeln = ls_lips-vbeln
i_posnr = ls_lips-posnr
IMPORTING
e_pikmg = ld_pikmg
EXCEPTIONS
document_read_error = 1
error_message = 2
OTHERS = 3.

IF ld_pikmg GT 0.
ld_pikmg = ld_pikmg * ( ls_lips-umvkz / ls_lips-umvkn ) .
ENDIF.

ls_vbpok-pikmg = ls_vbpok-pikmg + ld_pikmg.

APPEND ls_vbpok TO lt_vbpok.

CALL FUNCTION 'WS_DELIVERY_UPDATE_2'


EXPORTING
vbkok_wa = ls_vbkok
update_picking = 'X'
synchron = 'X'
if_error_messages_send = space
delivery = <fs_fornecimento>-vbeln
IMPORTING
ef_error_any = ld_error_vl
TABLES
vbpok_tab = lt_vbpok_final
EXCEPTIONS
error_message = 1
OTHERS = 2.

You might also like