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 List by calling SET_TABLE_FOR_FIRST_DISPLAY of CL_GUI_ALV_GRID

Former Member
0 Kudos

Hi All

I want to display the output as a ALV List by calling method SET_TABLE_FOR_FIRST_DISPLAY of CL_GUI_ALV_GRID.

I see there is a protected attribute M_BATCH_MODE. How can I set this attribute to be true.

Or is there any other option through which I can get ALV List Output

Please note that I do not want the grid display

Thanks in advance

Sriram

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Presumably you are creating the grid in a custom container. Put it in a docking container instead.

Rob

8 REPLIES 8

former_member233090
Active Contributor
0 Kudos

Hi Sriram,

Can you be more clear what exactly you want, or what exactly the problem you are Facing?

Bhavana

0 Kudos

Please have a look at program DEMO_ABAP_OBJECTS_SPLIT_SCREEN

When you double click on the connections from the tree structure, it displays a ALV Grid

Instead of Grid I want a list (that which gets displayed in background mode)

Hope its clear

0 Kudos

You want to display ALV list in part of the screen within module pool screen instead of full screen ( not like FM "REUSE_ALV_LIST_DISPLAY" and also not in popup ) ?

I am not sure if it is possible as the list display and the module pool screen are handled by two different WP's.

Edited by: Suman Jagu on Jun 7, 2011 4:04 PM

Former Member
0 Kudos

Presumably you are creating the grid in a custom container. Put it in a docking container instead.

Rob

0 Kudos

Hi All

Appreciate your replies

Let me say more as to what I am doing. Please have a look into DEMO_ABAP_OBJECTS_SPLIT_SCREEN. Where in, there are splitter containers CONTAINER_LEFT and CONTAINER_RIGHT (instances of CL_GUI_SPLITTER_CONTAINER). The ALV I am talking about in this thread is displayed in CONTAINER_RIGHT

Rob, are you sugesting not to use CL_GUI_SPLITTER_CONTAINER and use CL_GUI_DOCKING_CONTAINER or create a docking container object inside CONTAINER_RIGHT? Can you please throw some more light!

Also, one more point i want to stress, I want "ALV List" while running in foreground. I have check out

How do I tell the program to run in background for the purposes of this ALV alone?

Thanks

Sriram

0 Kudos

Hello Sriram,

AFAIK you cannot display a list using CL_GUI_ALV_GRID in online mode. This holds true even if you use a docking container! I've checked it out myself

If you don't have any fascination to use OO approach to display the ALV list you can always use 'REUSE_ALV_LIST_DISPLAY'.

Otherwise you have to use the SALV model & pass LIST_DISPLAY = 'X' to the FACTORY( ) method.

BR,

Suhas

NB: The SALV model calls the function 'REUSE_ALV_LIST_DISPLAY' to display the list as well!

0 Kudos

Try something like:

if cl_gui_alv_grid=>offline( ) is initial.
    if g_custom_container is initial.             " Foreground

      create object g_custom_container
        exporting
          container_name = g_container.

      create object grid1
        exporting
          i_parent = g_custom_container.

      create object r_disp.
      set handler r_disp->disp_code for grid1.

      report_level = 1.
    endif.
  else.                                       " Background

    create object grid1
      exporting
        i_parent = dock1.
  endif.

  call method grid1->set_table_for_first_display
    exporting
      i_structure_name = 'ZZFACPLSUM'
    changing
      it_outtab        = gt_zzfacplsum.

Rob

0 Kudos

Thanks you very much for your inputs.

Conclusion is Cannot display ALV List through OO methodology in Foreground.

Reuse List FM does it on full screen which unfortunately is no-go for me

I dont think there is any way to force/fake the system before you do the table display