on 01-06-2017 8:37 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.