Code: Alles auswählen.
read table <gt_table>
with key ('LNR') = lw_querystrukt-lnr
assigning <gs_wa1>.
Dürfte bei Tabellen ohne bekannte Zeilenstruktur aber zum Dump ITAB_ILLEGAL_COMPONENTereglam hat geschrieben:gefunden in der Hilfe zu 'READ TABLE itab WITH KEY k1 = v1 ... kn = vn'...Code: Alles auswählen.
read table <gt_table> with key ('LNR') = lw_querystrukt-lnr assigning <gs_wa1>.
Code: Alles auswählen.
report.data:z type table of c,c.read table z into c with key ('C') = c.
Code: Alles auswählen.
DATA:
typ TYPE char1,
anzahl TYPE i.
DESCRIBE FIELD <gs_wa1> TYPE typ COMPONENTS anzahl.
IF anzahl GT 1.
read table <gt_table>
with key ('LNR') = lw_querystrukt-lnr
assigning <gs_wa1>.
ELSE.
* 'table_line' implizit vorhandenes Element, dass die gesamte Struktur umfasst.
read table <gt_table>
with key table_line = lw_querystrukt-lnr
assigning <gs_wa1>.
ENDIF.