*&---------------------------------------------------------------------*
*& Report ZZ_##_MEHRDIMTABELLE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZZ_##_MEHRDIMTABELLE.
TYPES: BEGIN OF matrix,
zeile TYPE i,
spalte TYPE i,
element(16) TYPE c,
END OF matrix.
DATA matrix TYPE SORTED TABLE
OF matrix
WITH UNIQUE KEY zeile spalte.
DATA element TYPE matrix.
MOVE 1 TO element-zeile.
MOVE 1 TO element-spalte.
MOVE 'eins' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 1 TO element-zeile.
MOVE 2 TO element-spalte.
MOVE 'zwei' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 1 TO element-zeile.
MOVE 3 TO element-spalte.
MOVE 'drei' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 1 TO element-zeile.
MOVE 4 TO element-spalte.
MOVE 'vier' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 2 TO element-zeile.
MOVE 1 TO element-spalte.
MOVE 'fünf' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 2 TO element-zeile.
MOVE 2 TO element-spalte.
MOVE 'sechs' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 2 TO element-zeile.
MOVE 3 TO element-spalte.
MOVE 'sieben' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 2 TO element-zeile.
MOVE 4 TO element-spalte.
MOVE 'acht' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 3 TO element-zeile.
MOVE 1 TO element-spalte.
MOVE 'neun' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 3 TO element-zeile.
MOVE 2 TO element-spalte.
MOVE 'zehn' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 3 TO element-zeile.
MOVE 3 TO element-spalte.
MOVE 'elf' TO element-element.
INSERT element INTO TABLE matrix.
MOVE 3 TO element-zeile.
MOVE 4 TO element-spalte.
MOVE 'zwölf' TO element-element.
INSERT element INTO TABLE matrix.
DATA zeile TYPE i VALUE 0.
LOOP AT matrix INTO element.
IF zeile = element-zeile.
WRITE: element-spalte, element-element.
ELSE.
WRITE: / element-zeile, element-spalte, element-element.
ENDIF.
zeile = element-zeile.
ENDLOOP.