8. December 2022 International Editable SALV Day

When it comes to SAP-Mentor Paul Hardy, you can be sure that you will read something funny, but even serious – and a little bit more words than usual… And after I have searched for the editable SALV, I found a lot of blogs to that topic. Be prepared…

Background

One of the most used tools in the SAP ecosystem might be the ALV (ALV = SAP List Viewer) . It comes in various disguises:

  • ALV list viewer
  • Hierarchical list viewer
  • ALV-Grid
  • SALV-Model

You can simply display a list calling function module REUSE_ALV_GRID_DISPLAY, using class CL_GUI_ALV_GRID or the SALV-Model CL_SALV_TABLE. The easiest way of using is the SALV-Model, mainly because you can display any internal table without providing a field catalog. But when it comes to develop an editable grid, you will have to use class CL_GUI_ALV_GRID because the SALV-Model does not officially provides an edit functionality. It is something no one ever understood…

Editable SALV

Let’s start from the beginning and with Pauls own words:

This day marks the 9th anniversary of James Hawthorne going cap in hand to SAP and suggesting maybe the CL_SALV_TABLE could be brought up to functional parity with the CL_GUI_ALV_GRID and have an option to be editable.

http://scn.sap.com/thread/733872

Since then Paul relentlessly put his finger in the wound and  published one blog starting from 2015:

Then, on August 1st, 2022, Michaela Horvathova posted the article Editable CL_SALV_TABLE after release 756. I first thought: Yes! Now it will be possible to officially use the edit function on the SALV-Model. But the blog post said something different:

Ever since the CL_SALV_TABLE class was released, one question was ever present – how to make it editable? For years the answer lied in taking advantage of the inheritance of the CL_SALV_TABLE, as presented in this post: http://zevolving.com/2008/12/salv-table-10-editable-salv-model-overcome-the-restriction-of-salv-model/.

I was among those using this method. But then the Release 756 came. And suddenly, all ALVs using it suddenly started reported error after error. I dived in and investigated the issue. To my surprise, I discovered that the very basis of this “edit-hack” was gone. The CL_SALV_TABLE class was no longer in the inheritance tree which enabled it to work!

And so followed combing through the provided interfaces in an effort to find a new way. And lo and behold! A way I indeed found.

Here you can read Pauls latest post about his anger that the SALV is still not officially editable.

Enno Wulff