A range can be created using ABAP with a database table or the fields in an internal table by using SQL. Very practical.
In the following example, let’s try this with the company code field, BUKRS.
Note: For the ‘high‘ field, the range must be filled with as many spaces as the length of the field for which it is being created. In this example, the BUKRS field has 4 characters, so 4 spaces will be added.
select 'I' as sign,
'EQ' as option,
bukrs as low,
' ' as high
from T001
into table @data(lr_bukrs).