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

ROLLBACK WORK

Former Member
0 Likes
793

hiii everybody, I have a question about ROLLBACK WORK.

I have a Z function that calls another function, in that new function I insert lines into a Z table, the function ends and come back to the first function.

I do a validation and I want ROLLBACK the changes in the Z table, but I cant, what is happening???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
761

Is there a COMMIT in the other function?

You cannot rollback work after a commit is done.

Also check for implicit commits.

5 REPLIES 5
Read only

Former Member
0 Likes
762

Is there a COMMIT in the other function?

You cannot rollback work after a commit is done.

Also check for implicit commits.

Read only

0 Likes
761

Is not a COMMIT WORK in the other function, but when I do the ROLLBACK, it does not work.

Read only

0 Likes
761

Your code might be doing an Implicit commit. This is from SAP help.



Implicit Database Commits in the R/3 System 

A work process can only execute a single database LUW. The consequence of this is that a work process must always end a database LUW when it finishes its work for a user or an external call. There are four cases in which work processes trigger an implicit database commit:

When a dialog step is completed
Control changes from the work process back to the SAPgui.

When a function module is called in another work process (RFC).
Control passes to the other work process.

When the called function module (RFC) in the other work process ends.
Control returns to the calling work process.

Error dialogs (information, warning, or error messages) in dialog steps.
Control passes from the work process to the SAPgui.

Read only

0 Likes
761

can I put all functions into a single LUW?

Read only

0 Likes
761

in that case you have to call that function in update task. make the function as update function module and call the function in update task.