Code: Alles auswählen.
*---------------------------------------------------------------------*
* FORM merkmal_einfuegen *
*---------------------------------------------------------------------*
* Einfuegen Merkmal in Merkmalliste *
*---------------------------------------------------------------------*
FORM MERKMAL_EINFUEGEN.
DESCRIBE TABLE SMERK LINES SY-TMAXL.
CLEAR OK_CODE.
CHECK SY-TMAXL GT 0.
PERFORM GET_CURSOR USING SY-INDEX.
SY-INDEX = SY-INDEX + HEAD_MERKMAL - 1.
READ TABLE SMERK INDEX SY-INDEX.
IF NOT SMERK-INHER IS INITIAL.
CLEAR SMERK.
SCREEN_EXIT = 'X'.
EXIT.
ENDIF.
IF SY-INDEX GT 0.
CLEAR SMERK.
INSERT SMERK INDEX SY-INDEX.
IF NOT INDEX_VON IS INITIAL OR
NOT INDEX_BIS IS INITIAL.
LOOP AT SMERK.
CLEAR SMERK-MARK.
MODIFY SMERK TRANSPORTING MARK.
ENDLOOP.
ENDIF.
ENDIF.
CLEAR: OK_CODE, MERKIN_N, MERKIN_O, INDEX_VON, INDEX_BIS.
SCREEN_EXIT = 'X'.
ENDFORM.