Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select Statement

In select Statement i want to put table name and field name as variables

please reply

Tags:
Former Member
replied

Hi Umesh,

check this sample..

REPORT  ZTEST_DYNAMIC  no standard page heading                         .


parameters: tabl type DD03L-tabname,
            fld type dd03l-FIELDNAME.

data: begin of itab occurs 0,
       char(20),
      end of itab.

start-of-selection.

         select (fld)
              into table itab
              from (tabl).
              if sy-subrc = 0.

              endif.
end-of-selection.
write: tabl.
write:/ fld.
loop at itab.

write: / ITAB-char.

endloop.

Regards

vijay

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question