writing down a tables content generic
simple question :
When I start the program to be coded, I enter the name of a r/3 table (such as TSAD2).
I save the name in an ordinary char variable.
How can I display the entire content of the table now?
Remember : It is supposed to be generic, so you can't see the table name as pre-requisit.
My first thought was to save the entire r/3 table into an internal table (to reduce rfc calls and traffic) and to display it via a loop at-iteration, but I fail with retrieving the table content.
PARAMETERS : input_tablename type char20.
*call the table namend after the user input and save it
*create a generic structure "like line of r/3 table" ---you have to have called the table before...thats my problem
*loop table into structure and write
Thanks in advance!
Xavier Vanderstock replied
For anything dynamic about data, check articles about RTTS (Run Time Type Services). See [this|http://wiki.sdn.sap.com/wiki/x/1ac] for a quick overview. Basically with that you can retrieve metadata about types, modify them (at least for structures), dynamically create variables, internal tables, ...
It is certainly not an easy subject, but worth investing some time on it.