SAP CONTEXT



Get Example source ABAP code based on a different SAP table
  



Contexts (Obsolete)
Contexts are repository objects defined abstractly in the Context Builder (transaction SE33) in the ABAP Workbench that are used to derive the values of additional fields from key fields. ABAP programs work with instances of contexts.
A context consists of fields and modules. The fields of a context are subdivided into key fields and derived fields. The modules describe how the values of the derived fields are created from the key fields. Modules are based on
foreign key dependencies between database tables defined in the ABAP Dictionary and
function modules,
or in other contexts.
Viewed from a technical perspective, contexts are special ABAP programs (context programs CONTEXT_X_...) generated by the Context Builder.
An ABAP program can create one or more instances of a context. It can supply the key fields for each instance with values and query the fields derived. Each context has a cross-transaction buffer on the ABAP_ASINSTANCE , whose properties are defined in the Context Builder. When an instance is queried for values, the system first searches the corresponding buffer for a data record with the corresponding key fields. Only if no values exist yet for this key are they derived from the modules and written to the buffer.
The statements CONTEXTS, SUPPLY, and DEMAND are used to handle contexts.



Latest notes:

Although contexts can be compared with highly specialized classes, they are not part of ABAP Objects. Contexts were introduced for high-performance access to frequently required derived data. Since the introduction of ABAP Objects, further development of contexts has been discontinued. Contexts can now be replaced by shared objects.
ABAP_HINT_END