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

Former Member
0 Likes
3,678

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
Read only

Former Member
0 Likes
2,275

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

They must be same.

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

16 REPLIES 16
Read only

Former Member
0 Likes
2,276

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

They must be same.

Read only

0 Likes
2,275

Hi,

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

Best regards

Lisa M SImonsen

Read only

0 Likes
2,275

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

Read only

Former Member
0 Likes
2,275

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á

Read only

0 Likes
2,275

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

Read only

Former Member
0 Likes
2,275

Hi Lisa,

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

Reward If Useful.

Regards,

Chitra

Read only

0 Likes
2,275

Hi,

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

Best regards

Lisa M SImonsen

Read only

Former Member
0 Likes
2,275

Hi Lisa,

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

and also the GRID FM

Read only

0 Likes
2,275

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

Read only

0 Likes
2,275

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

Read only

0 Likes
2,275

hi

Nope still the same

Read only

0 Likes
2,275

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

Read only

0 Likes
2,275

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

Read only

Former Member
0 Likes
2,275

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.

Read only

0 Likes
2,275

Hi,

Nope still the same

Read only

Former Member
0 Likes
2,275

Read last post from me 😛