Google Search - Blog...........

Creating A Dynamic Table & Dynamic Fields

report ztest.

data: begin of itab occurs 2,
field1 type dd03l-fieldname,
field2 type dd03l-fieldname,
field3 type dd03l-fieldname,
end of itab.

field-symbols: type table,
LIKE LINE OF ITAB,
TYPE ANY.

parameters: p_tab type dd02l-tabname,
field1 type dd03l-fieldname,
field2 type dd03l-fieldname,
field3 type dd03l-fieldname.


data: value(20),
field type char100.

value = 'ITAB[]'.
assign (value) to .

concatenate field1 field2 field3 into field separated by space.

select (field)
from (p_tab)
into table
up to 10 rows.

if is assigned .

loop at assigning .
write:/ .
endloop.
endif.

No comments:

Post a Comment