cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a view as a pop up of same window from another window..?

Former Member
0 Kudos

Hi,

  I wish to call a view as a popup from another view of the same window,which has a input field in it.

  Is it possible to call like that..?

  If so Please suggest..

Regards,

SreeKanth Seelam

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member210804
Active Participant
0 Kudos

Hi SreeKanth,

We cannot call a view as a popup from another view of the same window. We can only call a popup if we have another window. and we can instantiate through if_wd_window_manager interface.

Best regards,

Narasimha.

Abhinav_Sharma
Contributor
0 Kudos

Hi,

It is not possible as the same window can not be instantiated twice at the same time in same component. However, you can create another window and embed the view that you want to display as popup.

Regards

Abhinav

Former Member
0 Kudos

Hi Abhinav,

  But my doubt is, SAP conventional popup which asks confirmations, is using the same window to populate, similar to that why don't we display a view like that?

Regards,

SreeKanth Seelam

Abhinav_Sharma
Contributor
0 Kudos

Hi Sreekanth,

If you want to open confirmation dialog boxes, then we dont need to pass any window name. You will just pass the text and the buttons that you want to display. However, displaying the same window as popup means you are intializing the same window controller again, now there are two window controller object at the same time which is the violation of the WD framework, thats whay you get the error.

Thats the main reason if we can to display a popup window with embedded view, we create another window controller.

Hope this helps.

Regards

Abhinav

Former Member
0 Kudos

Hi Sreekanth,

You would like to create a popup window from within Web Dynpro Abap. You posted your question in Web Dynpro Java forum regardless I'll try to answer your question.

You have to have a view assigned to separate window and from within any view you can create a window by way of window manager and show it as popup.

In Web Dynpro Java you need not to assign view to window and you can open it up directly but within web dynpro Abap you cannot.

Steps to Open pop up window is:

1) Get Component controller's api

2) Throuh component controller get window manager.

3) Create window through window manager and assign necessary window name and title ( window name should be the window you created having view )

The Code for above is:

DATA LO_WINDOW TYPE REF TO IF_WD_WINDOW.
   DATA LO_WINDOWS_MGR TYPE REF TO IF_WD_WINDOW_MANAGER.
   DATA LO_COMP_API TYPE REF TO IF_WD_COMPONENT.
   DATA LO_VIEW_API TYPE REF TO IF_WD_VIEW_CONTROLLER.

   LO_COMP_API = WD_COMP_CONTROLLER->WD_GET_API( ).
   LO_VIEW_API = WD_THIS->WD_GET_API( ).

   LO_WINDOWS_MGR = LO_COMP_API->GET_WINDOW_MANAGER( ).

   LO_WINDOW = LO_WINDOWS_MGR->CREATE_WINDOW( WINDOW_NAME = 'W_POPUP' TITLE = 'TESTWIN' BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_YESNO ).

   LO_WINDOW->OPEN( ).

Assign Points if helpful

Thanks