SAP RANGES ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID RANGES
• RANGES ABAP Statement
• FOR RANGES (obsolete)
• OCCURS RANGES (obsolete)

RANGES
Short Reference

ABAP_SYNTAX_OBS
RANGES range_tab FOR dobj $[OCCURS n$].

What does it do?
Obsolete declaration of a ranges table. This statement, which is forbidden in classes, is a short form of the following statement string which is also not allowed in classes: DATA: BEGIN OF range_tab OCCURS ${10$|n$},
sign TYPE c LENGTH 1,
option TYPE c LENGTH 2,
low LIKE dobj,
high LIKE dobj,
END OF range_tab.
Declares an internal table range_tab with the structure of a ranges table and a header line. Without the addition OCCURS, the initial memory requirement of the ranges table is set to ten lines. The addition OCCURS can be used to specify either a numeric literal or a numeric constant n to determine a different initial memory requirement.



Latest notes:

The statement RANGES is replaced by the addition TYPE$|LIKE RANGE OF of the statements TYPES and DATA. If used, these declare ranges tables without header lines.
The sign and option columns of a ranges table declared using RANGES are not related to data types in the ABAP Dictionary. For a ranges table defined in the ABAP Dictionary, these columns refer to the data elements DDSIGN and DDOPTION.
ABAP_HINT_END

Return to menu