cancel
Showing results for 
Search instead for 
Did you mean: 

How to create popup in ABAP webdynpro.

Former Member
0 Kudos

Hi,

I found lot of examples to create a popup/ model window for java webdynpro.

Could anyone give a pointer to an example which explains how to create popup in ABAP webdynpro??

Kind Regards

Shahul

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shahul,

the documentation about working with dialog boxes will be available on the help portal with the NW2004s SPS7 documentation (starting probably on 11 April 2006).

There are also examples in the system, e.g. take a look at package SWDP_TEST, cómponents WDR_TEST_POPUPS*.

Regards, Heidi

Former Member
0 Kudos

Hi Thomas and Heidi,

Thank a lot for your pointers..

Kind Regards

Shahul

Former Member
0 Kudos

PS: Here's the link to the preliminary documentation:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e242bf5-0901-0010-c99c-83c...

By the way, why didn't you classify your question as a question? There's the checkbox <i>Mark this topic as a question</i>...

Regards, Heidi

Former Member
0 Kudos

Question on Popups - I am trying to create a Popup (using a view I created with component usage of WDR_SELECT_OPTIONS). The view pops up but without the select options fields. When I include this view as part of a WD Application/Window then it works.

I am using the method cl_wdr_runtime_services=>display_view_in_popup (used in the WDA applicaiton WDR_TEST_POPUPS). I tried using the target component usage parameter but does not work.

Thanks

thomas_szcs
Active Contributor
0 Kudos

Hi Venkat,

Please do not use cl_wdr_runtime_services=>display_view_in_popup. Not only this method is deprecated and will cause package errors. Moreover, it will not work for the SelectOptions and other components as well. Please use the create the popup using the WindowManager as described in the documentation. In addition you should create a window in your component and embed the SelectOptions there.

Best regards,

Thomas

Former Member
0 Kudos

Hi Thomas:

It worked fine the 1st time. Second time when the user clicks on the button to open up the popup it dumps.

Here is the code in the action for popup:

data: l_cmp_api type ref to if_wd_Component,

l_window_manager type ref to if_wd_window_manager,

l_api type ref to if_wd_View_controller,

l_text type string_table.

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

if wd_this->m_popup is initial.

wd_this->m_popup = l_window_manager->create_window(

window_name = 'DOCQSOW'

button_kind = if_wd_window=>co_buttons_ok

message_type = if_wd_window=>co_msg_type_none ).

  • component_usage_name = 'DOCQUERY_USAGE_1'

  • ).

l_api = wd_this->wd_get_api( ).

wd_this->m_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_ok

button_text = 'Transfer'

action_name = 'POPUP_CLOSED'

action_view = l_api ) .

wd_this->m_popup->SET_REMOVE_ON_CLOSE( abap_true ).

endif.

wd_this->m_popup->open( ).

Second time when the popup tries to open, I get the following error:

Method: RENDER_WINDOW of program CL_WDR_WINDOW_RENDERER========CP

Method: RENDER_WINDOW of program CL_WDR_CLIENT_SSR=============CP

Method: RENDER_POPUP_WINDOWS of program CL_WDR_CLIENT_SSR=============CP

Method: RENDER_WINDOWS of program CL_WDR_CLIENT_SSR=============CP

Method: IF_WDR_RESPONSE_RENDERER~RENDER_VIEWS of program CL_WDR_CLIENT_SSR=============CP

Method: IF_WDR_RESPONSE_RENDERER~RENDER_USER_INTERFACE_UPDATES of program CL_WDR_CLIENT_SSR=============CP

Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP

Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_SSR=============CP

Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP

Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP

Is there a way to destroy the instance of the m_popup?

Any help is appreciated!

Thanks

thomas_szcs
Active Contributor
0 Kudos

Hi Venkat,

Since you set removeOnClose = true, the popup has been destroyed by the runtime upon closing. Calling wd_this->m_popup->open( ) again operates on a destroyed popup and thus will fail. Just recreate it.

Best regards,

Thomas

Former Member
0 Kudos

Hi Thomas,

Thanks for your help!

I made the popup local within my action and thus it will get recreated everytime the action is triggered.

Also on select options, the popup opens up with the selection screen even if I don't embed the SelectOptions component in the window, but I emebeded it in the view.

I really had to struggle with the dump in selectoptions when the action is triggered the second time and I had to delete the component explicitly with the delete_component method within the hook method WDDOINIT on the popup view.

  • create the used component

l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).

if l_ref_cmp_usage->has_active_component( ) is initial.

l_ref_cmp_usage->create_component( ).

else.

l_ref_cmp_usage->delete_component( ).

l_ref_cmp_usage->create_component( ).

endif.

Thanks a lot for your help!

thomas_szcs
Active Contributor
0 Kudos

Hi Shahul,

You can create a popup in Web Dynpro ABAP by calling method CREATE_POPUP of interface IF_WD_WINDOW_MANAGER. The interface can be obtained by calling WD_GET_API( ) of the ComponentController and then calling method GET_WINDOW_MANAGER at the returned interface.

Best regards,

Thomas