Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
hardyp180
Active Contributor

hardyp180_1-1707358826738.png

 

Dear CL_SALV_TABLE Fans,

Welcome to February 8th, 2024, which is the sixteenth International Editable SALV Day. See below for a link to a blog I wrote to celebrate this day exactly one year ago.

https://community.sap.com/t5/application-development-blog-posts/international-editable-salv-day-2023...

This day marks the 16th 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.

https://community.sap.com/t5/application-development-discussions/cl-salv-table-needs-editable-functi...

Each year it gets more difficult to write this blog because there is never anything new to say.

It is as simple as this.

  • You get asked to write a read-only ALV report.
  • It is faster and simpler to do this using CL_SALV_TABLE than CL_GUI_ALV_GRID because you do not have to mess around with screens and controls and what-not.
  • Indeed, SAP recommend using CL_SALV_TABLE for all new developments of this nature.
  • The report goes live. The users start asking for extra things, as always.
  • They want some custom functions at the top of the screen.
  • They want to be able to change some of the fields and have that replicate to the database.
  • Well, you are right out of luck. You cannot do either with CL_SALV_TABLE.
  • There are workarounds for both, but they are scary, because SAP keeps finding ways to shut those workarounds down, so such an approach is not future proof.
  • The only viable option is to start again, this time using CL_GUI_ALV_GRID.
  • Then the next time you get a request for a “read-only” report the “once bitten twice shy” thing kicks in and you start with CL_GUI_ALV_GRID from the get-go.

I like CL_SALV_TABLE and so do a lot of SAP developers. But everyone likes having the editability feature a lot more. But it’s never going to happen. As has been mentioned you would think that if 100% of your customers want something you might consider giving it to them, but obviously not.

The times they are a’changing

You will notice in both CL_GUI_ALV_GRID and CL_SALV_TABLE the internal table of data passed in is not an IMPORTING parameter but rather a CHANGING parameter. Why might this be?

I think it is because in CL_GUI_ALV_GRID you can actually change the internal table during ALV processing if it has any editable cells. You call CHECK_CHANGED_DATA and the changed values on the screen are updated in the internal table. Later you can loop through the changed internal table and updated the database with the changed values.

If the data table was an IMPORTING parameter, you would get a short dump if you tried to change any of the values.

That explains why the data table is a CHANGING parameter in CL_GUI_ALV_GRID. Even though officially you are not supposed to use this for editing even though things like are a clear indication it was designed with editing in mind.

So why is the data table still a CHANGING parameter in CL_SALV_TABLE when you cannot edit any of the values? I think this is because CL_SALV_TABLE is a wrapper with CL_GUI_ALV_GRID still inside it. This would also imply that making CL_SALV_TABLE editable is not as technically impossible as SAP claims.

OK so what else was happening in 2008?

Movies – The Dark Knight, Slumdog Millionaire, Iron Man

Songs – “Bleeding Love” by Leona Lewis, “I Kissed a Girl” by Katy Perry, “Take a Bow” by Rihanna

New inventions of 2008 include smog-earing cement, high altitude flying windmills, bionic contacts, pig-urine plastic.

Very soon we will get to the stage some people reading this blog will be younger than the age of the request to make the SALV editable. Since the SAP GUI is not going anywhere (evidenced by the huge amount of development money pumped into every year by SAP) it is possible I will die of old age before the request is actioned. I am 55 already.

Nevertheless, I will keep going. Miracles can happen.

Until then the situation is “Oi you 31,000 SAP ERP Customers! You see this? You like this? You want this? Well, you can’t have it!”

hardyp180_0-1707358802351.png

See you next year!

Cheersy Cheers

Paul

3 Comments
Chad_He
Participant

Hey Paul,

As you said in this blog: Editable CL_SALV_TABLE after release 756 
New version of SALV has supported editable in someway. Maybe it's not far away from stopping this event.

PS. That's a shame that new community makes me can't follow you. Maybe someday, sap will add this feature back. 
Chad

JimSpath
Active Contributor
0 Kudos

there is never anything new to say

I think you've proven yourself wrong. But who am I to say?

hardyp180
Active Contributor

To paraphrase Garth Brooks

"one day it had to happen, and then one day it did"

In this case some developer inside SAP locked on to my workaround to make CL_SALV_TABLE editable, the workaround I mention in "ABAP to the Future" and changed the architecture to disable that workaround, same as what happened to Namish Patel and his workaround some years back.

So in ABAP 7.58 my workaround no longer works. SAP blocked it by changing the class that CL_SALV_TABLE inherits from.

If I had to guess I reckon in 7.58 that "easter egg" mentioned in  Editable CL_SALV_TABLE after release 756 has probably been blocked as well.

As I have said many times if the developers in SAP put 1% of the effort into making CL_SALV_TABLE editable as they do in blocking reported workarounds then the problem would have been solved years ago. The "problem" being giving SAP customers what they desire.

Cheersy Cheers

Paul

Labels in this area