Example
TABLES: VBAK.
DATA: it_vbak TYPE TABLE OF vbak WITH HEADER LINE,
wa_fld(72) TYPE C,
it_fldtab LIKE TABLE OF wa_fld.
wa_fld = 'VBELN'.
APPEND wa_fld TO it_fldtab.
wa_fld = 'VBTYP'.
APPEND wa_fld TO it_fldtab.
wa_fld = 'AUDAT'.
APPEND wa_fld TO it_fldtab.
SELECT (it_fldtab) INTO CORRESPONDING FIELDS OF TABLE it_vbak
FROM VBAK
WHERE ERDAT = '20050105'.
IF SY-SUBRC = 0.
LOOP AT it_vbak.
write:/ it_vbak-vbeln,
it_vbak-vbtyp,
it_vbak-audat.
ENDLOOP.
ENDIF.
No comments:
Post a Comment