avatar image
Former Member

Update POD Status with function module (Proof of delivery)

Hi all,

I am using bapi WS_DELIVERY_UPDATE to change POD status 'A' to 'C'. But it is not updating in VLPOD Transaction. The date is being updated correctly but the staus is not changing.

I am updating like this...

ls_vbkok-vbeln_vl = lv_vbeln_dlv. " Delivery Number
ls_vbkok-vbtyp_vl = lv_vbtyp. " Delivery type
ls_vbkok-podat = sy-datum.
ls_vbkok-potim = sy-uzeit.
* ls_vbkok-kzpod = 'C'.

* fill item details
ls_vbpok-vbeln_vl = lv_vbeln_dlv.
ls_vbpok-posnr_vl = '000010'.
*ls_vbpok-kzpod = 'C'.

APPEND ls_vbpok TO lt_vbpok.

*-Do Picking and PGI
CALL FUNCTION 'WS_DELIVERY_UPDATE' DESTINATION 'NONE'
EXPORTING
vbkok_wa = ls_vbkok
commit = 'X'
delivery = lv_vbeln_dlv
* update_picking = 'X'
if_database_update = '1'
if_error_messages_send_0 = 'X'
IMPORTING
ef_error_any_0 = lv_any_error
TABLES
vbpok_tab = lt_vbpok
prot = lt_prot.

thanks a lot

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 05 at 04:44 PM

    Hi Hernan,

    Please use the below code.

    ls_vbkok-vbeln_vl = ls_likp-vbeln.
    ls_vbkok-kzpod = 'D'.
    ls_vbkok-podat = sy-datum.
    ls_vbkok-potim = sy-uzeit.

    * Item data
    LOOP AT lt_lips INTO ls_lips WHERE vbeln = ls_likp-vbeln.
    ls_vbpok-vbeln_vl = ls_lips-vbeln.
    ls_vbpok-posnr_vl = ls_lips-posnr.
    ls_vbpok-matnr = ls_lips-matnr.
    ls_vbpok-charg = ls_lips-charg.
    ls_vbpok-lfimg = ls_lips-lfimg.
    ls_vbpok-vrkme = ls_lips-vrkme.
    ls_vbpok-lgmng = ls_lips-lgmng.
    ls_vbpok-meins = ls_lips-meins.
    APPEND ls_vbpok TO lt_vbpok.
    CLEAR ls_vbpok.
    ENDLOOP.

    CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
    EXPORTING
    vbkok_wa = ls_vbkok
    synchron = 'X'
    * NO_MESSAGES_UPDATE_1 = ' '
    commit = 'X'
    delivery = ls_likp-vbeln
    nicht_sperren_1 = 'Y'
    TABLES
    vbpok_tab = lt_vbpok
    prot = lt_prot.

    Thank you

    Goutham

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 08 at 05:54 AM

    Side comment - Agree with G Lakshmipathi about primary tag.

    In the ABAP forum, you don't need to give the business need behind updating the POD status. But in SD forum, it is a vital information.

    VLPODQ or VLPODL are standard reports to update the POD status.

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content