2009 Aug 24 3:30 PM
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.
Hi,
Try giving the same value as in your existing order. If there are no values in existing Sales order then try giving item number in this line. You can get schedule lines in VBEP table.
KR Jaideep,
2009 Aug 24 3:31 PM
Hi,
Pass the quanities in schedulelines and schdulelinex parameter also.
Also, from the code I can see that you are not passing header data in the BAPI.
Please pass the header data as well.
KR Jaideep,
2009 Aug 25 1:33 PM
Hi Jaideep,
Can you pls explain me what are the parameters I need to pass to schduleline. I could not understand what value to be passed to SCHEDULE_LINES-SCHED_LINE.
Thanks,
Sravanthi
2009 Aug 25 2:07 PM
Hi,
Try giving the same value as in your existing order. If there are no values in existing Sales order then try giving item number in this line. You can get schedule lines in VBEP table.
KR Jaideep,
2009 Aug 24 4:03 PM
Hi,
From the error message it seems that you dont have the storage location for the plant as you have passed to the BAPI check table 'T001L' to see if that storage location is there for the plant. If not then we need to maintain that.
Regards,
Himanshu
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |