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

Extended Program Check

Former Member
0 Likes
1,797

Hi all,

the following error occured in the extended program check

<b> Messages for Obsolete Statements(Error)

The current ABAP command is obsolete

You cannot use the "RANGES" statement within classes. Instead, use the "DATA"

statement with the type "TYPE/LIKE RANGE OF" . . . . . . . . .

Internal Message Code: RANGES 004

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

EXTENDED CHECK OFF/ON)</b>

the following lines were used in the program for which the above error occured

data: lgtyp type lgtyp.

ranges: r_lgtyp for lgtyp.

Please give me some solution

Thanks in advance

6 REPLIES 6
Read only

Former Member
0 Likes
1,198

data: lgtyp type lgtyp,

r_lgtyp for lgtyp type range of lgtyp.

Read only

Former Member
0 Likes
1,198

Hello Ranjith,

Instead of the this stmt

<b>

ranges: r_lgtyp for lgtyp.

</b>

Use

DATA: r_lgtyp type range of lgtyp with header line.

Vasanth

Read only

Former Member
0 Likes
1,198

Hi,

Use the Following Syntax.

DATA : r_lgtyp TYPE RANGE OF LGTYP.

DATA : rs_LGTYP LIKE LINE OF R_LGTYP.

regards,

Mahesh

Read only

0 Likes
1,198

THANK u

still it is not satisfying the condition.

RANGES: r_lgtyp FOR LGTYP.

DATA : rs_LGTYP LIKE LINE OF R_LGTYP.

R_LGTYP-SIGN = C_I.

R_LGTYP-OPTION = C_EQ.

R_LGTYP-LOW = C_CR1.

APPEND R_LGTYP to r_lgtyp.

CLEAR R_LGTYP.

R_LGTYP-SIGN = C_I.

R_LGTYP-OPTION = C_EQ.

R_LGTYP-LOW = C_CR2.

APPEND R_LGTYP to r_lgtyp.

CLEAR R_LGTYP.

R_LGTYP-SIGN = C_I.

R_LGTYP-OPTION = C_EQ.

R_LGTYP-LOW = C_CR3.

APPEND R_LGTYP to r_lgtyp.

CLEAR R_LGTYP.

R_LGTYP-SIGN = C_I.

R_LGTYP-OPTION = C_EQ.

R_LGTYP-LOW = C_CR4.

APPEND R_LGTYP to r_lgtyp.

CLEAR R_LGTYP.

plz reply for the above condition.

Read only

0 Likes
1,198

Hello,

Remove this line from the code:

RANGES: r_lgtyp FOR LGTYP.

TO define the Ranges

DATA : rs_LGTYP TYPE RANGE OF LGTYP occurs 0 with header line.

Read only

0 Likes
1,198

the problem is that the statement "ranges" is obsolete by now. Atleast when dealing with ABAP Óbject Orientated.

So as long as a Ranges statement appears in your code the extended Syntaxcheck will alert you.

But like you can see above, the ranges statement isnt neccesary anymore, since it has been replaced by the data statement with the option ranges.

BUT be aware the statement "with header line" is obsolete as well, and not only when dealing with ABAP OO, it´s generally obsolete.

Message was edited by:

Florian Kemmer

Message was edited by:

Florian Kemmer