‎2020 Jan 14 9:54 AM
Hello Experts,
How do I select from database into a string table?
e.g. Select * from <tablename> into table <lt_string>.
‎2020 Jan 14 11:50 AM
manu.kapur,
You need first declare a structure with all the fields holding string Data types, then pass on the data fetched from the above query into the table which is declared based on the string data type structure defined.
By explaining more on your requirement we can help you better.
Regards!
‎2020 Jan 14 12:24 PM
I need to read multiple tables more than 20 and then download all the data as one text file. Tried reading them one and one and transferring them to a table with single string field but that doesn't work either.
Any pointers?
‎2020 Jan 14 12:27 PM
‎2020 Jan 14 12:17 PM
I think you cannot proceed in one statement
‎2020 Jan 14 12:28 PM
@Frederic Girod,
Even I have to do in steps, what do you suggest? I have already tried reading and passing the tables in a string table, that gives me a type mismatch error.
‎2020 Jan 14 12:32 PM
(without test).
try somethink like that
select * from t001 into @data(lt_t001).
select * from t001w into @data(lt_t001w).
select * fron t001k into @data(lt_t001k).
cl_demo_output=>write_data( lt_t001 ).
cl_demo_output=>write_data( lt_t001w ).
cl_demo_output=>write_data( lt_t001k ).
data(lv_my_string) = cl_demo_output=>get( ).
‎2020 Jan 14 12:59 PM
I guess you mean a string of characters. What if the table is made of columns of different data types like bytes, packed numbers, floating numbers, what character format do you expect for these types?