cancel
Showing results for 
Search instead for 
Did you mean: 

how can i display a dialog view centerly?set_window_position has no effect

Former Member
0 Kudos

hi ,all

i try to open a dialog which is a normal view,

here is the code i use,

CALL METHOD cl_wdr_runtime_services=>display_view_in_popup

EXPORTING

component = component

target_view_name = 'V_BP_MAIN'

target_window_name = 'W_BP_MAIN'

  • MODAL = ABAP_TRUE

window_title = ''

close_button = abap_true

IMPORTING

popup_window = popup_window

the first time the window i opened displayed is centered ,but if i open it twice or more

the window is in the left corner of screen,i tried to use popup_window->set_window_position( position = if_wd_window=>CO_CENTER ).but it has no effect at all

can anyone help me out?

thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This really sounds like something you should search the Service Marketplace for a note one or open a support ticket. If the rendering isn't centered or doesn't remember the last location on a second opening; then something sounds wrong with the UR rendering.

Former Member
0 Kudos

thanks anand

seems that this problem can't be that easy to solve,

Former Member
0 Kudos

Hi,

just set the size i.e. height and width of the rootuielementcontainer of the dialog view to make its position in center.

Regards,

anand

Former Member
0 Kudos

thanks for your answer.

I did set the height and width of rootuielementcontainer of the dialog view .i,e,width:1200,height 700,

It display pretty well the first time,but when i open it the second time,the dialog view is not centered,so i can't see the whole dialog view,i have to drag it,