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

Make ALV GRID screen resizable

Former Member
0 Likes
3,439

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.

Hi Mohaiyuddin,

My custom control screen is fixed and having a horizontal scroll as required. What I need is to make the ALV screens displayed on it to be resizable. As you can see in my question above Screen 1000 is the Screen having the Custom control.

The ALV classes are used to display small screens above it. I want those to be resizable.

5 REPLIES 5
Read only

Former Member
0 Likes
1,620

Hi,

ABAP objects are used to implement the controls in programs.

An SAP Container can contain other controls (for example, SAP ALV Grid Control, Tree Control, SAP Picture Control, SAP Splitter Control, and so on). It administers these controls logically in one collection and provides a physical area for the display.

Every control exists in a container. Since containers are themselves controls, they can be nested within one another. The container becomes the parent of its control. SAP containers are divided into five groups:

SAP custom container: Displays within an area defined in Screen Painter on screens or sub screens.

Class: CL_GUI_CUSTOM_CONTAINER

SAP dialog box container: Displays in a modeless dialog box or as a full screen. Class:

CL_GUI_DIALOGBOX_CONTAINER

SAP docking container: Displays as docked, resizable sub-window with the option of displaying it as a modeless dialog box. Class: CL_GUI_DOCKING_CONTAINER

SAP splitter container: Displays and groups several controls in one area - that is, splits the area into cells Class: CL_GUI_SPLITTER_CONTAINER

SAP easy splitter container: Displays controls in two cells, which the user can resize using a split bar. Class: CL_GUI_EASY_SPLITTER_CONTAINER.

In the control, you can adjust the column width by dragging, or use the 'Optimum width' function to adjust the column width to the data currently displayed. You can also change the column sequence by selecting a column and dragging it to a new position.

Thanks,

Pradeep.

Read only

Former Member
0 Likes
1,620

Double click on your custom control, check if "vertical" and "horizontal" checkbox are ticked in Resizing options and proper values are assigned to Min. lines and Min. column

Regards,

Mohaiyuddin

Read only

0 Likes
1,620

Hi Mohaiyuddin,

My custom control screen is fixed and having a horizontal scroll as required. What I need is to make the ALV screens displayed on it to be resizable. As you can see in my question above Screen 1000 is the Screen having the Custom control.

The ALV classes are used to display small screens above it. I want those to be resizable.

Read only

0 Likes
1,620

Hi Abhishek,

sorry, i didn't read the question carefully.

Is it possible to define 2 custom controls instead of one? You may give it a try if possible.

Regards,

Mohaiyuddin

Read only

0 Likes
1,620

I am having one custom control Screen on which I am calling 3 different ALV screens. To make my question more clear " I want to know how can we increase or decrease the size of an ALV grid output screen, by placing the mouse at the corner of the screen and then dragging it to increase or decrease the size of the current display?".