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: 

message vlbapi 004, vl 268

Former Member
0 Kudos

Hi!

i am trying to delete line item from inbound delivery with BAPI_INB_DELIVERY_CHANGE, but can not do it. i get the following error message

VLBAPI 004 "Error in document &1 item &2 (quantity consistency check)"

VL 268 "Conversion factors &1:&2 are zero, not defined mathematically"

what does it means?

1 ACCEPTED SOLUTION

Former Member

You need to also populate the following fields for the BAPI item table:

ls_item-dlv_qty

ls_item-dlv_qty_imunit

ls_item-del_qty_flo

ls_item-dlv_qty_st_flo

ls_item-fact_unit_nom

ls_item-fact_unit_denom

ls_item-conv_fact

The reason they are needed is because they are checked within the BAPI by FM "SHP_QUANTITY_CONSISTENCY_CHECK" and if the above fields are left blank, the messages VLBAPI 004 and VL 268 will be returned.

These additional fields can be populated from the SAP table LIPS.  Here's an example with the correct mapping from LIPS to the BAPI item fields:

DATA: ls_item TYPE bapiibdlvitemchg.

SELECT SINGLE lfimg lgmng lfimg_flo lgmng_flo umvkz umvkn umrev

     FROM lips

     INTO (ls_item-dlv_qty, ls_item-dlv_qty_imunit, ls_item-del_qty_flo, ls_item-dlv_qty_st_flo,

           ls_item-fact_unit_nom, ls_item-fact_unit_denom, ls_item-conv_fact)

     WHERE vbeln = '0180001234'

       AND posnr = '000010'.

4 REPLIES 4

Former Member
0 Kudos

I think some problem with the quantity of the material which you are passing, Can you confirm the passing data, properly been sent to BAPI_INB_DELIVERY_CHANGE.

USe BAPIIBDLVITEMCTRLCHG-DEL_ITEM = 'X'.

also don't pass data to these fields in BAPIIBDLVITEMCTRLCHG

Confirmation of volume

Confirmation of net weight

Confirmation of gross weight

0 Kudos

i am trying this:

ls_header_data-DELIV_NUMB = '0180000339'.

l_delivery = '0180000339'.

ls_item_data-deliv_numb = '0180000339'.

ls_item_data-deliv_item = '000010'.

append ls_item_data to lt_item_data.

ls_item_ctrl-deliv_numb = '0180000339'.

ls_item_ctrl-deliv_item = '000010'.

ls_item_ctrl-del_item = 'x'.

append ls_item_ctrl to lt_item_ctrl.

CALL FUNCTION 'BAPI_INB_DELIVERY_CHANGE'

EXPORTING

header_data = ls_header_data

header_control = ls_header_ctrl

delivery = l_delivery

TABLES

ITEM_DATA = lt_item_data

ITEM_CONTROL = lt_item_ctrl

RETURN = lt_ret.

COMMIT WORK AND WAIT.

Former Member

You need to also populate the following fields for the BAPI item table:

ls_item-dlv_qty

ls_item-dlv_qty_imunit

ls_item-del_qty_flo

ls_item-dlv_qty_st_flo

ls_item-fact_unit_nom

ls_item-fact_unit_denom

ls_item-conv_fact

The reason they are needed is because they are checked within the BAPI by FM "SHP_QUANTITY_CONSISTENCY_CHECK" and if the above fields are left blank, the messages VLBAPI 004 and VL 268 will be returned.

These additional fields can be populated from the SAP table LIPS.  Here's an example with the correct mapping from LIPS to the BAPI item fields:

DATA: ls_item TYPE bapiibdlvitemchg.

SELECT SINGLE lfimg lgmng lfimg_flo lgmng_flo umvkz umvkn umrev

     FROM lips

     INTO (ls_item-dlv_qty, ls_item-dlv_qty_imunit, ls_item-del_qty_flo, ls_item-dlv_qty_st_flo,

           ls_item-fact_unit_nom, ls_item-fact_unit_denom, ls_item-conv_fact)

     WHERE vbeln = '0180001234'

       AND posnr = '000010'.

0 Kudos

Andy's example is correct. It works to me.

See relation below between fields in LIPS and BAPI:

LIPSBAPI
lfimg dlv_qty
lgmng dlv_qty_imunit
lfimg_flo del_qty_flo
lgmng_flodlv_qty_st_flo
umvkz fact_unit_nom
umvkn fact_unit_denom
umrevconv_fact