Application Development 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: 

Ranges Problem

Former Member
0 Kudos

Hi Experts!

I have following Ranges

-


DATA: BEGIN OF S_RANGE OCCURS 50,

SIGN(1),

OPTION(2),

LOW TYPE I,

HIGH TYPE I,

END OF S_RANGE.

-


I fill it up with following code.

-


num1 = 2.

num2 = 13.

s_range-sign = 'I'.

s_range-option = 'BT'.

s_range-low = num1.

s_range-high = num2.

-


itab_ref-LINEID contains number from 1 to 80

-


DATA: tmpnum TYPE I.

LOOP AT itab_ref.

clear tmpnum.

tmpnum = itab_ref-LINEID.

IF tmpnum <b>IN</b> S_RANGE.

write / itab_ref-LINEID.

ENDIF.

ENDLOOP.

-


I use "IN" to check the s_range, but it is not working.

Can anyone give me some ideas?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ben,

1. minor mistake.

2. just give this extra line.

s_range-sign = 'I'.

s_range-option = 'BT'.

s_range-low = num1.

s_range-high = num2.

<b>APPEND S_RANGE.</b>

regards,

amit m.

3 REPLIES 3

Former Member
0 Kudos

Hi ben,

1. minor mistake.

2. just give this extra line.

s_range-sign = 'I'.

s_range-option = 'BT'.

s_range-low = num1.

s_range-high = num2.

<b>APPEND S_RANGE.</b>

regards,

amit m.

Former Member
0 Kudos

USE append S_range

s_range-sign = 'I'.
s_range-option = 'BT'.
s_range-low = num1.
s_range-high = num2.
<b>append S_range.</b>

Former Member
0 Kudos

Problem solved! Thank you all!