Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Extended syntax check for include structure

Former Member
0 Kudos

Hello Everyone,

While declaring the internal table as:

TYPES: BEGIN OF t_data.

INCLUDE STRUCTURE mara.

TYPES: END OF t_data.

DATA: it_data TYPE table of t_data.

When performing extended check, i get following error:

The current ABAP command is obsolete and problematic, especially so in ABAP

Objects

Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary

types, not "LIKE" or "STRUCTURE".

I am using 4.7 version.

Any clue how to avoid this error during extended check.

Regards,

Tarun

4 REPLIES 4

Former Member
0 Kudos

Tarun,

Use it like this.

TYPES : T_DATA type table of MARA.

Regards,

Ravi

0 Kudos

Hello Ravi,

Suppose i have the requirement like this:

types: begin of t_data,

werks type werks_d.

include structure mara

types: end of t_data.

Data: gt_data type table of t_data.

Then how to avoid the error getting in extended check.

Regards,

Tarun

0 Kudos

Tarun,

With WAS 6.20 you should not declare internal tables with header line or using the old syntax as they are not compatible with OO ABAP.

So, you either declare a TYPE the way you have done, in case you want additional fields apart from the INCLUDE structure, or declare the table directly like the way I have shown.

Good thing, you can even specify the type of internal table that you want to create using this - STANDARD, SORTED, HASH. These tables will help you with the performance issues.

regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

Hi,

try this.

TABLES : MARA.

DATA : BEGIN OF T_DATA OCCURS 0.

WERKS TYPE WERKS_D.

INCLUDE STRUCTURE MARA.

DATA : END OF RFCTAB.

Hope it helps.

Regards,

Shashank