2010 Jun 23 2:30 PM
Hello Gurus,
I have one field which I stored into one variable through cncatenate statment in variable VAR1.
and I have another variable VAR2 have some amount.
now I want to put this amount to the field which is present into the VAR1.
ex: VAR1 = 't_display-co1'
VAR2 = 200
now I wnat to put this 200 into t_display-co1
o/p t_display-co1 = 200.
How should I do this?
Please Help.....
CONCATENATE 'w_display-' col_name into var1.
ASSIGN VAR1 to <fs>.
Thanks in adv.
2010 Jun 23 3:05 PM
Check this sample
data: begin of t_display,
col1(10) type c,
end of t_display.
FIELD-SYMBOLS: <fs> type any.
data: var2 type i,
var1 type string.
var2 = 200.
var1 = 't_display-col1'.
assign (var1) to <fs> CASTING TYPE c.
if sy-subrc = 0.
<fs> = var2.
endif.
Vikranth
2010 Jun 23 3:05 PM
Check this sample
data: begin of t_display,
col1(10) type c,
end of t_display.
FIELD-SYMBOLS: <fs> type any.
data: var2 type i,
var1 type string.
var2 = 200.
var1 = 't_display-col1'.
assign (var1) to <fs> CASTING TYPE c.
if sy-subrc = 0.
<fs> = var2.
endif.
Vikranth
2010 Jun 23 3:31 PM
Thanks Vickrant
You have solved my prob.
Thanks you for your Help.