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 in debugging?

0 Likes
2,720

Hi All,

I have a strange case wherein a User-exit update FM should updated a table with some values.

When I run the transaction the data is not getting updated into the table where as when I debug and check the FM, the data is getting updated!!.

Would anyone have some explanation to this ?..

Thanks,

Neeth

8 REPLIES 8
Read only

Former Member
0 Likes
1,394

try using COMMIT statement after UPDATE statement in program

Read only

Former Member
0 Likes
1,394

Did you use Commit work in side your user exit.

if not palce it after update and try.

vijay

Read only

0 Likes
1,394

Hi All,

I am using a update function module, so expect it to trigger after SAP LUW commit. I don't want to make a explicit commit.

Thanks,

Neeth

Read only

0 Likes
1,394

Hi again,

1. Thats perfectly good.

But then also,

we need to write Commit either

in main program or exit / update FM

so that database changes are done.

2. The purpose of update FM

is to BUNCH all changes in one go

and overcome the problem of auto-commit faced

when screen changes occur.

(This auto-commit is done by SAP R/3

whenever dialog screens change)

regards,

amit m.

Message was edited by: Amit Mittal

Message was edited by: Amit Mittal

Read only

Former Member
0 Likes
1,394

Hi Nameeth,

1. LUW

When debugging, SAP automatically

does COMMIT.

That is why the data get saved.

2. Write Commit work in your program / exit

so that data is saved.

regards,

amit m.

Read only

Former Member
0 Likes
1,394

Hi use COMMIT statement at the end of ur code.

Satish

Read only

Former Member
0 Likes
1,394

Hi Nameeth,

It is a good Practice to use COMMIT Statement when ever u r using Update.

For the updated data to be Consistent we have to use Commit Statement.

Commit Statement has to be used compulsorly for Bapi's in 4.7c version which is not there in 4.6 version.

until we write commit, bapi will not update the data.

Plz reward points if it is helpful for u.

Regards

Usha

Read only

Former Member
0 Likes
1,394

Hi Nameeth,

You can find out what's going one without debugging (if you debug, it will COMMIT, and you don't want it to) using the transaction ST05 (SQL Trace). It will show you all COMMIT WORK's and also the update task execution.

Sefy.