‎2009 Jun 17 1:46 PM
Hi frnds,
DATA : num1 TYPE numc05.
SELECT-OPTIONS : s_range FOR num1.
i want to get the all values what ever i give in selection screen. i mean... suppose if i give 100 to 105 then i have to get the values 100,101,102,103,104,105.
how to get it?
thanks & regards,
balu
‎2009 Jun 17 1:56 PM
Hi,
Try this.
DATA : num1 TYPE numc05.
DATA:BEGIN OF itab OCCURS 0,
num TYPE numc05,
END OF itab.
SELECT-OPTIONS : s_range FOR num1.
START-OF-SELECTION.
DO.
IF s_range-low LE s_range-high.
MOVE s_range-low TO itab-num.
APPEND itab.
ELSE.
EXIT.
ENDIF.
s_range-low = s_range-low + 1.
ENDDO.
LOOP AT itab.
WRITE: itab-num.
ENDLOOP.
‎2009 Jun 17 1:48 PM
HI,
You need to use LOOP statment
LOOP AT S_RANGE>
<Here you will get the values>
ENDLOOP.Thanks
Sudheer
‎2009 Jun 17 1:48 PM
Hi,
just mention the range in low and high... It will take all the range between it..
‎2009 Jun 17 1:48 PM
You should be able to get it....enter in low and high and ensure that the values you are entering are appended with leading zero's as you have declared them as NUMC
‎2009 Jun 17 1:56 PM
Hi,
Try this.
DATA : num1 TYPE numc05.
DATA:BEGIN OF itab OCCURS 0,
num TYPE numc05,
END OF itab.
SELECT-OPTIONS : s_range FOR num1.
START-OF-SELECTION.
DO.
IF s_range-low LE s_range-high.
MOVE s_range-low TO itab-num.
APPEND itab.
ELSE.
EXIT.
ENDIF.
s_range-low = s_range-low + 1.
ENDDO.
LOOP AT itab.
WRITE: itab-num.
ENDLOOP.
‎2009 Jun 17 4:24 PM
Can you explain your requirement a bit more. Where do you want to get the numbers, in S_RANGE?
Regards,
Susanta