Code: Alles auswählen.
FUNCTION zide_alv_itab.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" GT_ITAB TYPE TABLE OPTIONAL
*"----------------------------------------------------------------------
Code: Alles auswählen.
LOOP AT gt_itab WHERE (cond).
Code: Alles auswählen.
DATA:
BEGIN OF LT_DYNTAB OCCURS 0,
FELD1(2),
FELD2(2),
FELD3(2),
END OF LT_DYNTAB,
LV_FIELDNAME(30).
RANGES R0001 FOR SY-LISEL.
FIELD-SYMBOLS <FELD>.
PARAMETERS: P_FNAME(30) DEFAULT 'FELD2',
P_FKOND(2) DEFAULT 'bb' LOWER CASE.
START-OF-SELECTION.
APPEND '11aaAA' TO LT_DYNTAB.
APPEND '22bbBB' TO LT_DYNTAB.
APPEND '33ccCC' TO LT_DYNTAB.
APPEND '44ddDD' TO LT_DYNTAB.
R0001-SIGN = 'I'.
R0001-OPTION = 'EQ'.
R0001-LOW = P_FKOND.
APPEND R0001.
LOOP AT LT_DYNTAB.
CONCATENATE 'LT_DYNTAB-' P_FNAME INTO LV_FIELDNAME.
ASSIGN (LV_FIELDNAME) TO <FELD>.
CHECK <FELD> IN R0001.
WRITE: / LT_DYNTAB.
ENDLOOP.
Code: Alles auswählen.
READ TABLE gt_itab
ASSIGNING <ls_itab>
WITH KEY (feldname1) = wert1
(feldname2) = wert2.
Code: Alles auswählen.
READ TABLE <gt2_itab> ASSIGNING <fs_line_to>
WITH KEY (lv_field01) = <lv_value01>
(lv_field02) = <lv_value02>
(lv_field03) = <lv_value03>
(lv_field04) = <lv_value04>
(lv_field05) = <lv_value05>.
Code: Alles auswählen.
WITH KEY (lt_field(1)) = (lt_value(1)).