02-28-2006 4:24 PM
I have
<b>SELECT-OPTIONS: so_perbl FOR ce22000-perbl.</b>
on the selection screen of the program to get range of fiscal period.
I need to loop through the internal table <b>so_perbl</b>and capture all the distinct values of the fiscal period. But when I look at the internal table in the debug mode it only has one record as
SIGN OPTION LOW HIGH
I BT 2006005 2007006
How do I capture all the fiscal periods in the range separately (2006005, 2006006, 20006007, 2006008...2007006)
Another problem is what if the user enters one fiscal period to be excluded. How will I capture everything else? Any help will be greatly appreciated.
02-28-2006 4:27 PM
Hi Syed,
SIGN OPTION LOW HIGH
I <b>BT</b> 2006005 2007006
BT means between,so you will get all the records between those periods. ie (2006005, 2006006, 20006007, 2006008...2007006).
If you want them separetly,then you have to populate a range for that.
When you enter a single value.
Option field value which was BT becomes <b>EQ</b>.
02-28-2006 4:27 PM
Hi Syed,
SIGN OPTION LOW HIGH
I <b>BT</b> 2006005 2007006
BT means between,so you will get all the records between those periods. ie (2006005, 2006006, 20006007, 2006008...2007006).
If you want them separetly,then you have to populate a range for that.
When you enter a single value.
Option field value which was BT becomes <b>EQ</b>.
02-28-2006 4:41 PM
To get all the values for this select option, write a select on the check table of this field and get all the values for PERBL into another internal table.
data: begin of i_perbl,
perbl like ce22000-perbl,
end of i_perbl.
select PERBL
into table i_perbl
from <check table>
where perbl in s_perbl.
02-28-2006 4:52 PM
Thanks for your response. I looked at the field <b>perbl</b> in table CE2000. The Check table field is blank.
Can I use
select <b>distinct</b> PERBL
into table i_perbl
from <b>CE22000</b> "instead of check table
where perbl in s_perbl.
02-28-2006 4:54 PM
02-28-2006 4:58 PM
Hi ,
U can use this code.
I used type I.
data : v_num type i.
select-options : s_number for v_num.
data : begin of it_num occurs 0,
value type i,
end of it_num.
start-of-selection.
DO.
if s_number-low >= s_number-high.
exit.
else.
it_num-value = s_number-low.
append it_num.
clear it_num.
endif.
s_number-low = s_number-low + 1.
ENDDO.
it_num-value = s_number-high.
append it_num.
clear it_num.
Regards,
GSR.