on 05-20-2009 8:14 AM
Hi There,
I do have a question :
+ How do I get displayed entries - in the case a filter as been filled in ?
+ How do I get selected entries - In case filter has ben filled in ?
Regards
That's my point
I'll check and r..e..w..a..r..d. too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephan,
I think that I have understood what you meant to ask for. Did you want to say like:
1) Suppose ALV is displaying like around 50 rows of data
2) User enters his filter criteria and the ALV now shows around 10 rows of data
You need to get as to what are those 10 rows of data. Am I right? If its the case then please go through this [thread |;where Faaiez has provided a resolution for the same.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not have any problem setting in a filter...
Do question is how do I get values that mathc the filter ?
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try using his second code snippet:
DATA: lr_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
l_VALUE type If_Salv_Wd_Table=>S_Type_Param_Get_Ui_Info.
try.
lr_INTERFACECONTROLLER = wd_This->wd_CpIfc_<b>Alv_Graphics_Data</b>( ).
catch CX_WDR_RT_EXCEPTION.
endtry.
if not lr_INTERFACECONTROLLER is initial.
l_VALUE = lr_INTERFACECONTROLLER->Get_Ui_Info( ).
endif.
Alv_Graphics_Data above must be replaced by the name of your usage component.
L_VALUE-T_DISPLAYED_ELEMENTS contains the index's of all the resultant data of the filter.
Regards,
Uday
Hi Stephan,
Did you get the solution? I tried it out & its working. I have a button in my layout up on pressing which I want to fetch all the rows in my ALV available after filtering. Below is the code in my buttons action handler.
After execution of this snippet I have the rows remaining after filtering in the internal table lt_data.
Regards,
Uday
method ONACTIONFETCH_FILTERED_DATA .
DATA: lr_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
l_VALUE type If_Salv_Wd_Table=>S_Type_Param_Get_Ui_Info.
try.
*** Here my ALV usage name is MY_ALV_USAGE
lr_INTERFACECONTROLLER = wd_This->wd_CpIfc_MY_ALV_USAGE( ).
catch CX_WDR_RT_EXCEPTION.
endtry.
if not lr_INTERFACECONTROLLER is initial.
l_VALUE = lr_INTERFACECONTROLLER->Get_Ui_Info( ).
endif.
data: wd_node type ref to if_wd_context_node,
lt_data type wd_this->elements_mara,
wa_data type wd_this->element_mara,
lv_count type i.
wd_node = wd_context->get_child_node( name = 'MARA' ).
*** Get the total number of rows remaining after filtering
describe table l_value-t_displayed_elements lines lv_count.
do.
*** Get the row number of the filtered row in the entire tables data
read table l_value-t_displayed_elements into lv_count index sy-index.
if sy-subrc = 0.
*** Fetch the row data using the index obtained in the above step
wd_node->get_static_attributes( exporting index = lv_count
importing static_attributes = wa_data ).
append wa_data to lt_data.
else.
exit.
endif.
enddo.
endmethod.
Hi Stephan,
I didnt quite get as to what you wanted to ask. Did you mean to say like you want the possible list of values being displayed as the user types in the filter field? I have sent you a document on how you can implement filter in ALV.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.