‎2006 Jun 27 8:52 AM
Hello,
in SAP help the following is described:
The SAP Dialog Box container allows you to display controls in an amodal dialog box or fullscreen.
Class: CL_GUI_DIALOGBOX_CONTAINER
Everytime I use the dialogbox container it will create an amodal window. What I have to do to create the container as fullscreen? Any ideas?
Thanks, Kay
‎2006 Jun 27 9:02 AM
Hi,
1. You can increase the height and width of the container in the constructur, however if you don't know the same for the screen.
2. Else, you use a custom control on the screen, and show the screen.
There is no way setting automatically to occupy the entire screen.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 Jun 27 9:25 AM
Hi Ravi,
this is not what I want:
In the first way by giving height and width values a separate window will be created but not a fullscreen in the actual dynpro.
In the second way there is the problem that you don't know the size of the actual screen. But the size of the custom control is fix.
Fullscreen means for me there is one SAPGUI window and the control is shown in the whole dynpro. If SAPGUI window is resized the control is resized, too. By the way there are no scrollbars. Only GUI controls they are placed in the fullscreen container should have scrollbars if neccessary.
One posibility is to use the CL_GUI_DOCKING_CONTAINER with extension value = 10000. This creates a fullscreen. But the description of CL_GUI_DIALOGBOX_CONTAINER says the same: fullscreen mode is possible. But how it is? That's the question.
Regards,
Kay
‎2006 Jun 27 9:30 AM
Kay,
There is way to make sure the container occupies the entire space available for it. So, if there is less or more space the container is automatically adjusted to occupy that.
What you need to do for that is place the customer control on the screen and drag it to the maximum both width wise and height wise. Double click on it and in the attributes, In that check the check box at the bottom of the attributes screen and give minimum numbers in the horizontal and vertical items there.
This will automatically shrink / expand the control according to the size of the screen.
Regards,
Ravi
Note : Please mark all the helpful answers and close the thread if the issue is resolved.
‎2006 Jun 27 9:39 AM
Hi Ravi,
thats right. But what you will get is a large screen with scrollbars. If the GUI control which is linked to the container is smaller then the screen the scrollbars are also there.
Pls try using CL_GUI_DOCKING_CONTAINER like
create object gv_dock_cont
exporting
extension = 10000.
This will create a resizable fullscreen as I mean.
And I'm looking for the same behaviour with CL_GUI_DIALOGBOX_CONTAINER.
Regards, Kay
‎2006 Jun 27 9:13 AM
Hi,
REPORT ztest .
DATA: it001w TYPE TABLE OF t001w WITH HEADER LINE.
DATA: dialog_box TYPE REF TO cl_gui_dialogbox_container,
alv_bottom TYPE REF TO cl_gui_alv_grid,
alv_right TYPE REF TO cl_gui_alv_grid,
repid TYPE syrepid.
PARAMETERS: p_check TYPE c.
AT SELECTION-SCREEN OUTPUT.
SELECT *
INTO CORRESPONDING FIELDS OF
TABLE it001w
FROM t001w.
CREATE OBJECT dialog_box
EXPORTING width = 700
height = 300.
CREATE OBJECT alv_right
EXPORTING
i_parent = dialog_box.
CALL METHOD alv_right->set_table_for_first_display
EXPORTING
i_structure_name = 'T001W'
CHANGING
it_outtab = it001w[].this is calling as dialog box. but if you want it to be a full screen then you have to create a screen in that you to place the container and set the attributes height/width to make it a full screen.
and use that screen/container to place your controls.
Regards
vijay
‎2006 Jun 27 9:32 AM
Hi Vijay,
thanks for the source code. But if I use values for height and width a new window is created, too.
Fullscreen means in my opinion that the container is shown in the actual or given dynpro; not in font of the dynpro.
Maybe my understanding of "fullscreen" is wrong?
Regards,
Kay
‎2006 Jun 27 9:42 AM
Hi Kay,
sorry no time to try: When creating the object, pass parameter Style = cl_gui_control=>WS_MAXIMIZEBOX.
Hope it helps,
Clemens
‎2006 Jun 27 10:11 AM
Hi Clemens,
nice to hear from you. How is life
cl_gui_control=>WS_MAXIMIZEBOX means the box beside the close box is visible and can be used. But the container is in a separate window, too.
I think I have to use the docking container for fullscreen functionality again. Maybe I also missunderstood the SAP help describtion.
Regards,
Kay
‎2006 Jun 27 11:56 AM
Hi Kay,
all the best ;-)...
I don't know what you really want to do, but keep in mind that the dialogbox may look similar to a windows object, but it is SAP.
Even if you set the dialogbox to fullscreen using the mouse, you can still resize it - which is not possible for a standard windows window.
Still you can try to play around with method SET_ALIGNMENT. I just did in SE80 test environment and by consecutive calls to SET_ALIGNMENT with alignments bottom, top, left,... I could get quite a big box.
Thnak you also for the info about WS_MAXIMIZEBOX - but as you see the function of maximizing a dialog box is not the same as in windows. If necessary, must CALL SCREEN.
Regards,
Clemens
‎2010 Dec 13 5:50 PM
Hello,
I wanted the same .
With this coding I am content - perhaps it helps you.
Greetings Martin
data go_dialog type ref to cl_gui_dialogbox_container.
....
data lv_alignment type i.
lv_alignment = cl_gui_control=>align_at_left +
cl_gui_control=>align_at_right +
cl_gui_control=>align_at_top ."+
cl_gui_control=>align_at_bottom.
call method go_dialog->set_alignment
exporting
alignment = lv_alignment
exceptions
cntl_error = 1
cntl_system_error = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
‎2019 Jul 18 9:12 AM
Thanks, this code works perfect for maximize the window:
data lv_alignment type i.
lv_alignment = cl_gui_control=>align_at_left + l_gui_control=>align_at_right + cl_gui_control=>align_at_top + cl_gui_control=>align_at_bottom.
call method go_dialog->set_alignment exporting alignment = lv_alignment.
‎2010 Dec 13 7:20 PM
Hi Kay,
if you want full screen, use a docking container with full extension.
Although the documentation says so, I think you can only extend the dialog box control to full screen - hiding the screen where it is created.
Regards,
Clemens
‎2010 Dec 13 7:26 PM