Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Commit Work Problem

Former Member
0 Likes
1,532

Hi

I have a functionality to update certain details and I use the appropriate FM to update the same .

After this I use the statement

COMMIT WORK .

Now if in debugging if we execute step by step the values are updated perfectly but if i am running the application as

a whole the value which is supposed to be updated is not updated perfectly .

I have tried using WAIT UP TO n SECONDS also after this .

Initially i used COMMIT WORK AND WAIT also . But nothing seems to work .

Can anyone please suggest what is wrong .

Thanks in Advance

K.Nadesh Kumar

5 REPLIES 5
Read only

samantak_chatterjee
Active Contributor
0 Likes
825

Hi Nadesh,

Try calling the Function Module in an Update Task. And then Call the COMMIT WORK AND WAIT statement.



CALL FUNCTION 'FM NAME' IN UPDATE TASK
IMPORTING
.....

EXPORTING
....

EXCEPTIONS
......


IF sy-subrc EQ 0.
COMMIT WORK AND WAIT.
ENDIF.


Hope this will help.

Thanks,

Samantak

Read only

0 Likes
825

Hi

I tried to call the FM in Update task also .

But it was also not successful .

Nadesh

Read only

0 Likes
825

Hi

Resolved

NadeshKumar.K

Moderator Message: Please close your threads with proper comments. This is helpful for future references.

Edited by: Suhas Saha on Aug 4, 2011 8:22 PM

Read only

0 Likes
825

Hi All

The Issue was resolved when i tried the following.

WAIT statement solved the issue

Nadesh

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
825

Nadesh,

Before use the COMMIT statement,use below code

CALL FUNCTION 'ENQUEUE_READ'

EXPORTING

gname = '' """"""""""" ESDOKOBJ ( eg : table name )

garg = '' """""""""""" document name ( eg : trdir )

GUNAME = ''

TABLES

enq = enq

EXCEPTIONS

OTHERS = 0.

DESCRIBE TABLE enq LINES sy-tfill.

CHECK sy-tfill > 0.

CALL FUNCTION 'ENQUE_DELETE'

EXPORTING

suppress_syslog_entry = 'X'

IMPORTING

subrc = rc

TABLES

enq = enq.

I faced similar problem earlier and resolved using this.

Hope this will solve ur issue.

Regards,

Sree