Skip to Content
author's profile photo Former Member
Former Member

Best ways to implement ALV

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Dec 21, 2017 at 01:24 PM

    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:

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 21, 2017 at 12:07 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 21, 2017 at 02:28 PM

    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)


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.