instance 1

CONTEXTS demo_travel.
TYPES fields TYPE context_t_demo_travel.
DATA: carrier TYPE fields-carrid,
connection TYPE fields-connid,
c_from TYPE fields-cityfrom,
c_to TYPE fields-cityto,
c_time TYPE fields-fltime.DATA: demo_travel_inst1 TYPE context_demo_travel,
demo_travel_inst2 TYPE context_demo_travel.carrier = 'LH'.
connection = '400'.SUPPLY carrid = carrier
connid = connection
TO CONTEXT demo_travel_inst1.carrier = 'AA'.
connection = '017'.SUPPLY carrid = carrier
connid = connection
TO CONTEXT demo_travel_inst2.DEMAND cityfrom = c_from
cityto = c_to
fltime = c_time
FROM CONTEXT demo_travel_inst1.WRITE: / c_from, c_to, c_time.
DEMAND cityfrom = c_from
cityto = c_to
fltime = c_time
FROM CONTEXT demo_travel_inst2.WRITE: / c_from, c_to, c_time.



instance 2
DATA: percentage TYPE i.
CONTEXTS docu_test4.
DATA: context_inst TYPE context_docu_test4.
DATA itab TYPE TABLE OF symsg WITH HEADER LINE.
SUPPLY max = 00
occ = 20
TO CONTEXT context_inst.DEMAND percent = percentage
FROM CONTEXT context_inst MESSAGES INTO itab.WRITE: / 'Percentage: ', percentage. "#EC NOTEXT
IF sy-subrc NE 0.
LOOP AT itab.
WRITE: / itab-msgty, / itab-msgid, / itab-msgno,
/ itab-msgv1, / itab-msgv2.
ENDLOOP.
ENDIF.