Global Parameters and Events for Maintenance Dialogs

Use

Events often contain read or change access to the data container. For more information about events, see 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 zum merken der gefunden Zeile
LOOP AT TOTAL.
IF <ACTION> = "gewünschte Konstante."
READ TABLE EXTRACT WITH KEY <VIM_XTOTAL_KEY>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
...
"(gewünschte Manipulation der Zeile TOTAL durchführen)"
...
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 more information about other extended table maintenance, see http://service.sap.com/customizing.