o_ref TYPE REF TO data.
FIELD-SYMBOLS:
PARAMETERS:
p_tab TYPE tabname default 'MARA', " Table name (eg: MARA)
p_field(20) TYPE c default 'MATNR'. " Field name (eg: MATNR)
START-OF-SELECTION.
CREATE DATA o_ref TYPE TABLE OF (p_tab).
ASSIGN p_field TO
ASSIGN o_ref->* TO
SELECT *
INTO TABLE
FROM (p_tab).
LOOP AT
ASSIGN COMPONENT
TO
IF sy-subrc = 0.
WRITE:/
ENDIF.
ENDLOOP.
No comments:
Post a Comment