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

Difference between CLEANUP and ROLLBACK_TO_SYNC_POINT?

Former Member
0 Likes
2,007

Hi Members,

regarding the interface /BOBF/IF_TRA_TRANSACTION_MGR, what is the difference between the methods CLEANUP and ROLLBACK_TO_SYNC_POINT?

Would it be better to use CREATE_SYNC_POINT and ROLLBACK_TO_SYNC_POINT if you want to discard changes you do not want to save during a session?

Or what’s the purpose of creating a sync point?

Kind regards,

Bjoern

Hi Members,

regarding the interface /BOBF/IF_TRA_TRANSACTION_MGR, what is the difference between the methods CLEANUP and ROLLBACK_TO_SYNC_POINT?

Would it be better to use CREATE_SYNC_POINT and ROLLBACK_TO_SYNC_POINT if you want to discard changes you do not want to save during a session?

Or what’s the purpose of creating a sync point?

Kind regards,

Bjoern

3 REPLIES 3
Read only

former_member190794
Active Participant
1,284

Hi Björn,

in a session multiple BOPF transactions can be sequently processed. They are finished each by a SAVE. If you would like to discard all changes of the current transaction (meaning to rollback to the last saved state), you should use the CLEANUP method.

Only in certain scenarios you have the requirement not to discard all changes of the current transaction but all changes done since a certain event during the current transaction. In that case, you have to create a syncpoint to rollback later on to this kind of "snapshot".

Example: If your UI implementation supports modal popups in the same session than the main window, it is often a requirement to rollback to the state of the current transaction before the popup is opened in case of cancelling the popup. A cleanup would be not suitable as it would also make all changes undone that are done before opening the popup and the last SAVE before.

Best regards

Tilmann

Read only

0 Likes
1,284

Now that sounds interesting, almost as if you could implement a generic undo - what a dream of a business transaction

Some more questions around syncpoints:

  • Are multiple syncpoints possible during a transaction?
  • Is it also possible to "roll forward" to a syncpoint (redo)?
  • Is there an option to compare those transactional images?
  • What about the cost of a syncpoint (memory, runtime)?

Thanks for the enlightment!

Cheers,

Oliver

Read only

0 Likes
1,284

Hello Oliver,

there can be only one syncpoint during a transaction and you can only rollback to that snapshot. There is no option to compare that snapshot/syncpoint with the transactional image. However I dont expect that the creation usually takes a lot of memory and runtime. From a technical viewpoint, creating a syncpoint means in the worst case doublicating the buffer instances - so in a common scenario (not mass data processing) that shouldn't be a problem.

Best regards

Tilmann