SPA/GPA parameters with linking class

Published on

in

Reading time:

1–2 minutes

Dear community, in rare cases I have needed SPA/GPA parameters to implement very specific requirements. They make it possible to write information into the User Memory of the User Session. A sequence of reports that run within an ABAP session can pass data to each other in this way. The first report sets a parameter, for example, the second report in the call sequence gets the value of this parameter and continues working with it.

It becomes clear that it is an interplay of give and take or better setting and getting. This unity is sometimes difficult to understand: where is the parameter set, where is it read?

To make the unity clear, you can use a class with two methods. The first method can be SET_VALUE_TO_USER_MEMORY and the other method GET_VALUE_FROM_USER_MEMORY. The unity of setting and getting then becomes clear based on the Where-Used List for the class.

In one use case, I wrote a value to the user memory via a report, which was later read and reused in a Business Add-In implementation of the same ABAP session. Without the class as a connecting element, it is difficult to identify the corresponding locations in the various development objects.

Have fun trying out

Michael