on 01-03-2008 6:34 AM
Hi..
i have a ALV.
1.Apply filter on ALV. Assume i get 15 results.
2.Delete one row. Still i get 15 results.
How to reapply the ALV filter by code.
Thanks
Vimalraj
Hi Vimalraj Madhavan ,
Are u trying to delete record from the records thats are displaying after applying filter?.
if so before deleting from itab you have to find the actual index of the record that corresponds to the itab, and you have to delete from itab based on that index.. the actaul index that corresponds to each record thats currently displayed in the alv is there in one of the itab of the alv parameters.
you can get the details of currently displayed record using
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_alv_invoice( ).
catch CX_WDR_RT_EXCEPTION.
endtry.
if not lr_INTERFACECONTROLLER is initial.
l_VALUE = lr_INTERFACECONTROLLER->Get_Ui_Info(
).
in itab l_value you can check for the index of selected.
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vimalraj,
if thats the case you have to apply filter again, there is no other way, since for the delete button we are manually writiing codes, and the filter option thats a standard button. Filtering is a standard function and the records are displayed based on the index of each record, not on values, thats y after delete the next record will automatically append to the table.ie after filter the system will suppose decided to display record 1, 5 ,6 and when we delete 6th record, seventh record will become the 6th one.
One solution for this is instead of deleting a record you can insert a blank record so that index of the records wont change. but after that you have to do manual coding to hide blank rows from alv.
Regards
Sarath
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.