‎2011 Aug 23 5:11 PM
Hi,
I need help at creating a correction delivery.
To create a correction delivery manually go to transaction VA32, select a scheduling agreement and go to the forecast delivery schedule view. Here you can press the button "Corr. delivery". Enter a date and an amount and submit. After saving the scheduling agreement the correction delivery can be found in the document flow.
This process (create a correction delivery) I want to do automatically. Do you know a BAPI or something else for this process?
I try different function modules for creating an outbound delivery without success. Also it is not possible to create a correction delivery (type LFKO) manually in transaction VL01N.
Thanks
Andrea
‎2011 Aug 24 2:23 PM
Hello,
Have you tried the FMs?
WS_DELIVERY_UPDATE
WS_DELIVERY_UPDATE_2
WS_DELIVERY_UPDATE_TO_CREATE
BAPI_OUTB_DELIVERY_CREATENOREF
BAPI_OUTB_DELIVERY_CREATE_SLS
I think one these FMs should serve the purpose.
Regards,
Venkata Phani Prasad K
‎2011 Aug 24 3:54 PM
Hi,
thanks for your reply.
The WS_DELIVERY_* function modules have no input parameter to change the cumulative delivered quantity or to create a correction delivery with reference to the scheduling agreement.
The function modul BAPI_OUTB_DELIVERY_CREATENOREF I canu2019t use because I need the reference to the scheduling agreement.
When I try function module BAPI_OUTB_DELIVERY_CREATE_SLS I get the error
E V50R 051 Fehlende Daten in der BAPI-Schnittstelle: VBAK VBTYP E (Missing date in BAPI interface)
because the type of the scheduling agreement (E) is checked. This function is not allowed for type E and F.
(Standard Code u2013 Program SAPLV50R_CREA Form DCS_CHECK_SO_VS_INTERFACE Line 72+)
* any order types which are not allowed? -------------------------
loop at ix_sd_orders-vbak assigning <ls_vbak>
where vbtyp ca 'EF'.
clear ls_mess.
ls_mess-msgid = 'V50R'.
ls_mess-msgno = '051'.
ls_mess-msgty = 'E'.
ls_mess-msgv1 = 'VBAK'.
ls_mess-msgv2 = 'VBTYP'.
ls_mess-msgv3 = <ls_vbak>-vbtyp.
append ls_mess to ct_mess.
if 1 = 2. message e051(v50r) with space space space space. endif.
cf_subrc = 1.
exit.
endloop.
Any other ideas?
Thanks!
‎2011 Aug 31 1:26 PM
Hi,
I decided to solve my problem by a call transaction with bdc data - for the first step until I find a suitable function module...
I recorded the transaction VA32. When I play it in transaction SHDB all works fine - either in background or not. After I take over the bdc data in my local test program it doesn't work. The correction delivery will be created but the cumulative quantities will not be updated - either in background or not.
Anyone knows why this fields (e.g. RV45Z-WAGFZ) are not updated?
Thanks a lot!