Can anyone suggest function module to reverse POD status and PGI status?
I used WS_DELIVERY_UPDATE_2
to update POD status and PGI from A
or B
to C
, but how to reverse it?
Is it possible to reverse POD status from C
to A
just like a VLPOD and reverse PGI status from C
to A
just like a VL09.
This code updates POD status but I don't know how to reverse it
*** updating PGI status ***
ls_vbkok-wabuc = 'X'.
ls_vbkok-wadat_ist = sy-datum.
ls_vbkok-wauhr = sy-uzeit.
ls_vbkok-wadat = plandate.
ls_vbkok-kzwad = 'X'.
CLEAR: ls_vbkok-kzpod, ls_vbkok-podat, ls_vbkok-potim.
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = ls_vbkok
synchron = 'X'
commit = 'X'
delivery = ls_likp-vbeln
update_picking = 'X'
TABLES
prot = lt_prot.
*** updating POD status ***
ls_vbkok-kzpod = 'D'.
ls_vbkok-podat = sy-datum.
ls_vbkok-potim = sy-uzeit.
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = ls_vbkok
synchron = 'X'
* NO_MESSAGES_UPDATE_1 = ' '
commit = 'X'
delivery = ls_likp-vbeln
* update_picking = 'X' "test stock
* nicht_sperren_1 = 'Y'
TABLES
vbpok_tab = lt_vbpok
prot = lt_prot.
CLEAR: lt_vbpok, ls_vbpok, lt_prot, ls_likp.
Best regards
I recently had an issue where I used the module function WS_DELIVERY_UPDATE_2
and I had to reverse the delivery to status 'A' for my tests.
To reverse the status I executed transaction VL09.
After I read your issue I checked the code of that transaction, which is RVV50L09
, and I found the module function WS_REVERSE_GOODS_ISSUE
.
Hope it helps.