Skip to Content

display only the selected rows in interactive alv

Apr 05 at 01:04 PM


avatar image

So I have created an alv with records. My requirement is once I select the record,only those records have to be displayed and edited and get saved. editing and saving part is done. Please help me with displaying only the selected rows. pfa.

zd3.txt (7.6 kB)
10 |10000 characters needed characters left characters exceeded

As interactive ALV does not looks like a optimal solution.

Select the rows and give a pushbutton , when the push button is clicked, you can delete the non selected rows and refresh the ALV. so that you can edit and save afterwards.


And you'd loose the full alv, so you have to retrieve the data again (or use a copy of the original table).
As user, once i update data, i'd love to have the whole picture again, without waiting the report retrieve it once more.


Not retrieving the entire report again, you do refresh the internal table only. not going again though all the logics again


How do you refresh the internal table? Retreiving data again to fill and refresh your internal table, the one you suggested to delete rows from.

This could lead to long waiting time which is a really poor user experience.

The other option is to use a copy of the same table, but, again, you can have an issue with memory if the data is huge.


This can be achievable either way, as you said it totally depends on the situation of the Program and the no. of records it is handling!

Deleting the rows will not take much time and even throwing the data to a temporary table is also okay. but that also depends on the No. of records as you said. it may lead to issues with memory.

It is up to you to optimize the program!

* Please Login or Register to Answer, Follow or Comment.

3 Answers

Simone Milesi Apr 09 at 07:23 AM

Without reading your code, this is how i'd set up my flow:

  1. Retrieve my data and show the alv
  2. Mark interested lines and press a specific button
  3. Editable ALV popup with selected fields
  4. Once the user confirms the changes, i update my initial ALV and refresh it, closing the popup.
10 |10000 characters needed characters left characters exceeded
ROBERTO Forti Santos Apr 05 at 07:10 PM

Hi Dyvia,

I recommend you starting to understand how ALV ABAP OO works.

Suggested SAP link below.


Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi Robin,

Thanks for the link. I am new to abap. And my seniors have suggested to keep the coding not in oo abap for now.

Can you help me with the sample codes plzz?





Really, didn't you ask why?


Probably the "seniors" can't program in OO... ;-)


Your "seniors" have got it very wrong.

Procedural is NOT a stepping stone to OO, it makes it more difficult in my and many others' experience. At some stage you have to un-learn what you think you know and start looking at it from a different angle.

Learn the right way. These guidelines have been published almost ten years ago:


Hi Dyvia,

Move the corresponding record which was changed and saved to another internal table and consider displaying it, ok?


Krishna Murthy Apr 06 at 09:10 AM


i have modified your sample code. see attached file.


demo.txt (6.8 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Do not spoon feed people: you are not helping them at all into growing and understanding how to work and improve.



i did not developed New, just modified her code.