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 empty even if table filled

Former Member
0 Kudos

Hi,

Can anyone explain why my ALV grid is not showing the results of the table like it should.

If the table has two lines then i can see the two lines in the grid, but all the elements are empty?

Best regards

Lisa M Simonse

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check whether you gave the same name in program while declaring Grid,and while creating container in Grid.

They must be same.

16 REPLIES 16

Former Member
0 Kudos

Check whether you gave the same name in program while declaring Grid,and while creating container in Grid.

They must be same.

0 Kudos

Hi,

They are the same, so its not there the problem is 😕

Best regards

Lisa M SImonsen

0 Kudos

Hi Lisa ,

Check whether you have used the CAPS for the table Name and the field name in Field catalogue.

Reward if Useful,

Regards,

Chitra

Former Member
0 Kudos

Hi!

Possible solutions:

- Add some columns to the layout.

- Check is the report name given to the parameter I_CALLBACK_PROGRAM. In standard programs after copying, there could remain the original SAP program name

Regards

Tamá

0 Kudos

Hi I am pretty sure that i have changed all the things that has to be change as i have used this ALV grid in our SRM system and it works fine.

But in R/3 i can see grid and the 2 lines and the 5 colums but all the cells are empty, even though the table is full of data.

Best regards

Lisa M Simonsen

Former Member
0 Kudos

Hi Lisa,

Check out the fields in your field Catalog display. There might be a mismatch in that.

Reward If Useful.

Regards,

Chitra

0 Kudos

Hi,

They are the same, so its not there the problem is 😕

Best regards

Lisa M SImonsen

Former Member
0 Kudos

Hi Lisa,

Can you show how you had populated the fieldcatalog,???

and also the GRID FM

0 Kudos

Hi, the code i used in this exsaple is this:

*correct list

IF cor_ccontainer IS INITIAL.

CREATE OBJECT cor_ccontainer

EXPORTING

container_name = CORRECT_GRID.

CREATE OBJECT cor_alvgrid

EXPORTING

i_parent = cor_ccontainer.

CALL METHOD cor_alvgrid->set_table_for_first_display

EXPORTING

i_structure_name = 'ZZMMROSTYPE'

is_layout = it_is_layout

CHANGING

it_outtab = it_mvke.

CALL METHOD cor_alvgrid->refresh_table_display.

ELSE.

CALL METHOD cor_alvgrid->refresh_table_display.

ENDIF.

It is the same as the other program that works in SRM.

Best regards

Lisa M SImonsen

0 Kudos

also give the whole body of internal table,

CALL METHOD cor_alvgrid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZZMMROSTYPE'
is_layout = it_is_layout
CHANGING
it_outtab = it_mvke[].       <---------------------------- give braces

0 Kudos

hi

Nope still the same

0 Kudos

Hi Lisa,

Try to debug and checkout where you are missing the elements..

I hope you had created one screen for that program and created a container on that screen and assigned one name to it and used it in ur program

0 Kudos

Lol i suck...

there was no problem at all...

I just appended empty lines to the table DOH!

I forgot i changed the select sentence to into corresponding fields when using the ALV grid and forgot the elements dont look alike >.<.

Sorry for waisting your time guys.

Best regards

Lisa M Simonsen

Former Member
0 Kudos

Hi Lisa,

Try this and checkout if it works

Changed the IF statements

IF cor_ccontainer IS INITIAL.

CREATE OBJECT cor_ccontainer
EXPORTING
container_name = CORRECT_GRID.

CREATE OBJECT cor_alvgrid
EXPORTING
i_parent = cor_ccontainer.

ENDIF.

CALL METHOD cor_alvgrid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZZMMROSTYPE'
is_layout = it_is_layout
CHANGING
it_outtab = it_mvke.

CALL METHOD cor_alvgrid->refresh_table_display.

0 Kudos

Hi,

Nope still the same

Former Member
0 Kudos

Read last post from me 😛