on 04-01-2010 10:21 AM
hello,
i have a little wd component. one view includes an alv. this alv has a dynamic title, which displays the number of selected records. as example the select received 1000 records, the title will display this value. if you use the filter function, you could change the visible data records. as example after using the filter there are only 500 records left. my data table but has still 1000 records, the title diaplays 100 records. on which place the runtime environment storages the actual data (500 records) and how can i get access?
could anyone help please.
regards
stefan
Hi,
it can achieved by following this: you might find that i answer before that how to get the filter value....so building on the same we can get the number of rows after filtering....
follow this thread: which i wrote before...
and add the following code at the end...right before the "ENDIF"
data counter type i.
data lt_rows type IF_SALV_BS=>T_TYPE_ROW.
data lt_row_outside type IF_SALV_BS=>T_TYPE_ROW.
DATA lo_nd_flight_list_1 TYPE REF TO if_wd_context_node.
DATA lt_flight_list_1 TYPE wd_this->elements_flight_list_1.
* navigate from <CONTEXT> to <FLIGHT_LIST_1> via lead selection
lo_nd_flight_list_1 = wd_context->path_get_node( path = `CHANGING.FLIGHT_LIST_1` ).
lo_nd_flight_list_1->get_static_attributes_table( IMPORTING table = lt_flight_list_1 ).
cl_salv_wd_filter=>execute(
exporting
t_input = lt_flight_list_1
t_fields = l_value->if_salv_wd_field_settings~t_fields
r_config_model = l_value
changing
t_rows = lt_rows
t_row_outside = lt_row_outside
exceptions
no_filter_rules = 1 ).
lt_rows will have the value you are looking for....
Thanks...
AS....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA: lo_value_res TYPE REF TO cl_salv_wd_config_table,
CALL METHOD lo_value_res->if_salv_wd_std_functions~set_count_records_allowed
EXPORTING
value = abap_true.
CALL METHOD lo_value_res->if_salv_wd_field_settings~set_count_records_enabled
EXPORTING
value = abap_true.
That's it.. Above two method call will solves your problem. Count functionality comes automatically in calculation tab in settings. ALV will do rest of the operations automatically.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.