Skip to Content
0
Former Member
Apr 21, 2009 at 09:59 AM

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

80 Views

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.