On Modify or On Save? A Practical Decision Model for RAP Determinations

11 hours ago 3

If you have written more than a handful of ABAP RAP behavior definitions, you have declared a determination and had to make a choice: should it run on modify or on save? It is easy to answer that question by instinct, or by copying whatever pattern sits in the class next to it. The application works either way, at least when you test it or when the key user does. The trouble shows up later, when an edge case comes up that testing never covered, and nobody on the team can explain why the determination was placed where it was. This is not a syntax problem. Both triggers are declared the same way, and either one will compile and run. It is an architectural decision, and it becomes expensive to get wrong only after the application is already being used heavily in production. What Actually Changes Between the Two Triggers Strip away the keywords for a moment. The real difference between the two triggers comes down to timing: when each one runs, and how many times. A RAP transaction spends most of its life in the interaction phase. Every operation you send during that phase, create, update, delete, or an action, gets written to the transactional buffer rather than to the database directl...

Read Entire Article