02-03-2012 10:24 AM
Hi Experts ,
i am not sure whether this is right question or not. i have on structure say X with fields name and age. is there any way to represent this field with the help of another variable at runtime.
ex : Can i represent X-name as X-i where 'I' is s a string and will hold 'NAME' as a value.
can this be achievable. kindly give reply.
Thanks in advance.
02-03-2012 10:28 AM
types:begin of ty_x,
name type c,
end of ty_x.
data:wa type ty_x.
data:v type string.
field-symbols:<fs> type any.
data:field(4) type c.
start-of-selection.
field = 'NAME'.
concatenate 'WA-' field into v.
assign (v) to <fs>.
<fs> = 'A'.
write wa-name.
02-03-2012 10:30 AM
FIELD-SYMBOLS: <fp> TYPE ANY.
CONCATENATE 'X-' lv_register INTO gv_fn.
ASSIGN (gv_fn) TO <fp>.
so this field symbol wil have the value of x-name
02-03-2012 10:31 AM
instead of that why cant you use work variable which holds data temporarily in report
02-08-2012 12:19 PM