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 Problem

Former Member
0 Likes
525

I want to display a list using ALV : CL_GUI_ALV_GRID. I wrote the program by refering to the document "An Easy reference to ALV Grid Control".

I called the method "gr_alvgrid->refresh_table_display"

in the PBO of the screen that I am creating. I havenot created any custom control on the screen graphically. As in the document , I have coded for that using "creat object" statements in the code. The problem is when i execute the code nothing is happening. I get a blank screen without any ALV grid on it.

Can someone please let me know what I m missing upon.

Thanks

Shiv

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
501

Hi

You have to create a custom contronl on your screen by screen painter.

If custom control designed by screen painter is called MY_CONTAINER:

IF CONTAINER IS INITIAL.

CREATE OBJECT CONTAINER

EXPORTING CONTAINER_NAME = 'MY_CONTAINER'.

......

CALL METHOD MY_GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

.....

ELSE.

CALL METHOD MY_GRID->REFRESH_TABLE_DISPLAY.

ENDIF.

Max

Message was edited by: max bianchi

4 REPLIES 4
Read only

Former Member
0 Likes
501

I am sorry, i am using the method

"gr_alvgrid->set_table_for_first_display" if the container has to be created.

Read only

Former Member
0 Likes
502

Hi

You have to create a custom contronl on your screen by screen painter.

If custom control designed by screen painter is called MY_CONTAINER:

IF CONTAINER IS INITIAL.

CREATE OBJECT CONTAINER

EXPORTING CONTAINER_NAME = 'MY_CONTAINER'.

......

CALL METHOD MY_GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

.....

ELSE.

CALL METHOD MY_GRID->REFRESH_TABLE_DISPLAY.

ENDIF.

Max

Message was edited by: max bianchi

Read only

Former Member
0 Likes
501

You must create custom container for getting ALV display.

Read only

Former Member
0 Likes
501

u have to create custom container and call that screen in ur program