cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP WebDynpro - How to get a reference to a component?

0 Kudos

Hey,

I want to have a reference within my normal component to a different component - Is this possible?

Thanks in advance,

Patric

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hey,

in the meanwhile i solved the problem by my own - it was easier as i thought!

Here's my solution:


  data: l_cmp_api type ref to if_wd_component.

  l_cmp_api = wd_comp_controller->wd_get_api( ).

  cl_wd_popup_factory=>popup(
     component             = l_cmp_api
     used_component_name   = 'ANOTHER_COMPONENT_NAME
     view_name             = 'VIEW_OR_WINDOW_NAME'
     close_button          = abap_true
     ).

Anyhow - thank you for your help!

Best regards,

Patric

Edited by: Patric Stade on Sep 30, 2008 7:34 PM

Edited by: Patric Stade on Sep 30, 2008 7:35 PM

Former Member
0 Kudos

Hi Patric,

do you know how to get the reference to a View of another WebDynpro?

Thanks

Liza

0 Kudos

I want to create a popup which contains a view of a different component.

Currently i'm just able to create a popup which contains a view from vom own component as you can see below:


  data comp type ref to if_wd_component.

  com = wd_comp_controller->wd_get_api( ).

*TRY.
CALL METHOD cl_wd_popup_factory=>popup
  EXPORTING
    component           = comp
*    used_component_name =
    view_name           = 'VTEST'
*    create_only         = ABAP_FALSE
*    modal               = ABAP_TRUE
*    window_title        =
    close_button        = abap_true
*    button_kind         =
*    message_type        = IF_WD_WINDOW=>CO_MSG_TYPE_NONE
*    close_in_any_case   = ABAP_TRUE
*  IMPORTING
*    popup_window        =
*    component_usage     =
    .

But i want to use a view from a different component than my normal one, and because of that i need a reference to the different component.

regards

Edited by: Patric Stade on Sep 30, 2008 5:47 PM

former_member188685
Active Contributor
0 Kudos

may be you can do some thing like this..

Create the application for the component which you want to use, and construct the url using the application, and can call the url using the create_external_window method of interface if_wd_window_manager

former_member188685
Active Contributor
0 Kudos

Are you talking about component usage..?( usage of one component in another component.)