Contexts are obsolete and should not be used. Contexts were introduced for 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.
1. Enter DOCU_TEST1 and DOCU_TEST2 in the Name or Table/Module column of the Modules table and choose Enter. The system fills the tables on the context maintenance screen as follows:
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.
3. Choose Save. Save the context.
4. Choose Check. The system checks the context for errors.
5. Choose Network Graphic. The following graphic shows how values are derived within the context.
6. Choose Generate. The system checks and saves your context before generating it.