Skip to Content
author's profile photo Former Member
Former Member

Commit Work Failed.

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 05: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>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 05:05 AM

    After your code calling the function

    Write:

    commit work and wait.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.