cancel
Showing results for 
Search instead for 
Did you mean: 

Call a WD component from an other WD component as a popup

Former Member
0 Kudos

Hello all,

I created a WD component_1, and i want to call this from another WD component_2, untill now, everything is working fine, but i want it as popup and not as window !!

or, is it possible to call a popup from another WD Comp?

or, is it possible to call a popup from another WD Comp, and in the same time close(or without letting) the main Window of the second WD Comp without closing the pupup?

how can I do this please?

thank you all

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It is possible.

Use the code wizard there is a option to generate popup with component usage and window in that used component.

This will generate a code for you.

Former Member
0 Kudos

hello,

thanks for your replay. but i think you didnt understand what i mean,

i want call a popup of the WD Comp_1 from WD Comp_2, so not within the same WD Component !!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Here is a screen shot of the wizard that was mentioned:

http://www.flickr.com/photos/tjung/5712955028/in/photostream

I do believe this was not one of the original wizards. So if you are on an older support package level of 7.0, you might not have this wizard.

Like all the wizards, the code can be written manually as well. Here is the source code for doing this:

DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component  TYPE REF TO if_wd_component.
DATA lo_window         TYPE REF TO if_wd_window.

lo_api_component  = wd_this->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window         = lo_window_manager->create_window_for_cmp_usage(
                   interface_view_name    = 'TABLE'
                   component_usage_name   = 'ALV'
*                  title                  =
*                  close_in_any_case      = abap_true
                   message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                   ).

lo_window->open( ).

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> i want call a popup of the WD Comp_1 from WD Comp_2, so not within the same WD Component !!

What do you mean by this? I don't understand what you mean by "not within the same WD Component". The code/wizard above will open a component usage within a dialog popup.

Former Member
0 Kudos

i will give more explaination,

i created WD application (component_1) .

and i 've created another WD application (component_2) .

now while clicking on a button on the V_MAIN of the Component_1, should call a popup from the WD Component_2,

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

So you have two separate applications running in different browser windows and you want to trigger an event in one from the other? If so, that isn't possible under normal circumstances. There is no client side or server side connection between these two windows. On the server side they would be running in different user sessions - perhaps even on different application servers.

The only possibility here is if you run both applications within the same Portal Page in the NetWeaver Portal or NetWeaver Business Client. You could then use Portal Eventing to communication between them.

Former Member
0 Kudos

it's working as a window but noe as a popup !!

i used for this the method ;

CALL METHOD LO_WIN_MAIN->CREATE_EXTERNAL_WINDOW

EXPORTING

URL = L_URL

RECEIVING

WINDOW = l_popup_window

what i am looking for, is to get the called window as a popup and not as window.

if this possible, then it's nice, if not !?

is it possible to call a popup in that called window, without letting the Main window be opned in fronend?

i did it, but the issue is that i get both , the popup and the main window.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>what i am looking for, is to get the called window as a popup and not as window

I'm really confused because that is exactly the code that we gave you - to open a component usage as a Popup. Are you saying that what you want to open as a popup is not the second component, but instead some isolated content within that component? You always have to work via a component usage. However when you call the popup, you can specify the Window of the component usage you want to open. So if there is a particluar window within the 2nd component usage, then yes you can specify that. Otherwise I'm afraid that I still have no idea what you are asking for.

Former Member
0 Kudos

to make it easy,

we have a window and a button inside,

this button call a popup.

so after clicking on this button, a popup will be called and will appear over the MAIN Window.

is it possible to close the main window without closing the popup?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> is it possible to close the main window without closing the popup?

No. The popup windows are just floating iFrames within the same HTML canvas area of the main browser window. To the Browser they aren't separate windows at all. Nor to the server side are they separate user sessions. The popup in Web Dynpro is complete dependent upon its parent window for its lifetime and rendering.

Former Member
0 Kudos

ok very nice, thank you very much