‎2007 Feb 26 1:24 PM
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
‎2007 Feb 26 1:37 PM
data: lgtyp type lgtyp,
r_lgtyp for lgtyp type range of lgtyp.
‎2007 Feb 26 1:39 PM
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
‎2007 Feb 26 1:40 PM
Hi,
Use the Following Syntax.
DATA : r_lgtyp TYPE RANGE OF LGTYP.
DATA : rs_LGTYP LIKE LINE OF R_LGTYP.
regards,
Mahesh
‎2007 Feb 26 1:51 PM
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.
‎2007 Feb 26 1:54 PM
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.
‎2007 Feb 26 2:28 PM
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