cancel
Showing results for 
Search instead for 
Did you mean: 

Calling window from another window in same Web dynpro component

Former Member
0 Kudos

Hi Friends,

I have 2 windows in my web dynpro component. One is a pop-up window. On click of Ok button on popup i want to refresh data in other window. For this i need to connect between 2 windows. Please help me in how to achieve this.

Regards,

Saud

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shaikh,

You Requirement can be done by the following way..

In the calling POP_UP window..use the Function CREATE_POPUP_TO_CONFIRM ()..This Function can be found in IF_WD_WINDOW_MANAGER...like this

+ l_popup = l_window_manager->create_popup_to_confirm

( text = l_text

button_kind = if_wd_window=>co_buttons_yesnocancel

message_type = if_wd_window=>co_msg_type_question

window_title = 'My POP UP'

window_position = if_wd_window=>co_center

close_button = ABAP_false ). +

and then subscribe this to the calling window by SUBSCRIBE_TO_BUTTON_EVENT ( ) ..the code seems like

+ l_popup->subscribe_to_button_event

( button = if_wd_window=>co_button_yes

action_name = 'ACT_YES'

action_view = l_api

is_default_button = ABAP_true ) +

And the In the Action ACT_YES ..write the code what you want...

Former Member
0 Kudos

Hi Saud Shaikh,

For your Requirement .If that Node is in component controller then your work is very easy .

drag and drop the node in window 1 and window 2 context .

in the ok action just invalidate the node .

Regards

chinnaiya P

Former Member
0 Kudos

Do i need to invalidate it before filling the new data or after filling the new data in node?

Former Member
0 Kudos

Before filling the new data...

Former Member
0 Kudos

If i do this than data comes fine, however when i scroll data in the grid it gives runtime error saying 'Node is already Invalidated. <View Name(Popup view)>' . ?

Former Member
0 Kudos

Can you please send us the code where you are invalidating the table data.

Former Member
0 Kudos

Can you please explain your issue.

Former Member
0 Kudos

The issue is i am having a pop up window. This popup is called from another window. When i click 'OK' on the popup window, i need to refresh data displayed in the calling window. Is it clear or i need to elaborate further.

Former Member
0 Kudos

Have you created a method for the Ok button event in the window from where you calling a Popup. If you have already done, you need to do the coding in the event handler method for refershing.

If you have meant refreshing by collect all the data from popup and diaplsy on the firing window, then you need to fetch it in a component controller attribute and retrieve it wherever you want.

Hope it helps you.