Once you have created a context instance, you can supply values for its key fields. You do this using the SUPPLY statement:
Syntax
SUPPLY <key1> = <f 1> ... <key n> = <f n> TO CONTEXT <inst>.
This statement supplies the values <fn> to key fields <key n> of a context instance <inst>. The fields of the context are contained in the
Fields table.When you have specified values for the key fields, you can derive the dependent fields of the context instance (see
Querying Data from Context Instances).If you assign new key fields to a context instance after deriving the dependent fields, the derived values are automatically invalidated, and will be re-calculated the next time you derive dependent values.
REPORT RSGCON01.
CONTEXTS DEMO_TRAVEL.
DATA: DEMO_TRAVEL_INST1 TYPE CONTEXT_DEMO_TRAVEL,
DEMO_TRAVEL_INST2 TYPE CONTEXT_DEMO_TRAVEL.
SUPPLY CARRID = 'LH'
CONNID = '400'
TO CONTEXT DEMO_TRAVEL_INST1.
SUPPLY CARRID = 'AA'
CONNID = '017'
TO CONTEXT DEMO_TRAVEL_INST2.
This program extract generates two instances of the context DEMO_TRAVEL and supplies both with key values.