01-08-2007 10:29 AM
I have an output list displayed to screen. I wish to filter the displayed output depending on a set of rules entered by the user.
For example
Person Name date of birth
Smith 1.12.1979
Jones 15.12.1979
Doe 22.6.1980
A user wishes to redisplay the list showing all those born during 1979. Simply re-outputting does not work as the original list still sits below. I somehow need to clear the original list before re-outputting. I know ALV gives me this facility, but in this case ALV is not an option. Any suggestions?
01-08-2007 10:33 AM
hi,
before outputing the new list set the system field sy-listi:
sy-listi = sy-listy - 1.
br
01-08-2007 10:36 AM
Hi
U can insert a filter button, this filter should be a popup showing a ranges (select-options) with all fields you display in the screen.
The ruotine to display the data should be like this:
LOOP AT ITAB WHERE (FILTER).
ENDLOOP.
In this way if the filter isn't setted all data will be printed else only the data in according to the filter.
The routine to be listed the data should be called every times the data are re-displayed.
Max
01-08-2007 10:39 AM
here you have to go for interactive reporting give the hotspot to your date of birth field.
after writing the fields in the basic list use hide itab-dob.
now
at line-selection
data : year(5).
year = itab-dob(4).
concatenate year '%' into year
refresh itab.
select f1 f2 from dbtab into table itab where dob like year.
sy-lsind = 0.
loop at itab.
write : / itab....
endloop.
regards
shiba dutta
01-08-2007 10:52 AM
now, move contents to temp internal table. refresh original internal table. move contents from temp table based on filter.
01-08-2007 11:00 AM
Thanks all,
Shiba, unfortunately my user do not want to use hotspots. However, combining bits of all suggestions has given me the solution I was looking for. Thanks.