International Editable SALV Day 2016 – Year Eight
Dear CL_SALV_TABLE Fans,
Welcome to February 8th, 2016 which is the eighth International Editable SALV Day. See below for a link to a blog I wrote to celebrate this day exactly one year ago:-
As you may know back in the year 2000 we were all encourage to “enjoy” SAP and the good old CL_GUI_ALV_GRID came along to replace function module REUSE_ALV_DISPLAY_GRID.
This was nice and object orientated, which we all love. ABAP People love OO programming so much that sixteen years on, some have even started to use it!
Anyway, what we liked about the CL_GUI_ALV_GRID was the fact that you could make some of the columns, or even individual cells, editable. This is what the end users were crying out for. SAP itself made a big song and dance about having a convergence between analytical applications and transactional applications.
That is, a business user did not just stare at the data and admire it, but could actually take action on the data they were looking at e.g. remove a billing block, or adjust the price.
Thus began a golden age. All the peoples of the world forgot their differences and at long last there was world peace, an end to sickness and suffering, and an increase in the average human lifespan to 206 years. As Rufus said “bowling averages were way up, mini-golf scores were way down”.
Then, a great disaster befell the universe. With the advent of 7.20 a new monster was created by SAP, named CL_SALV_TABLE and we were all told to bow down and worship this new beast.
It fooled us all with its sweet promises of dynamically generating the field catalogue based on an internal table, and we fell for it, writing many reports using this new class, and converting many an old report to use this bright new technology.
We laughed and sang and thought how wonderful we were. But as always, pride comes before a fall.
One day the business users came to us and said “what we most desire in the world is to have this or that column editable, and maybe a few cells here and there, based on certain logic”. They then stood there looking at us expectantly; after all we had always been able to do it before. Alas, lack – now we could not! We had been cast out of Heaven!
How could SAP play such a cruel trick on us? Pretending a new technology was superior in every way to the last, and not mentioning a whacking great hole in the middle. This was all the more annoying since CL_SALV_TABLE is nothing more than a wrapper around CL_GUI_ALV_GRID, adding some features, and clearly subtracting others.
For many years the sky turned black, and a plague of frogs rained down upon the SAP developer community. Then several programmers took a leaf out of Twisted Sister’s book and declared “we’re not going to take this, we’re not going to take this, and we’re not going to take this, any more”.
Here is the article that started the rebellion, written by Naimesh Patel
Since that point many people have joined the crusade, including my good self. There have been many approaches created as to how to get around this, get the benefits of the SALV and also make it editable. Here is the latest blog I wrote on the subject, building on the work of the others who went before me:-
Of course the best way around this problem would be for the powers that be at SAP to recognise that every single one of their customers desires this functionality. I wonder how far SAP would have got if they had said “we have embraced the internet age, with a wonderful suite of new UI5 apps. All of them will be read-only”.
This day marks the 8th anniversary of James Hawthorne going cap in hand to SAP and suggesting maybe the SALV could be brought up to parity with the CL_GUI_ALV_GRID and have an option to be editable.
SAP did in fact respond to this request. They said it was impossible, and just laughed and laughed and laughed. They are still laughing to this day, fit to burst. No-one in all eternity has ever laughed so loud and so long, with the exception of Jock McLaughing, the Laughing Scotsman, winner of the All Scotland Laughing Competition 2015.
We have to face the cold hard truth. It is never going to change. We have proved it is technically possible, not even that difficult, but all the powers that be do is look at our workarounds and then try to close them down.
Currently, the way around this problem is to:-
(a) Use CL_GUI_ALV_GRID
(b) Use one of the many workarounds you can find on the SCN as to how to make the CL_SALV_TABLE editable, though this is of course naughty
(c) Take a hybrid approach. Use the CL_SALV_TABLE to generate the field catalogue dynamically, and then pass that field catalogue into CL_GUI_ALV_GRID. There have been some articles on the SCN about that also.
Here is an example of such an approach by Łukasz Pęgiel :-
In conclusion, next year I will be publishing a blog celebrating the 9th annual International Editable SALV Day. See you then!