Santhosh,
For add , you can achieve by getting index of the selected elements.
For add all, you can achieve with help of below code snippets,
To get the Filtered values:
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>component usage</b>( ).
catch CX_WDR_RT_EXCEPTION.
endtry.
if not lr_INTERFACECONTROLLER is initial.
l_VALUE = lr_INTERFACECONTROLLER->Get_Ui_Info(
).
endif.
<b>component usage</b> 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.
OR
You can achieve also,By using the class CL_SALV_BS_RESULT_DATA_TABLE which contains the results of the filter in T_RESULT_DATA.
Do reward if its helpful.
Regards
Saravanan