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 from selection-screen

Former Member
0 Kudos
467

Hi!

I have a selection screen and i want to output an ALV(objects) without creating a Dynpro, how can i do that in a OO ALV?

Thanks in advance ,

John.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
99

Hi,

For OO ALV, use this:


DATA obj_alv TYPE REF TO cl_gui_alv_grid.

CREATE OBJECT obj_alv
  EXPORTING i_parent = cl_gui_cintainer=>screen0.

Regards

7 REPLIES 7

andreas_mann3
Active Contributor
0 Kudos
99

Hi John,

use fm REUSE_ALV_GRID_DISPLAY

-sample is prg BCALV_TEST_GRID

regards Andreas

0 Kudos
99

Just a pity that the REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY are not released for customer use! (Look at the attributes). (I had SAP tell me this after I reported a problem we had with REUSE_ALV_GRID_DISPLAY).

Former Member
0 Kudos
100

Hi,

For OO ALV, use this:


DATA obj_alv TYPE REF TO cl_gui_alv_grid.

CREATE OBJECT obj_alv
  EXPORTING i_parent = cl_gui_cintainer=>screen0.

Regards

Former Member
0 Kudos
99

John,

I assume you mean you want an ALV grid to appear on your selection-screen. I believe this is not possible.

Alternatively, what you can do is create a normal ABAP screen, with a container for your ALV grid as well as a subscreen. Then you can include your selection-screen in the subscreen, but it has to be defined along the lines of:

SELECTION-SCREEN BEGIN OF SCREEN nnnn AS SUBSCREEN.
...
SELECTION-SCREEN END OF SCREEN nnnn.

Essentially the same result, but in reverse. Of course, you don't get variant support out of the bag, but it can still be done with a bit of effort.

Scott

Former Member
0 Kudos
99

Hi John ,

Tis possible to display ALV in selection screen...Hope this code sample would help you..

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code sample to display and edit data from text file using alv.pdf

Regards

Immanuel

0 Kudos
99

ah, yes. I did overlook the docking container. Technically not part of the selection-screen, but if the result for the user is the same, then why not.

Former Member
0 Kudos
99

Hi John ,

Hope you are done...!!!

How useful was that code sample to you??

Regards

Immanuel