cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic link which opens pop-up

Former Member
0 Kudos

Hi,

I want to create a link dynamically, on clicking the link pop-up window should open separately. Please help these.

thanks

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member182190
Active Participant
0 Kudos

Hi Vimal,

Follow the below code for a pop up window.

DATA:

l_window_manager TYPE REF TO if_wd_window_manager,

l_cmp_api TYPE REF TO if_wd_component,

l_window TYPE REF TO if_wd_window.

DATA:

lv_title TYPE string.

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

l_window = l_window_manager->create_window(

window_name = 'POPUP_WINDOW'

title = lv_title

message_display_mode =

if_wd_window=>co_msg_display_mode_selected

button_kind =

if_wd_window=>co_buttons_okcancel

message_type =

if_wd_window=>co_msg_type_none

).

l_window->open( ).

Regards,

Ismail.

Former Member
0 Kudos

Hi,

Currently the window opens in the same page, but it should open in new page/ window like a pop-up as we get in web sites.

how to get the popup window???

Thanks

former_member205703
Participant
0 Kudos

Hi Vimalraj,

To open the window as pop up , create a new window embed the view you want in that window and then do the following coding the event handler method.


data lr_window_manager type ref to if_wd_window_manager.
  data lr_api_component  type ref to if_wd_component.
  data lr_window         type ref to if_wd_window.


 lr_api_component  = wd_comp_controller->wd_get_api( ).
  lr_window_manager = lr_api_component->get_window_manager( ).
  lr_window         = lr_window_manager->create_window(
                     window_name            = 'WINDOW_NAME'
*                    title                  =
*                    close_in_any_case      = abap_true
                     message_display_mode   = if_wd_window=>co_msg_display_mode_selected
*                    close_button           = abap_true
                     button_kind            = if_wd_window=>co_buttons_ok
                     message_type           = if_wd_window=>co_msg_type_none
                     default_button         = if_wd_window=>co_button_ok
                     ).

  lr_window->open( ). 

Regards

Amol Deshmukh

Former Member
0 Kudos

Hi..

i could create the link but how to make the new window to open like pop-up.

Thanks

vimalraj

former_member205703
Participant
0 Kudos

Hi Vimalraj,

Create an elememt of type LinkToAction , bind it with the context element of type string ( create this string content dynamically ). Create an action handler for the element of type LinkToAction .

Then in action handler method write the code to create pop-up.

Regards

Amol Deshmukh

Former Member
0 Kudos

hi vimal.....

make use of the class cl_wd_link_to_action to create your own link dynamically.

--regards,

alex b justin