2013 Jun 16 3:35 AM
Dear all,
I want to display oop alv inside a sub screen.
So i have created a main screen and add button to display alv in a sub screen.
In the main screen there is a sub screen area. when user click on button in main screen I'm calling sub screen inside the PBO of main screen
call sub screen sub1 including sy-repid ssnum.
Then inside the PBO of sub screen , I have created a custom container and alv grid..
But its not displaying in the sub screen.. what could be the issue?
Thank you,
Pathum.
2013 Jun 16 8:53 AM
This is the logic that has to be used for inserting an ALV in subscreen. Subscreen has to be defined in the PBO of main screen.
Lets say sub screen number is 200.
"--------------------------------------
"Declarations
data: g_custom_container type ref to cl_gui_custom_container,
g_alv_grid_ref type ref to cl_gui_alv_grid.
"--------------------------------------
"Main screen
"call subscreen in PBO of main screen
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN sub_area INCLUDING sy-repid '0200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN sub_area.
"--------------------------------------
"Subscreen
PROCESS BEFORE OUTPUT.
MODULE PBO_0200.
if g_custom_container is initial.
"create custom container
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'CUSTOM_AREA' "name of container name on screen layout (must be set in SUBSCREEN, not in MAIN SCREEN)
CREATE OBJECT g_alv_grid_ref
EXPORTING
i_parent = g_custom_container.
CALL METHOD g_alv_grid_ref->set_table_for_first_display
....
else.
CALL METHOD g_alv_grid_ref->refresh_table_display.
endif.
ENDMODULE.
Dear all,
I want to display oop alv inside a sub screen.
So i have created a main screen and add button to display alv in a sub screen.
In the main screen there is a sub screen area. when user click on button in main screen I'm calling sub screen inside the PBO of main screen
call sub screen sub1 including sy-repid ssnum.
Then inside the PBO of sub screen , I have created a custom container and alv grid..
But its not displaying in the sub screen.. what could be the issue?
Thank you,
Pathum.
2013 Jun 16 8:53 AM
This is the logic that has to be used for inserting an ALV in subscreen. Subscreen has to be defined in the PBO of main screen.
Lets say sub screen number is 200.
"--------------------------------------
"Declarations
data: g_custom_container type ref to cl_gui_custom_container,
g_alv_grid_ref type ref to cl_gui_alv_grid.
"--------------------------------------
"Main screen
"call subscreen in PBO of main screen
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN sub_area INCLUDING sy-repid '0200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN sub_area.
"--------------------------------------
"Subscreen
PROCESS BEFORE OUTPUT.
MODULE PBO_0200.
if g_custom_container is initial.
"create custom container
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'CUSTOM_AREA' "name of container name on screen layout (must be set in SUBSCREEN, not in MAIN SCREEN)
CREATE OBJECT g_alv_grid_ref
EXPORTING
i_parent = g_custom_container.
CALL METHOD g_alv_grid_ref->set_table_for_first_display
....
else.
CALL METHOD g_alv_grid_ref->refresh_table_display.
endif.
ENDMODULE.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |