Skip to Content
0
Former Member
Aug 24, 2009 at 02:30 PM

Problem in updating Quantity using 'BAPI_SALESORDER_CHANGE'

35 Views

Hi,

I am using Bapi_salesorder_change to update item quantity and reason for rejection.My code is as below.

MOVE c_u TO e_orderheader_inx-updateflag.

FREE i_orderitem_in.

MOVE newitem-posnr_ref TO e_orderitem_in-itm_number.

MOVE c_rej TO e_orderitem_in-reason_rej.

MOVE c_qt TO e_orderitem_in-target_qty.

APPEND e_orderitem_in TO i_orderitem_in.

FREE i_orderitem_inx.

MOVE newitem-posnr_ref TO e_orderitem_inx-itm_number .

MOVE c_u TO e_orderitem_inx-updateflag.

MOVE c_x TO e_orderitem_inx-reason_rej.

MOVE c_x TO e_orderitem_inx-target_qty .

APPEND e_orderitem_inx TO i_orderitem_inx.

FREE i_return.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = xvbak-vbeln

  • ORDER_HEADER_IN =

order_header_inx = e_orderheader_inx

TABLES

return = i_zbapiret2

order_item_in = i_orderitem_in

order_item_inx = i_orderitem_inx.

But in 'i_zbapiret2' iam getting the below errors.

1)Storage location BH in plant is not defined .

2) Error in ITEM_IN 000020

3) sales documnet 000078965 was not changed.

PLease help me to solve this problem.

Thanks in advance,

Sravanthi.