2009 Aug 20 9:12 AM
Hi all,
I have the following problem. In my code I'm trying to delete a delivery and after that change the schedule line of the salesorder. I'm using the following function/bapi:
WS_DELIVERY_UPDATE (to delete the delivery)
BAPI_SALESORDER_CHANGE (to update the scheduleline lifsp (delivery block))
But the bapi returns errors saying Field LIFSP can't be changed, because there is nog input possible VBEPKOM etc.
Can someone help me with this.
Thnx in advance.
Pieter
Hi all,
I have the following problem. In my code I'm trying to delete a delivery and after that change the schedule line of the salesorder. I'm using the following function/bapi:
WS_DELIVERY_UPDATE (to delete the delivery)
BAPI_SALESORDER_CHANGE (to update the scheduleline lifsp (delivery block))
But the bapi returns errors saying Field LIFSP can't be changed, because there is nog input possible VBEPKOM etc.
Can someone help me with this.
Thnx in advance.
Pieter
2009 Aug 20 9:30 AM
Hi Pieter,
The error you are getting is related to the conditions tab in the BAPI SALES ORDER CHANGE . But this is not a mandatory tab.
if you want to change delivery , you only need to update orders and delivery tab
and in the orderx and deliveryx tab u need to update the indicators for whatever fields you want to update.
if you have all the above parameters correct, pls paste your code and maybe i can help.
tc
sajimon chandran
2009 Aug 20 10:12 AM
Hi Sajimon,
Thanks for the quick reply. I'm just confused with you reply because in the BAPI SALESORDER CHANGE there is no deliveryx to fill. What I have done is the following:
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = wa_tussen-order
order_header_inx = wa_order_header_inx
tables
return = gi_return
schedule_lines = gi_schedule_lines
schedule_linesx = gi_schedule_linesx.
2009 Aug 20 10:25 AM
Sorry for the last post, some code is missing. Here again the code:
wa_schedule_lines-itm_number = wa_tussen-orderpositie.
wa_schedule_lines-sched_line = '0001' .
wa_schedule_lines-req_dlv_bl = '15'.
append wa_schedule_lines to gi_schedule_lines.
wa_schedule_linesx-itm_number = wa_tussen-orderpositie.
wa_schedule_linesx-sched_line = '0001'.
wa_schedule_linesx-updateflag = 'U'.
wa_schedule_linesx-req_dlv_bl = 'X'.
append wa_schedule_linesx to gi_schedule_linesx.
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = wa_tussen-order
order_header_inx = wa_order_header_inx
tables
return = gi_return
schedule_lines = gi_schedule_lines
schedule_linesx = gi_schedule_linesx.
if gv_recordfout = 'X'.
move wa_return-message to wa_tussen-omschrijving.
append wa_tussen to gi_fout.
continue.
endif.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = wa_return.
2009 Aug 20 10:34 AM
Hi,
Can you post the error message number and id?
Is it possible to change the field value online via VA02 transaction?
Incase it is not then there might be some functional reason for the same which you need to understand with your functional consultant.
Regards,
Ankur Parab
Edited by: Ankur Parab on Aug 20, 2009 3:04 PM
2009 Aug 20 11:56 AM
See here the records of the return table:
TYPE ID NUMBER MESSAGE
I |V1 |739 |Veld 'LIFSP' niet wijzigbaar, omdat geen
E |V4 |219 |Verkoopdocument 0006479955 is niet gewijz
Message tekst is in dutch.
Pieter
2009 Aug 20 11:59 AM
Hi,
Can the field changed online via VA02?
Did you check the same?
Regards,
Ankur Parab
2009 Aug 20 12:03 PM
2009 Aug 20 12:10 PM
Hi,
Is the UPDATEFLAG passed in the structure ORDER_HEADER_INX?
Regards,
Ankur Parab
2009 Aug 20 12:13 PM
2009 Aug 20 12:20 PM
Hi,
Try passing the item details also to the BAPI.
ORDER_ITEM_IN and ORDER_ITEM_INX
Regards,
Ankur Parab
Edited by: Ankur Parab on Aug 20, 2009 4:51 PM
2009 Aug 20 9:34 AM
Hi,
I think that you should use BAPI_TRANSACTION_COMMIT or COMMIT WORK statement after calling the BAPI.
Hope , it works fine for you.
Thanks,
Sarita Singh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |