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.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!