10-28-2010 10:24 AM
Hi Gurus,
I need to diaply two alv grid on the ouput screen,
For that i have searched the forum and come to know thats how i can develop the same In module pool screen
But i am not able to find that how i can do the same in the a SIMPLE report. (which is not a module pool report.)
Kindly explain me the prrocess of the same.
many thanks
Anuj.
10-28-2010 10:41 AM
Hi,
1) You need to define a screen in the report program.
2) call screen <screen no>
3) In PBO of the screen you need to add code to call a container and display an ALV output in the container.
4) In PAI of the screen, you can add the code to BACK./EXIT based on OK_CODE
Note: Create a custom screen in SE51 and define a container(In your case two containers)
Create/instantiate a container object from your report program using the below class-method
* Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container.
* Create objects
IF go_custom_container IS INITIAL.
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
* Load data into the grid and display them
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = '<Tablename>'
CHANGING it_outtab = <Output internal table>.
Hope this helps
Regards
Shiva
10-28-2010 10:31 AM
10-28-2010 10:32 AM
Read the Weblog by Uwe [Against All Odds - Programming of Communicating (S)ALV Grid Controls|/people/uwe.schieferstein/blog/2010/10/12/against-all-odds--programming-of-communicating-salv-grid-controls].
10-28-2010 10:39 AM
Hi
simple report not for Module pool.
kindly help me how to go for two alv in SIMPLE REPORT.
many thanks,
anuj.
10-28-2010 10:41 AM
Hi,
1) You need to define a screen in the report program.
2) call screen <screen no>
3) In PBO of the screen you need to add code to call a container and display an ALV output in the container.
4) In PAI of the screen, you can add the code to BACK./EXIT based on OK_CODE
Note: Create a custom screen in SE51 and define a container(In your case two containers)
Create/instantiate a container object from your report program using the below class-method
* Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container.
* Create objects
IF go_custom_container IS INITIAL.
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
* Load data into the grid and display them
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = '<Tablename>'
CHANGING it_outtab = <Output internal table>.
Hope this helps
Regards
Shiva