Skip to Content
ABAP Development

Error Checkpoint Group

While developing Business Applications with the Business Object Processing Framework (BOPF), the interfaces of BOPF entities – like for instance actions, validations and determinations – are implemented.

Issue

Especially if the implementation of an entity dynamically creates the values for the exporting parameters, it might happen that depending on the scenario, contract violations are only detected at runtime but cannot detected statically at design time.   

Example

Business Objects usually contain actions for explicitly executing business logic. Each BOPF action implements the interface /BOBF/IF_FRW_ACTION having the IT_KEY importing and ET_FAILED_KEY exporting parameter. The keys contained in IT_KEY represent the node instances that have to be processed by the action. The ET_FAILED_KEY exporting parameter can be filled by the implementation to indicate problems while processing a certain node instance. By contract, the ET_FAILED_KEY parameter contains a subset of the IT_KEY. In the following code, I have mixed up to internal tables and thus violate the subset contract. At design time, everything is fine, but at runtime, it will dump.

Solution

In order to check the correctness of BOPF entity implementations, many checks are implemented inside the BOPF core runtime. By default, those checks are disabled to save performance in productive environments. But for testing purposes or in pure development systems, those checks can be activated to find issues already in an early stage of development.


In order to activate the checkpoint group start transaction SAAB and open the desired group “/BOBF/FRW_ERROR”. Switch to the “Activation” tab and maintain the desired assertion behavior. For instance, all errors can be either logged or checked afterwards or raise a breakpoint. After saving the settings, the activation duration can be maintained.

Example

In regard of our example, the BOPF will now automatically check if ET_FAILED_KEY is a subset of IT_KEY and if not, either raise a breakpoint or log the error in the SAAB log.

Conclusion

You can use the checkpoint group “/BOBF/FRW_ERROR” via transaction "SAAB" during development and test phase to validate the BOPF interface contracts during early stage of development. For productive usage, the checkpoint group must be switched off.

Links

Hint: This article has been moved from a blog to the official BOPF content space

No comments