2012 Apr 23 5:12 PM
Hi,
I am having an issue updating the batch at item line using the bapi above, done some research on it and the closest I can see is this thread: http://scn.sap.com/thread/1186387.
This is exactly my issue, it_return is coming back with Field 'CHARG' Can not be changed VBAPKOM 000010 is ready for input'. However the answer from this thread we already knew and does not help us.
To explain a little further what we are trying to do, we are using 'BAPI_SALESDOCUMENT_COPY' to create an order with reference to a contract. Then we are updating various fields at header and item levels using the salesorder change bapi. From what i've researched and worked through with our SD guys is that manually the batch is not an input field until the plant has been entered and ENTER has been hit.
This I think is what our main issue is coming into the BAPI, that we are trying to update the plant and the batch at the same time and the batch field is not able to take an input. If we try to update the plant first, then the delivery is created automatically, and the batch again is non editable, so we are a little stuck.
Anyone any suggestions as to how to get around this and update both the plant and the batch at the same time?
Thanks
Mark
Hi,
I am having an issue updating the batch at item line using the bapi above, done some research on it and the closest I can see is this thread: http://scn.sap.com/thread/1186387.
This is exactly my issue, it_return is coming back with Field 'CHARG' Can not be changed VBAPKOM 000010 is ready for input'. However the answer from this thread we already knew and does not help us.
To explain a little further what we are trying to do, we are using 'BAPI_SALESDOCUMENT_COPY' to create an order with reference to a contract. Then we are updating various fields at header and item levels using the salesorder change bapi. From what i've researched and worked through with our SD guys is that manually the batch is not an input field until the plant has been entered and ENTER has been hit.
This I think is what our main issue is coming into the BAPI, that we are trying to update the plant and the batch at the same time and the batch field is not able to take an input. If we try to update the plant first, then the delivery is created automatically, and the batch again is non editable, so we are a little stuck.
Anyone any suggestions as to how to get around this and update both the plant and the batch at the same time?
Thanks
Mark
2012 Apr 24 8:27 AM
BATCH
you can pass parameter like as follow:
and i_order_item_in-batch pass new value with schedule line (i_sched)
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx
schedule_lines = i_sched
schedule_linesx = i_schedx.
2012 Apr 24 9:26 AM
Hi Krupa,
I am currently doing as you said.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = lv_vbeln
order_header_in = v_order_header_in
order_header_inx = v_order_header_inx
logic_switch = logic_switch
TABLES
return = t_return
order_item_in = it_item_in
order_item_inx = it_item_inx
partners = t_part
partnerchanges = t_part_inx
schedule_lines = it_schedule_lines
schedule_linesx = it_schedule_linesx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Fields I am passing into it_item_in are:
ITM_NUMBER
PO_ITM_NO
MATERIAL
BATCH
PLANT
TARGET_QTY
PURCH_NO_C
REF_DOC
REF_DOC_IT
REF_DOC_CA
Along with the relevant 'X''s in the it_item_inx table with 'U' as the update flag.
Without the batch populated the BAPI is working fine and updating everything, but including it gives us the error.
Any other suggestions?
2012 Apr 24 10:52 AM
Hi,
What is the error message you are getting? If possible, please provide the message no & message id.
Regards,
Vijaymadhur.
2012 Apr 24 11:01 AM
Hi Vijaymadhur,
The message is in the OP in bold.
Field 'CHARG' Can not be changed VBAPKOM 000010 is ready for input'
It is actually an information message Type = I, ID = V1, Number = 739 but it still stops the order from updating.
Regards
Mark
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |