I don’t quite understand how the TABLES statement works in ABAP. From a few example codes I’ve seen that the tablename afther the statement is an already existing dictionary structure. Is this the only way it can be used? Because I’m never sure which structure it is that I need.
And once it is declared how do I pass this to the actual screen? I wish it were as straight forward as the HIDE method, I can’t get my head around this.
The
tablesstatement just provides you with a single-line work area of the dictionary structure that you specify. It allows you to use fields of the structure asselect-optionsand make the structure of the table available as a variable in your program.If you are trying to write the structure to an abap list you could use it as follows:
If you are trying to display the field using ABAP dynpro, you should make sure that you read the field in the PBO and add the field(s) to the screen from the dictionary.