2007 Dec 18 6:38 AM
hi experts,
how can i make an ALV double report resizable?
in my program, the output should display 2 ALV reports. these should be resizeable so that if ever no records are displayed in the 1st table, it would not take up a lot of space but instead the 2nd report should take up the space if there are lot of entries in the 2nd report.
please help me on this.
thank you.
hi experts,
how can i make an ALV double report resizable?
in my program, the output should display 2 ALV reports. these should be resizeable so that if ever no records are displayed in the 1st table, it would not take up a lot of space but instead the 2nd report should take up the space if there are lot of entries in the 2nd report.
please help me on this.
thank you.
2007 Dec 18 6:44 AM
hi,
You can resize your alv display by changing the size of the container in the screen. This is applicable only if you are using OOPS ALV (if you are using 'SET_TABLE_FOR_FIRST_DISPLAY').
Thanks,
Kasiraman R
2007 Dec 18 6:46 AM
hello,
yes, i am using 'SET_TABLE_FOR_FIRST_DISPLAY'.
how can i make the output reports resizeable?
2007 Dec 18 7:24 AM
Hi,
I think u can use the option of splitter container(CL_GUI_EASY_SPLITTER_CONTAINER).
Place your ALV grid in the respective parts.Then make use of method SET_SASH of class CL_GUI_EASY_SPLITTER_CONTAINER based on the condition if the table is empty.
Check the Sample code how to create a splitter container :
PBO
IF gp_custom IS INITIAL.
CREATE OBJECT gp_custom
EXPORTING
container_name = 'CUST_LOAN' (Container name)
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc NE 0.
ENDIF.
Create a split container*
CREATE OBJECT gp_split
EXPORTING
parent = gp_custom
orientation = 1
sash_position = 20
with_border = 0
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
Assign the top container & Bottom Container*
gp_contnr_top = gp_split->top_left_container. (1st table reference)
gp_contnr_bot = gp_split->bottom_right_container. (2st table reference)
CREATE OBJECT gp_grid
EXPORTING
i_parent = gp_contnr_top
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc NE 0.
ENDIF.
CREATE OBJECT gp_grid
EXPORTING
i_parent = gp_contnr_bot
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc NE 0.
ENDIF.
Then build your grid.
*Then based on the condition ie) if the table is empty
set it to zero*
CALL METHOD gp_split->set_sash_position
EXPORTING
sash_position = 0 or(give some size)
Hope it works....
Regards,
Krishna
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |