03-21-2006 7:59 PM - last edited on 02-04-2024 3:24 AM by postmig_api_4
Hi Folks,
I created an outbound delivery for a STO, now i have to
changed the PICKING QUANTITY in the Outbound delivery to the same value as Quantity delivered and then post a GI.
I am using BAPI_OUTB_DELIVERY_CHANGE to update the outbound delivery and then post GI. I am getting an error.
E VLBAPI 004
can someone let me know why and whts the solution to update the OD and then post the GI using this bapi.
thanks a ton
Raj
03-21-2006 8:20 PM
I don't know if you can change the pick quantity but here is the message full text
'Error in document &1 item &2 (quantity consistency check)'
03-21-2006 8:20 PM
I don't know if you can change the pick quantity but here is the message full text
'Error in document &1 item &2 (quantity consistency check)'
03-21-2006 8:23 PM
To do the GI, do a simple BDC. Here is the sample code.
PERFORM bdc_dynpro USING 'SAPMV50A' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE' '=WABU_T'.
PERFORM bdc_field USING 'LIKP-VBELN' delvry_nbr.
PERFORM bdc_dynpro USING 'SAPMV50A' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BACK'.
*-- Call Transaction (VL02N)
CALL TRANSACTION c_vl02n
USING i_bdcdata
MODE c_nodisplay
UPDATE c_synchronous
MESSAGES INTO i_bdcmsgcoll.
03-21-2006 10:29 PM
thanks Shrinivas.
I have to use a BAPI as far as possible. i have to
update the PICK quan to the same value as Quantity delivered and then post GI.
can u suggest something that will eliminate this error.
03-22-2006 3:27 PM
Not everything is possible to do with a BAPI at this point. As you can see, pick quantity cannot be updated using this BAPI and there is no BAPI that does the GI.
03-22-2006 8:23 AM
Hi Raj,
as far as I know BAPI_OUTB_DELIVERY_CHANGE is neither able to set the picking quantity nor to post goods issue. So i guess for you purpose it is not really useful.
The next best external interface to set picking quantity and post goods issue is Idoc DELVRY03 with message type WHSCON.
Best regards, Ulrich
03-22-2006 2:51 PM
Hi Ulrich
do you know any FM that i can use to change picking and post GI.
thanks
raj
03-22-2006 3:11 PM
Hi Raj,
You can try to use this FM:
<b>MB_POST_GOODS_MOVEMENT</b>
<b>MB_CREATE_GOODS_MOVEMENT</b>
Hope this will help.
Regards,
Ferry Lianto
03-22-2006 10:23 PM
thanks ferry/srinivas
i was able to update picking quantity using the function mondule WS_DELIVERY_UPDATE_2.
Now i just need a FM or BAPI to post GI and I am done.
pls. let me know if u have clues...
With these FMs i wasnt able to post my GI
MB_POST_GOODS_MOVEMENT
MB_CREATE_GOODS_MOVEMENT
thanks a ton
raj
09-08-2009 5:25 PM
Hi Raj,
Could you send me the code to update the pick quantity. I am trying to update using the FM WS_DELIVERY_UPDATE_2 and i am getting success message but the pick quantity is not actually saved in the outbound delivery.
Thanks in advance,
Ram
03-23-2006 7:06 PM
hi guys i posted a GI for STO using this bapi...
CSO_P_DLVRY_GOODS_ISSUE_CREATE
you can try and see if it works for you.. it did for me..
thanks for all the replies
Raj
03-23-2006 8:18 PM
Hi Raj,
Good that you found this function module and shared with the forum. This is a SAP store specific function module and if you follow the code, it calls the function module 'WS_LM_GOODS_MOVEMENT' and this function module in turn does a <u>call transaction</u> in exactly the same fashion that I posted earlier. Here is the extract of that call transaction.
refresh lt_bdcdata.
if if_flag_inbound eq space.
set_dynp_batchinput 'SAPMV50A' '4004'.
set_var_batchinput 'LIKP-VBELN' lt_select2-vbeln.
set_var_batchinput 'BDC_OKCODE' 'WABU_T'.
call transaction 'VL02N' using lt_bdcdata
mode if_bitype
update 'S'
messages into lt_messtab.