Code: Alles auswählen.
field-symbols <fs> type any.
Data: t_1 type lvc_t_modi,
t_2 type daser.
assign t_1 to <fs>.
<fs> = 'Fieldname'
Code: Alles auswählen.
Field-Symbols: <fs>.
ASSIGN (feldname) to <fs>.
Code: Alles auswählen.
DATA: FELD(30) TYPE C.
CONCATENATE 'STRUC' feldname into feld separated by '-'.Code: Alles auswählen.
ASSIGN (feld) to <fs>.Code: Alles auswählen.
FIELD-SYMBOLS: <fs1> TYPE ANY,
<fs2> TYPE ANY,
<fs3> TYPE ANY.
ASSIGN COMPONENT 'FIELDNAME' OF STRUCTURE wa_cells TO <fs1>.
ASSIGN COMPONENT 'ROW_ID' OF STRUCTURE wa_cells TO <fs2>.
Gruß
ASSIGN COMPONENT 'VALUE' OF STRUCTURE wa_cells TO <fs3>.
Code: Alles auswählen.
ASSIGN COMPONENT '<fs1>' OF STRUCTURE pr_1 TO <fs4>.
<fs4> = <fs3>.
Code: Alles auswählen.
descr_ref ?= cl_abap_typedescr=>describe_by_data( itab ).
LOOP AT descr_ref->components ASSIGNING <comp_wa>.
CONCATENATE 'ITAB-' <comp_wa>-name INTO fname.
WRITE: / fname.
ENDLOOP.Code: Alles auswählen.
* Datendefinitionen
* Zeiger auf eine Zeile deiner Datentabelle
field-symbols <pr_1> type t9citi.
* Zeiger auf eine Zelle deiner Datentabelle
field-symbols <pr_1_field> type any.
*Zu erst musst du einen Zeiger auf die richte Zeile haben.
READ TABLE pr1 INDEX row_id-wa_cells ASSIGNING <pr1>.
*Dann brauchst du einen Zeiger auf das richtige Feld
ASSIGN COMPONENT row_id-fieldname OF STRUCTURE <pr_1> TO <pr1_field>.
*Jetzt noch den Wert zuweisen
<pr1_field> = row_id-value.
Code: Alles auswählen.
READ TABLE pr1 INDEX wa_cells-row_id ASSIGNING <pr1>.