Skip to Content
0
Former Member
Jul 19, 2010 at 01:38 PM

How to get value from popup window into parent(Main) window in web dynpro

272 Views

Friends,

I have created one web dynpro application, here In main view i have added one button, and in event of this button I wanted a Popup window with "FormattedTextEdit" component in it, which I created using code :

======

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_CMP_API = WD_COMP_CONTROLLER->WD_GET_API( ).

L_WINDOW_MANAGER = L_CMP_API->GET_WINDOW_MANAGER( ).

IF WD_THIS->POPUP IS INITIAL.

WD_THIS->POPUP = L_WINDOW_MANAGER->CREATE_WINDOW(

WINDOW_NAME = 'POPUPWIN'

BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OKCANCEL

MESSAGE_TYPE = IF_WD_WINDOW=>CO_MSG_TYPE_NONE ).

ENDIF.

L_API = WD_THIS->WD_GET_API( ).

==========

and also created buttons for this popup window using :

====

WD_THIS->POPUP->SUBSCRIBE_TO_BUTTON_EVENT(

BUTTON = IF_WD_WINDOW=>CO_BUTTON_OK

ACTION_NAME = 'POPUP_OK'

ACTION_VIEW = L_API

IS_DEFAULT_BUTTON = ABAP_TRUE ).

WD_THIS->POPUP->SUBSCRIBE_TO_BUTTON_EVENT(

BUTTON = IF_WD_WINDOW=>CO_BUTTON_CANCEL

ACTION_NAME = 'POPUP_CANCEL'

ACTION_VIEW = L_API

IS_DEFAULT_BUTTON = ABAP_FALSE ).

WD_THIS->POPUP->OPEN( ).

====

Which is working very fine, but now I want the value of the component - FormattedEditText of my popup window in to my parent(main) window on the event pressing Ok Button( POPUP_OK) . Can anyone please tell me how can I get this Texts in my parent Window.

Regards,

Hiren.