Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

error while using BAPI_OUTB_DELIVERY_CHANGE

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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)'

11 REPLIES 11

Former Member
0 Kudos

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)'

0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

Hi Ulrich

do you know any FM that i can use to change picking and post GI.

thanks

raj

ferry_lianto
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.