Start of Content Area

Using Contexts as Modules  Locate the document in its SAP Library structure

Caution 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:

This graphic is explained in the accompanying text

All fields from the two contexts are used as fields in this context. The system generates the names of the context fields.

       2.      You do not have to use all of the context fields. You can also change the context field names in the Fields and Modules tables:

This graphic is explained in the accompanying text

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.

This graphic is explained in the accompanying text

       6.      Choose Generate. The system checks and saves your context before generating it.

 

The context is finished and can be tested (see Testing a Context ) and used in programs (see Using Contexts in ABAP Programs).

 

 

 

End of Content Area