
Global Parameters and Events for Maintenance Dialogs
Events often contain read or change access to the data container. For further information about events, see unter
Extended Table Maintenance Events.Some field symbols are only significant in the context of certain events. They are only defined globally so that they are available in the event.
Event 1 (Before saving in the database)
Data changed by the user is usually processed again here.
Example:
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "
Index to note row foundLOOP AT TOTAL.
IF <ACTION> =
specified constant.READ TABLE EXTRACT WITH KEY <VIM_XTOTAL_KEY>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
...
(make desired changes to the line TOTAL)
...
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
Events 5 and 21 (When making a new entry or filling hidden fields)
The entry previously made or copied by the user is in the structure <TABLE1>.
Event AD (Instead of standard RO field read routine)
The field symbols <SUBSETFIELD> and <VALUE> point to a subset field in the initial record (<INITIAL>) or the record (<TABLE1>). You get the field type.
For further information about other extended table maintenance, see http://service.sap.com/customizing.