Application Development and Automation 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: 
Read only

ALV grid memory requirements

matthias_becker3
Discoverer
0 Likes
2,025

Hey guys,

I want to display about 30000 lines with about 100 columns in ALV grid. I'm using method set_table_for_first_display. When I call the method my memory reqiurements raises up to 700MB. When I load same tabel in SE16N memory reuirements only raise to 100MB. What can I do to save memeory?

regards

matthias

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
1,415

Hi Matthias,

in debug mode (old debbuger), go in the menu GOTO --> Status display --> Memory consumption

select the second tab : Memory used - ranked list

maybe you will find information about witch object take the more space memory

regards

Fred

6 REPLIES 6
Read only

FredericGirod
Active Contributor
0 Likes
1,416

Hi Matthias,

in debug mode (old debbuger), go in the menu GOTO --> Status display --> Memory consumption

select the second tab : Memory used - ranked list

maybe you will find information about witch object take the more space memory

regards

Fred

Read only

0 Likes
1,415

Hey Frédéric,

I debugged the proram like you supposed.

Rankinglist shows that class CL_GUI_ALV_GRID uses 700MB in object and 699MB in internal table as well. The internal table, which holds data for it_outtab uses "only" 40MB.

Is there any possibility to reduce memory requirement for CL_GUI_ALV_GRID?

regards

matthias

Read only

0 Likes
1,415

I think you have your answer in the debugging

When you debug SE16 you see SAP used the FM : REUSE_ALV_GRID_DISPLAY

Maybe change your program and use this function instead of the Oo method.

Regards

Fred

Read only

0 Likes
1,415

Hey,

thanks for your suppose. Using the FM REUSE_ALV_GRID_DISPLAY reduces memory rquirement to <100MB.

Don't knwo why OO CL_GUI_ALV_GRID needs about  eightfold of memory than the FM... So I'll use the FM instead of OO. Back to the roots.

thanks

Read only

Former Member
0 Likes
1,415

Hello Matthias,

Try to run the program in background by scheduling a job in SM36 and since you are using OOALV then you need to do some more coding in PBO.

* ALV Grid

DATA: R_GRID TYPE REF TO CL_GUI_ALV_GRID.

DATA: R_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER.

DATA: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.

* Check whether the program is run in batch or foreground

    IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.

* Run in foreground

      CREATE OBJECT R_CONTROL

             EXPORTING CONTAINER_NAME = 'CONTAINER_1'.

      CREATE OBJECT R_GRID

             EXPORTING I_PARENT = R_CONTROL.

    ELSE.

* Run in background

      CREATE OBJECT R_GRID

             EXPORTING I_PARENT = G_DOCK.

    ENDIF.

Best Regards,

Rahul Gupta

Read only

Former Member
0 Likes
1,415

HI,

Please release the memory of the other internal tables except your final table after having all the required values in your final table.

by using 'FREE' Keyword. This will reduce your memory storage against the program.

or use field symbles while coading.

Regards,

Ravi Pratap Singh