‎2016 Dec 25 2:20 PM
Dear All,
I am building a method in a class. I am using a select statement where I extract data from table1 into itab2 for all entries in itab1.
It is giving error, "table1" is not defined in the ABAP Dictionary as a table, projection view, or database view. But when I try to use tables : table1, it again refuses to accept that statement inside the method. Any workaround?
Regards,
Cleo
‎2016 Dec 27 8:18 AM
The TABLES statement is obsolete and should not be used. ALWAYS use a seperately defined work area.
‎2016 Dec 25 5:27 PM
You should read the documentation -> first sentence: "This statement is not allowed in classes" (cf http://help.sap.com/abapdocu_702/en/?url=ABAPTABLES.htm)
To declare a variable, use DATA (cf http://help.sap.com/abapdocu_702/en/?url=ABAPDATA.htm).‎2016 Dec 26 3:05 PM
I made a structure and using that to extract data and used that in a FM.
‎2016 Dec 27 4:50 AM
‎2016 Dec 27 8:18 AM
The TABLES statement is obsolete and should not be used. ALWAYS use a seperately defined work area.