cancel
Showing results for 
Search instead for 
Did you mean: 

how to go back to Main window from pop-up window

Former Member
0 Kudos

Hi Friends,

I have a Create in Main view( of Main window ) which contains a 'create' Button.

When I click Create Button, it should open a Pop-up window, which contains, save and Goback.

and I do not want to default button, so how to back to Main window when i clik 'Goback'.

if you have any code, kindly, provide me.

Regards,

Xavier.P

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi Xavier,

Just add the following code in the ONACTIONGOBACK method

data:
     l_api type ref to if_wd_view_controller,
     l_window_ctlr type ref to if_wd_window_controller,
     l_popup type ref to if_wd_window.
     l_api = wd_this->wd_get_api( ).
     l_window_ctlr = l_api->get_embedding_window_ctlr( ).
     if l_window_ctlr is bound.
     l_popup = l_window_ctlr->get_window( ).
     l_popup->close( 'l_popup' ).
     endif.

This code will close the pop up window, and you'll automatically go to the main view

I hope it helps

Regards

Arjun

Former Member
0 Kudos

Thank you Arjun.

It is working fine.

Regards,

Xavier.p

Former Member
0 Kudos

Hi Xavier,

I am new to webdynpro and u plz guide me . how to create a pop up..for a button

regards,

Savitha

Answers (0)