Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Best ways to implement ALV

Former Member
0 Kudos

Hello experts,

I just want to know which are the best ways to implement a ALV in ABAP language (take into account the performance, flexibilitiy ....)

Right now I have used three different methods for doing it which are:

- Using class CL_SALV_TABLE, I have seen that it is pretty easy to implement with very few lines of code but that it has less power to control events that CL_GUI_ALV_GRID and also the perfomance is worse than CL_GUI_ALV_GRID.

- Using class CL_GUI_ALV_GRID, I have seen that it is so powerful but it is a bit tedious as you have to create a screen and status pf, PBO, PAI...

- Using FM reuse_alv_grid_display, I have read that it is obsolete and better not to use anymore (do you know the "WHY"?).

So... are there more options?

Thanks in advance,

Pablo del Pino

1 ACCEPTED SOLUTION

pokrakam
Active Contributor

FM is obsolete because FMs are obsolete, simple as that. It uses old ABAP constructs, and difficult to work with is an understatement.

ALV GRID is also obsolete as it is strongly tied to the GUI and probably a few other reasons I haven't bothered to research. I don't know what event handling you are missing? Every scenario I've needed has been doable with SALV, my only gripe is the lack of editing facilities in the SAPGUI frontend.

It helps to take a proper MVC approach. Another plus of SALV is that it has a Web Dynpro counterpart so ALVs can be ported with a few modifications. WDA SALV is the 'most recommended' ALV approach, and allows editing.

As far as performance goes, I have never tested this. But if you are on a 7.4 or newer release, there are also the SALV*IDA classes, which work a differently and can have enormous performance benefits over almost anything else. Search the docs on ALV Integrated Data Access for more info.

Edit: SAP pretty much state the same as I just did in the doco regarding ALV Grid controls:

https://help.sap.com/saphelp_nw74/helpdata/en/4e/b7a512999e0134e10000000a42189b/frameset.htm

5 REPLIES 5

Former Member

I pick CL_SALV_TABLE for simple requirements, and CL_GUI_ALV_GRID for more detailed scenarios

pokrakam
Active Contributor

FM is obsolete because FMs are obsolete, simple as that. It uses old ABAP constructs, and difficult to work with is an understatement.

ALV GRID is also obsolete as it is strongly tied to the GUI and probably a few other reasons I haven't bothered to research. I don't know what event handling you are missing? Every scenario I've needed has been doable with SALV, my only gripe is the lack of editing facilities in the SAPGUI frontend.

It helps to take a proper MVC approach. Another plus of SALV is that it has a Web Dynpro counterpart so ALVs can be ported with a few modifications. WDA SALV is the 'most recommended' ALV approach, and allows editing.

As far as performance goes, I have never tested this. But if you are on a 7.4 or newer release, there are also the SALV*IDA classes, which work a differently and can have enormous performance benefits over almost anything else. Search the docs on ALV Integrated Data Access for more info.

Edit: SAP pretty much state the same as I just did in the doco regarding ALV Grid controls:

https://help.sap.com/saphelp_nw74/helpdata/en/4e/b7a512999e0134e10000000a42189b/frameset.htm

Former Member
0 Kudos

Thanks a lot 🙂

JohnPaulLiberal
Explorer

Hello Pablo,

From my personal point of view:

FM is obsolete because it's a old Wrapper for class CL_GUI_ALV_GRID. I think it was done to simplify the build of reports usign non OO programming aproach.

Class CL_SALV_TABLE was the newest one but its scope is for read only reports. Despite the fact it can be "hacked" to accept input data. This class is by far the easyest of them all.

Class CL_GUI_ALV_GRID is the powerfull one, can be used for all scenarios.

A personal recomendation is to use a MVC Classic dynpro approach: a FM to encapsulate the view (FM, because in ABAP OO programing you can not encapsulate Dynpros in Classes, just Programs and FM's)

Regards,

0 Kudos

Thank you 🙂