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 double report

Former Member
0 Likes
490

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.

3 REPLIES 3
Read only

Former Member
0 Likes
472

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

Read only

0 Likes
472

hello,

yes, i am using 'SET_TABLE_FOR_FIRST_DISPLAY'.

how can i make the output reports resizeable?

Read only

0 Likes
472

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