‎2007 Jul 04 5:58 AM
Hi experts,
A weird problem hits me so much. After I insert a table item and of course commit work following the insert clause in a function module, and I want to read the inserted item out and change it, but after I commit work for the update clause and go to the table to see the item you have changed, nothing happened. It seems that there are two threads for the insert and update clause. I want to know why, and how to solve the problem properly. Actually I use wait up to 1 seconds to solve the problem, but I do not want to wait for 1 second for each table item, as there are many items should be processed at one time, so it will take a long time to complete the whole processing which can not be accepted by the user.
Thx in advance, points will be rewarded.
Vincent.
‎2007 Jul 04 6:03 AM
hi
dont write commit work inside the function module. it wont work
write it in the report program after the function modulew gets executed.
regards
ravish
<b>plz dont forget to reward points if helpful</b>
‎2007 Jul 04 6:03 AM
hi
dont write commit work inside the function module. it wont work
write it in the report program after the function modulew gets executed.
regards
ravish
<b>plz dont forget to reward points if helpful</b>
‎2007 Jul 04 6:04 AM
My suggestion is to do all the intermediate changes in the internal table itself first and only "SAVE" updates the database.
You may have to do without the first Insert and have the data in the internal table itself. and when user modifies some data, the changes happens to the data in internal table rather than the Database. You can have a SAVE button (which updates to Database & commit work) to save the changes at one go.
Regards,
Anish Thomas
‎2007 Jul 04 6:05 AM
After your code calling the function
Write:
commit work and wait.