Dear abap experts,
The following sample report has a dynamic select statement which works for any table but it terminates at runtime for tables which include numeric fields of type i, p, or f.
The error message is, "The data object cannot be converted to a character-type object."
Is there any syntax in abap which gets around this problem?
REPORT ZYJK_DYNAMIC_WA2 MESSAGE-ID ZF.
parameters: ptabname type tabname default 'T001'.
parameters: pcount type i default '10'.
data: vcount type i.
data: wa type ref to data.
FIELD-SYMBOLS: <wa> TYPE ANY.
create data wa type (ptabname).
assign wa->* to <wa>.
Select * into <wa>
if vcount > pcount. Exit. Endif.
write: / <wa>(60).
add 1 to vcount.