cancel
Showing results for 
Search instead for 
Did you mean: 

BRFplus Rollback

0 Kudos

Hello BRFplus gurus,

Is it possible to have a rollback step when using BRFplus APIs? Let assume I want to populate 2 dependent decision tables A and B. The order is insert records into A first and save. Then insert records into B (if insert A was successful). However, if insert B fails a rollback for the decision table A should occur. I understand that it is possible to discard changes before the save method call, though.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

christianlechne
Active Contributor
0 Kudos

Hi,

you are right as soon as you save a change the data is written to the DB. There is no API method to do a rollback or to save something as draft.

If you strictly use the API you can rollback the changes via ROLLBACK WORK (but be aware of implicit commits)

BR

Christian

0 Kudos

Hi Christian,

Thanks for your reply. What do you mean with the strict use of the API?

FYI, I use the insert() and the save() methods.

christianlechne
Active Contributor
0 Kudos

Hi,

I meant that you can use the API in a dialog flow or in a wizard where switching between screens might lead to an implicit commit. If yor functionality is just a sequence of the API calls the ROLLBACK WORK should work for you

BR

Christian

0 Kudos

The application has no dialog steps and no ABAP statement that would trigger a commit work (messages etc.).

Are you now suggesting that a ROLLBACK WORK would work even after a save( ) ?

christianlechne
Active Contributor
0 Kudos

That's what I meant 🙂

Answers (0)