cancel
Showing results for 
Search instead for 
Did you mean: 

How to Set the Sizes of the POP-UP View

Former Member
0 Kudos

Hi Friends,

I have a POP-UP view which displays the Data in a Table.

I would Like to set sthe sizes of the POP-UP( Like : Heigh width etc.).

Kindly,Provide me some inputs, or sample code in doing this requirement.

Regards,

Xavier.P

Accepted Solutions (1)

Accepted Solutions (1)

yesrajkumar
Active Participant
0 Kudos

data: lo_component_api type ref to if_wd_component,

lo_window_manager type ref to if_wd_window_manager,

lo_popup_window type ref to if_wd_window,

lv_otr type string.

" get window-manager by api

lo_component_api = wd_this->wd_get_api( ).

lo_window_manager = lo_component_api->get_window_manager( ).

lv_otr = cl_wd_utilities=>get_otr_text_by_alias( alias = 'ZRAJ' ).

lo_popup_window = lo_window_manager->create_window(

  • your window name

window_name = 'VC_ADD_DATES_WIN'

title = lv_otr

close_in_any_case = abap_false " cancel action in entertainment_view

close_button = abap_true

default_button = if_wd_window=>co_button_ok " Subscribe OK in entertainment_view

button_kind = if_wd_window=>co_buttons_okcancel

).

*Set the height and width here

lo_popup_window->set_window_size( width = '1000' height = '800' ).

lo_popup_window->set_remove_on_close( abap_true ).

lo_popup_window->open( ).

Former Member
0 Kudos

Thank you Raj.

It is working Fine.

Regards,

Xavier.P

arjun_thakur
Active Contributor
0 Kudos

Hi Xavier,

I need some info regarding the code provided by Raj. Is that code really working fine?? Because I have seen many post on SDN which says that 'set_window_size' is not effective. I have referred the SAP note 1003826 which states the same. I want to know have to make any modification in code if made it work? Please share.

Regards

Arjun

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ...

You can not set the size of POP UP window....

If You can change the height and width of View which you have embedded in the pop up window then it can help you upto some extent.

Regards,

Rohit

arjun_thakur
Active Contributor
0 Kudos

Hi Xavier,

Just set the height and width of the ROOTUIELEMENTCONTAINER of your pop view. This will solve your problem.

Regards

Arjun