09-23-2008 6:41 AM
HI,
This is Anil . I have problem regarding Commit work and Wait up to 2 seconds.
I am using Commit work on one Update table statement but it is not working . While doing debugging it is working
(means it is updating Table.) but while running the transaction directly it is not updating the table.
Check the statements :
Commit work.
Some Select stmt on <table>.
IF <condition.>
Update <table > statement.
if sy-subrc EQ 0.
Commit work . ( This is not working while running transaction mean it is not updating table. While debuggint it it updating table.)
wait up to 2 seconds.
endif.
endif.
Will that above Commit work causing any problem or what is the reason it is not updating table.
Please give some suggestion in this case.
Regards,
Anilreddy.
09-23-2008 6:49 AM
Hi
the below code with commit work is working finr for me.
only thing i suggest is to check sy-subrc value.
commit work.
update spfli set test = '1234' where carrid = 'AA'.
if sy-subrc eq 0.
commit work.
wait up to 2 seconds.
endif.
write: / sy-subrc.
09-23-2008 6:49 AM
Hi
the below code with commit work is working finr for me.
only thing i suggest is to check sy-subrc value.
commit work.
update spfli set test = '1234' where carrid = 'AA'.
if sy-subrc eq 0.
commit work.
wait up to 2 seconds.
endif.
write: / sy-subrc.
09-23-2008 6:59 AM
HI Jyothi ,
Thank you for your inputs . But my doubt is why it is not updating the table even if you use commit work, and wait up to 2 seconds.
Anil.
09-23-2008 2:57 PM
Anil,
Use the statement commit work and wait. This will solve your issue.
Regards
Farzan
09-23-2008 3:50 PM
Hi,
Is this code is any user exit? or any update task, which may be failing?
If this is just an independent program, just use commit work. Should work . . . without wait also.
Best Regards,
09-23-2008 6:54 AM
Hi Anil,
Why dont you try with one more second?
Wait upto 3 seconds. i have seen two or three programs in my system which waits for 3 seconds.
Might be based on the system's efficiency.