Application Development and Automation 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: 
Read only

what is the new coding for types ??

Former Member
0 Likes
1,349

I do when I change one of my programms a check to see if all coding is still valid

now I have

types: BEGIN OF ty_zcs_operatielijst_alv.
       include structure zcs_operatielijst_alv.
types: cellcolors TYPE lvc_t_scol.
types: END OF ty_zcs_operatielijst_alv.

but the check says

The current ABAP command is obsolete

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

types, not "LIKE" or "STRUCTURE".

Internal Message Code: MESSAGE G/B

(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET

but when I change it to type it is also not good ??

and when I press F1 on types I don't get the message that include structure is obsolete coding in types ?

where can I found out how to code this correctly ?

kind regards

arthur

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,034

In the ABAP OO Context, you can not use the STRUCTURE. Instead use TYPE.

TYPES: BEGIN OF ty_zcs_operatielijst_alv.
            INCLUDE TYPE zcs_operatielijst_alv.
    TYPES: cellcolors TYPE lvc_t_scol.
    TYPES: END OF ty_zcs_operatielijst_alv.

Regards,

Rich Heilman

I do when I change one of my programms a check to see if all coding is still valid

now I have

types: BEGIN OF ty_zcs_operatielijst_alv.
       include structure zcs_operatielijst_alv.
types: cellcolors TYPE lvc_t_scol.
types: END OF ty_zcs_operatielijst_alv.

but the check says

The current ABAP command is obsolete

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

types, not "LIKE" or "STRUCTURE".

Internal Message Code: MESSAGE G/B

(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET

but when I change it to type it is also not good ??

and when I press F1 on types I don't get the message that include structure is obsolete coding in types ?

where can I found out how to code this correctly ?

kind regards

arthur

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,035

In the ABAP OO Context, you can not use the STRUCTURE. Instead use TYPE.

TYPES: BEGIN OF ty_zcs_operatielijst_alv.
            INCLUDE TYPE zcs_operatielijst_alv.
    TYPES: cellcolors TYPE lvc_t_scol.
    TYPES: END OF ty_zcs_operatielijst_alv.

Regards,

Rich Heilman

Read only

1,034

>

> In the ABAP OO Context, you can not use the STRUCTURE. Instead use TYPE.

>

>

TYPES: BEGIN OF ty_zcs_operatielijst_alv.
>             INCLUDE TYPE zcs_operatielijst_alv.
>     TYPES: cellcolors TYPE lvc_t_scol.
>     TYPES: END OF ty_zcs_operatielijst_alv.

>

>

> Regards,

> Rich Heilman

thanks, I only tried below coding and haven't thought of combining include with type

TYPES: BEGIN OF ty_zcs_operatielijst_alv.
            TYPE zcs_operatielijst_alv.
    TYPES: cellcolors TYPE lvc_t_scol.
    TYPES: END OF ty_zcs_operatielijst_alv.

kind regards

arthur

Edited by: A. de Smidt on Mar 26, 2010 9:02 AM

Read only

0 Likes
1,034

thx man.

Luis Hidalgo.

Read only

Former Member
0 Likes
1,034

Hi,

Issue is with the "INCLUDE STRUCTURE" Statement, not with the Types.

Just remove the "INCLUDE STRUCTURE" Statement and use like this.


DATA: ty_zcs_operatielijst_alv TYPE STANDARD TABLE OF zcs_operatielijst_alv,
cellcolors TYPE lvc_t_scol.

Thanks......