Skip to Content
-1

display only the selected rows in interactive alv

Apr 05 at 01:04 PM

97

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.

0

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.

0

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

0

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.

0

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!

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

3 Answers

Simone Milesi Apr 09 at 07:23 AM
1

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.
Share
10 |10000 characters needed characters left characters exceeded
ROBERTO Forti Santos Apr 05 at 07:10 PM
0

Hi Dyvia,

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

Suggested SAP link below.

https://help.sap.com/doc/erp2005_ehp_06/6.0.6/en-US/4e/b7a512999e0134e10000000a42189b/frameset.htm

Regards,

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?

Regards,

Divya.

0

Why?

Really, didn't you ask why?

0

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

2

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:

https://help.sap.com/http.svc/rc/abapdocu_750_index_htm/7.50/en-US/index.htm

1

Hi Dyvia,

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

Regards,

1
Krishna Murthy Apr 06 at 09:10 AM
-2

hi

i have modified your sample code. see attached file.

demo.txt


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.

3

hi,

i did not developed New, just modified her code.

0