Using the Application Context to Transfer Application Data
Use
With this variant, the application itself is totally responsible for the implementation of the context. The BRF provides almost no support at all. The basic idea is that the context is saved in the event object. The system then uses a data source module to make the context fields available to the BRF.
Procedure
-
Implement a technical representation of your context in a subclass of CL_EVENT_BASE_BRF.
CL_EVENT_FLIGHT is a simple example of this. The context has been defined in accordance with a DDIC structure.
-
Create an event type in which this subclass is entered as an implementing class.
-
Create an event of the event type created in step 2 (see also Registering Events with the BRF).
-
Create a data source module.
Use BRF_FLIGHT_CONTEXT_GET as a sample (see also Using Data Sources to Transfer Application Data to the BRF).
-
Register the data source module and the underlying DDIC structure with the BRF.
Proceed as follows:
-
Call up transaction BRF
-
Choose .
-
In the Status field, choose Active.
-
In the Tab/Structure field, choose Structure.
-
Enter 0 as the version.
-
-
Create an expression for each field of the structure
-
Each expression must be of the type Simple Value Request (implementing class 0SM001). This means that you can make each field of the context available to the BRF
Consider the following:
-
This variant represents a context that is based on a DDIC structure.
Since such a variant occurs in many applications, SAP now provides a BRF standard context. In the standard context you now only have to configure contexts that are only based on a DDIC structure. You no longer need to derive classes, or implement and register data source modules.
For more information, see Using the BRF Standard Context to Transfer Application Data.
-
If your context does not have any reference to a DDIC structure, you still have the following options:
-
Implement an expression type that enables access to your own context fields (both configuration and runtime).
-
For each context field define an expression of the type Function Module as Expression (implementing class 0CF001), and one or several function modules that actually execute the access.
-

