Reputation: 468
In the following code:
TABLES: lqua.
CLASS TEST DEFINITION.
PRIVATE SECTION.
TYPES: BEGIN OF tt_data,
lgpla TYPE lqua-lgpla,
matnr TYPE lqua-matnr,
END OF tt_data.
ENDCLASS.
How could I get rid of the TABLES
statement? As far as I understand, it is best-practice to avoid the TABLES
statement, and it is forbidden in classes. When I omit it, the definition of tt_data
throws a syntax error because lqua-lgpla
is unknown.
Upvotes: 2
Views: 1231
Reputation: 10524
This does compile without any error.
REPORT zzpj_so.
CLASS test DEFINITION.
PRIVATE SECTION.
TYPES: BEGIN OF tt_data,
lgpla TYPE lqua-lgpla,
matnr TYPE lqua-matnr,
END OF tt_data.
ENDCLASS.
What does not is for example this piece of code.
REPORT zzpj_so.
CLASS test DEFINITION.
PRIVATE SECTION.
TYPES: BEGIN OF tt_data,
lgpla LIKE lqua-lgpla,
matnr LIKE lqua-matnr,
END OF tt_data.
ENDCLASS.
Upvotes: 2