cancel
Showing results for 
Search instead for 
Did you mean: 

Update POD Status with function module (Proof of delivery)

Former Member
0 Kudos

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

Lakshmipathi
Active Contributor
0 Kudos

Try to use the correct Primary Tag as for as possible to get the attention of right members. I have changed the Primary Tag.

Mingo
Discoverer
0 Kudos

My problem is that the Reason & QtyDiffinSalesUn was not successful.

May I ask how to transfer the parameters?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member

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

Former Member
0 Kudos
Field kzpod = 'D'.
Thanks for your answer. Works correctly.
0 Kudos

It is important to note that both WS_DELIVERY_UPDATE or WS_DELIVERY_UPDATE_2 have never been officially released by SAP. Therefore, depending on your version / EHP, it might not work and is unsupported. Don't build big developments that depend on these functions.

0 Kudos

See function attributes:

former_member182378
Active Contributor
0 Kudos

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.