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: 

Problem related to ALV dispaly

Former Member
0 Kudos
99

Hi Gurus,

Actually i need to display records in ALV and i am using

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

it_fieldcat = lt_fieldcat[]

TABLES

t_outtab = lt_zca_serv_techlog

but since my internal table will be carrying millions of records so it will fail in production.

I am taking all these records from a databas table. Please tell me the solution so that i can display all the records without the table failing.

Regards,

Nikesh Kumar

1 ACCEPTED SOLUTION

rainer_hbenthal
Active Contributor
0 Kudos
58

ALV GRID is for online processes. What sense does it make to show millions of rows?

7 REPLIES 7

rainer_hbenthal
Active Contributor
0 Kudos
59

ALV GRID is for online processes. What sense does it make to show millions of rows?

former_member196079
Active Contributor
0 Kudos
58

Hi....

You can display all record with a WRITE.

But in this case you doesn't have all the functionality af an ALV.

Regards

Marco

UdayS
Participant
0 Kudos
58

Hi,

I guess there should be a option for displaying the no of records in the ALV. So first display the max possible records and when the user clikcs pagedown then fetch the next records and display them.

Former Member
0 Kudos
58

You can add code to allow the ALV to be run in background. That way if you have a background job for your program, your ALV results will be written to the spool in the classic format.

* Grid definitions
DATA: gr_alv      TYPE REF TO cl_gui_alv_grid,
      g_container TYPE REF TO cl_gui_custom_container.

* Background container
DATA: g_dock TYPE REF TO cl_gui_docking_container.     


    IF cl_gui_alv_grid=>offline( ) IS INITIAL.    


* Create custom container instance
      CREATE OBJECT g_container
         EXPORTING
          container_name  = 'G_CONTAINER'.

* Create ALV instance whole screen
      CREATE OBJECT gr_alv
        EXPORTING
          i_parent  = g_container.

ELSE.

* Create ALV instance for totals in background
      CREATE OBJECT gr_alv
        EXPORTING i_parent = g_dock.

    ENDIF.        

* Call grid for first time
    CALL METHOD gr_alv->set_table_for_first_display
      EXPORTING
        is_layout                  = gs_layout
        it_toolbar_excluding = gt_exclude
      CHANGING
        it_outtab            = gt_report
        it_fieldcatalog      = gt_fieldcat
        it_sort                  = gt_sort.

Give it a try,

Regards

Larissa Maryniuk

MariaJoãoRocha
Contributor
0 Kudos
58

Hi,

Why alv grid?

If you need to display all records, can you not show all data at once? Can you use a tree? Excel?

Best regards,

Maria João Rocha

marcela_martinez
Participant
0 Kudos
58

Hi,

Did you try executing it in background, with a job? If it works the solution will be background execution.

I hope it helps ypu.

Regards.

Former Member
0 Kudos
58

Well, one can bet that with "millions" of rows, a user is unlikely to ever get to the bottom, and if we kill a couple of dozen trees and print it out, it'll go into the trash before anyone ever gets to the last page, I bet. Unless you are doing this for some kind of data archive (and copying a file to tape or something would do that), why not suggest to the user that, for this to be useful, it has to have selection parameters that reduce the volume of data to something actually readable or useful?