
Contexts are obsolete and should not be used. Contexts were introduced in Release 4.0 for high-performance access to frequently required data. Since the introduction of ABAP Objects for Release 4.5, contexts have not been developed further. Since Release 6.40, contexts can be replaced by shared objects .
The following example demonstrates how to create a context called DOCU_TEST3, which uses two other contexts, DOCU_TEST1 and DOCU_TEST2, as modules. DOCU_TEST1 and DOCU_TEST2 have already been used in the preceding examples Using Tables as Modules and Using Function Modules as Modules .
All fields from the two contexts are used as fields in this context. The system generates the names of the context fields.
In this example, we have kept the three key fields CARRID, CONNID, and FLDATE, and deleted all dependent fields apart from SEATSMAX, SEATSOCC, and FREE_SEATS. The output fields from module DOCU_TEST1, SEATSMAX, and SEATSOCC are used as input fields for module DOCU_TEST2. The dependent field FREE_SEATS is filled from the output field FREE in DOCU_TEST2.
The context is ready and can be tested (see Testing a Context ) and used in programs (see Using Contexts in ABAP Programs ).