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: 

ALV Grid OO - What is the Point!?

Former Member
0 Kudos

Howdy,

Why bother with all this OO ALV baloney of creating containers objects blah, blah, blah...

When you can easily just use REUSE* FM !!!!

The effort required to create an OO ALV report versus a FM ALV report, to me, has been significant and I don't see the point of changing to the time consuming, difficult and awkward OO ALV grid method.

WHo agrees with me!

6 REPLIES 6

Former Member
0 Kudos

In case you want to see the selection-criteria and the ALV report in the same screen, how would you approach that problem ?

Are you not comfortable with OO , or are you not comfortable with OO in ALV ?

Regards,

Subramanian V.

VXLozano
Active Contributor
0 Kudos

I don't.

First of all, I'm sure the REUSE function declares and uses OO code.

The most useful point I see in use the OO grid is: to learn OO ABAP. If you are developing in ABAP from more than a month you must be familiar with the alv grid. Learn how to create it through OO will be easier than starting from zero.

Another point is the hendling of methods, and lots of useful features of OO programming... maybe not useful for little projects/reports, and maybe hard to learn or expensive to use, but when the things go bad, a good OO project could be upgraded with no effort, and a "normal" one will become a pain in the... back.

Don't be upset, enjoy your free time (while in work, not in real life) and learn OO ABAP. You will be better at your work.

... and no, I don't receive any payment from SAP 😛

VXLozano
Active Contributor
0 Kudos

"I don't" means "I don't agree with the original poster".

0 Kudos

When I first looked at OO, I said the same thing. I was very close minded. "What's the point!! I can do the same thing in less lines of code!" Well, since messing with ABAP OO and JAVA, I've learned the power of OO programming. It's great and its the future. All future developments will most likly be written in an OO language whether it be ABAP or JAVA. My suggestion is to open up a little and give it a chance. You may begin to appreciate it like i have.

Good Luck,

Rich Heilman

ssimsekler
Active Contributor
0 Kudos

Hi to all

When the number of codes written are compared, the question is fine to ask. However, one should exactly think of the trade-off.

"REUSE" function module uses the well-known ALV grid class inside, the developers of them should have aimed to implement a common-tool for the general use. <i>If your requirement is not so much complicated, you can certainly use it.</i> But,

1. REUSE version displays the grid in full screen. It cannot have more than one <b>instances</b>.

2. The <b>event-handling</b> of REUSE verison is restricted and (at least for me) difficult to implement.

3. As a developer, it is more satisfying to directly use the object itself without wrappers. OO version is exactly more <b>FLEXIBLE</b>.

4. REUSE version prevents you to use the <b>OO context</b> and thus its features

5. It is a question whether SAP will <b>reflect</b> new innovations of ALV grid control to this function module. If yes, how much?

6. For modern(!) screens, we use <b>containers</b> to which the OO version can be linked, but REUSE version can not.

and so on...

*--Serdar

Former Member
0 Kudos

Hi all,

Another important point that should be considered is, when you program a ALV Grid creating instances of CL_GUI_ALV_GRID, you must have a SAPGUI installed on ypur presentation server. When you use 'REUSE_ALV_LIST_DISPLAY', the function module internally calls 'write' commands in the application server, so your application does not dump in a web user interface(REUSE_ALV_GRID_DISPLAY runs also on the presentation server). It is best to have a check with function module 'GUI_IS_AVAILABLE, before you call your screens which has an ALV Grid.

Kind Regards,

Sükrü