Show TOC

Using Tables as ModulesLocate this document in the navigation structure

 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_TEST1, which has two modules with type Table. The tables used are SPFLI and SFLIGHT from the data model BC_TRAVEL.

  1. Enter SPFLI in the Name or Table/Module column of the Modules table and choose Enter. The system then fills all of the tables of the context editing screen with unique entries as follows:

    All of the columns of table SPFLI are used as fields in the context. The interface of module SPFLI shows that the key fields CARRID and CONNID are the input parameters.

  2. Now enter SFLIGHT in the Name or Table/Module column of the Modules table and choose Enter. The system now makes the following additional entries on the screen:

    All of the columns in SFLIGHT which are not already contained in SPFLI are now also used in the context. The interface for module SFLIGHT shows that the key fields CARRID, CONNID, and FLDATE are the input parameters of the new module.

  3. Choose Save. The context is saved.
  4. Choose Check. The system checks the context for errors.
  5. Choose Network Graphic. The following figure shows how values are derived within the context.

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

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