Hi all ,
I am trying to create a type at run time within my scheme by making use of a table loop.
[code]
Report test_data.
data :
llv_imp type table of RSIMP,
gt_imp_par type string occurs 0.
Field-Symbols :
<fs_imp_par> like RSIMP,
<fs_struct> type string.
Form inst_par_types
Changing
lv_imp like llv_imp
lt_imp_par like gt_imp_par.
Data :
lv_str(72) type c ,
lv_line type I ,
lv_delim type C value ',' .
Describe table lv_imp lines lv_line.
Loop at lv_imp assigning <fs_imp_par>.
if sy-tabix = lv_line.
lv_delim = '.'.
endif.
if <fs_imp_par>-default is not initial.
concatenate <fs_imp_par>-parameter 'TYPE' <fs_imp_par>-typ
'VALUE' <fs_imp_par>-default lv_delim into
lv_str SEPARATED BY space.
else.
concatenate <fs_imp_par>-parameter 'TYPE' <fs_imp_par>-typ
lv_delim into lv_str SEPARATED BY space.
endif.
append lv_str to lt_imp_par.
clear lv_str.
endloop.
Types :
Begin of l_tabname ,
<b><i>{T$lt_imp_par$$$<_imp_par&$$}</i></b>
End of l_tabname.
EndForm.
[/code]
But when i instantiate this scheme it dumps as the highlighted line creates 2 different definitions of same variable lt_imp_par (1 as var & another one as table).
What shall I do to get the solution?