‎2012 May 03 10:28 AM
Hi,
I am using a field from "DD02L" in my parameters and therefore have declared the table using TABLES statement.
When I do an EPC on my program, it gives me the following under Programming Guidelines(Warnings) :-
"TABLES statement (DD02L) is obsolete
Cannot be suppressed using a pragma or pseudo-comment"
What is the alternative to this statement?.
I am working ECC 6 Ehp5.
‎2012 May 03 10:38 AM
If by parameters, you mean to say , selection screen parameters,why you need Tables Statement to define parameter. You can directly do it like:
Parameters p_tab type dd02l-tabname.
Kindly let me know if I understood your requirement incorrectly.
‎2012 May 03 10:36 AM
Why dont you use the data element of the table for your parameter?
‎2012 May 03 10:38 AM
If by parameters, you mean to say , selection screen parameters,why you need Tables Statement to define parameter. You can directly do it like:
Parameters p_tab type dd02l-tabname.
Kindly let me know if I understood your requirement incorrectly.
‎2012 May 03 10:43 AM
You can direct refer to the Data Element of the field which you want to refer and accordingly you can adjust your Parameter declaration. For that you do not need to use TABLES statement.
Table statement actually allows you to use a structure with the same name and hence it creates a conflict in a Obj Oriented scenario. Hence that statement is made Obsolete.
‎2012 May 03 10:43 AM
Dear Asshrith HG,
When you use the statement TABLES, then an internal table with header line will get declared and sice internal tables with header lines are obsolete you are getting that error message.
As suggested you can use the data element directly. Data element for that field is TABNAME.
Declare a variable of type TABNAME and use it in your program. Thank you.
Regards,
kartik
‎2012 May 03 10:44 AM
TABLES statement is obsolete because it declares a work area of the same name as the DB table, thus leading to ambiguous code, similar topic as internal tables with header lines, also obsolete.
Better declare separate work areas for the relevant DB tables for the use in the SELECT statements.
Thomas
‎2012 May 03 11:05 AM
For parameters you don't need TABLES statement You can directly refer using TABLE-FIELDNAM or Data element name. LIke
parameters : p_matnr type matnr.
If you are trying to create select option the you may create an auxilarry variable for the same.
Like
data : gv_matnr type matnr.
select-options : so_matnr for gv_matnr.
‎2012 May 03 11:09 AM
‎2012 May 03 11:18 AM