Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Ranges Problem

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

Tags:
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question