on 09-03-2008 12:37 PM
Hi all,
can someone give me an example how i can get the filter value of my ALV?
Thanks,
Markus
You are going to have to use the ALV Model:
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
There is a method of the model object called GET_FIELDS. This will return a table references to the CL_SALV_WD_FIELD object - one record for each column in the table.
The CL_SALV_WD_FIELD object has a method GET_FILTER_RULES. This method will return a table of object references to object CL_SALV_WD_FILTER_RULE. From this object you can get the OPERATOR, LOW and HIGH value of the filter object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was a great idea,
but its not the best i think.
it is not possible to get simply the ALV as a table.
When i get the operator, low_value and high_value than i must look at the table and find out what i must delete from the table.
i missed i simple function or anyone who give me the ALV in a table with all filtered and sorted table.
I have a table with 40 columns and i must check all of them with the filter that is not so fine.
Best regards,
Markus
there is no easy solution to your problem
the alv does not provide a function to get the filtered values.
but you can do things dynamically.
get your columns collection (it returns you a table with the column names in the alv)
loop over the columns
. for every column get your filtered values like thomas showed
. put them in a structure of your table type (use assign component <name> of structure <struct> into <field> )
loop through your data table.
. loop over the columns
. . get filter value from structure using assign
. . get the value in the row using assign
. . compare values
. . not ok, delete
. . ok, keep
at the end you keep the filtered table.
hope this helps a bit
hi,
Use the component SALV_WD_TABLE as a used component in your component.By default it contains filter,sorter and upload to excel functionalites.
if you have doubts in this please inform me.
Regards,
Ramanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.