Skip to Content
0
Former Member
Apr 27, 2009 at 09:11 AM

Make ALV GRID screen resizable

1818 Views

Hi All,

I have created an object V_MAPBOX using reference to class CL_GUI_DIALOGBOX_CONTAINER.

CREATE OBJECT v_mapbox

EXPORTING

width = 300

height = 130

style = cl_gui_control=>ws_sysmenu

repid = 'ZMAP'

dynnr = '1000'

top = v_top2

left = v_left2

caption = 'Mapping Information'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

event_already_registered = 6

error_regist_event = 7

OTHERS = 8.

Then created an object V_MAPALV with reference to class CL_GUI_ALV_GRID exporting V_MAPBOX.

Finally I am calling the method SET_TABLE_FOR_FIRST_DISPLAY of CL_GUI_ALV_GRID to display the screen on my custom container of screen 1000.

CALL METHOD v_mapalv->set_table_for_first_display

EXPORTING

i_save = 'A'

is_layout = wa_layout

CHANGING

it_outtab = i_map

it_fieldcatalog = i_fieldcat_map

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

IF sy-subrc <> 0.

ENDIF.

The screen is getting displayed as expected. But I require to make this ALV screen to be resizable while it is displayed.

Have tried calling CALL METHOD v_mapbox->resize, before calling the V_MAPALV methods but it does not work.

Need to know how can I make this resizable.