cancel
Showing results for 
Search instead for 
Did you mean: 

Link to ACTION

Former Member
0 Kudos

Hi,

i have a LINK_TO_ACTION UI element in my WD Component.

when i click this UI Element i want that another WD Application opens up.

this WD App is in different WD Component.

how do i do it. and i also want to pass some parameter when i call this WD App and capture the parameter in the Destination WD Application.

plz replly soon.

Thanks & Regards,

Ritwik.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI ritwick,

You can use the method create_external_window from the interface if_wd_window_manager.

Former Member
0 Kudos

hi,

i already have the app with me. i just want to make a call to it. how can i do that.

plz let me know.

Thanks & Regards,

Ritwik.

Former Member
0 Kudos

HI Ritwick,

Create one event handler for your LinkToAction UI element. Then in the Event handler pass your second WebDynpro URL.

Please consider the following code :

DATA: l_cmp_api           TYPE REF TO if_wd_component,
         l_window_manager    TYPE REF TO if_wd_window_manager,
        window_result type ref to IF_WD_WINDOW.

  l_cmp_api           = wd_comp_controller->wd_get_api( ).
  l_window_manager    = l_cmp_api->get_window_manager( ).

  IF wd_this->m_popup1_1 IS INITIAL.

wd_this->m_popup1_1 = l_window_manager->create_external_window(
             url  = 'Your URL'
*              title          = 'My Report 1'
              ).
ENDIF.

  wd_this->m_popup1_1->open( ).

Thanks.

former_member515618
Active Participant
0 Kudos

Hi Ritwik,

If you are executing the web application in portal and upon click to 'Link to action', you want to open another web application in portal do the following.

Assume that we have a field called MODE created as an application parameter. This can be passes while navigating to the other application.


*---------------------------------------------------------------------*
* Reference to context nodes (lo_)
*--------------------------------------------------------------------*
  DATA:
*   Messages
    lo_message_manager          TYPE REF TO if_wd_message_manager,
*   Portal manager
    lo_port_manager             TYPE REF TO if_wd_portal_integration,
*   Current controller
    lo_current_controller       TYPE REF TO if_wd_controller,
*   API Component controller
    lo_api_componentcontroller  TYPE REF TO if_wd_component,
*   Component controller
    lo_componentcontroller      TYPE REF TO ig_componentcontroller,

*--------------------------------------------------------------------*
* Local tables (lt_)
*--------------------------------------------------------------------*
*   Launch parameteres
    lt_launcher_parameter_list  TYPE wdy_key_value_table,
*   Business parameters
    lt_bus_parameter_list       TYPE wdy_key_value_table,
*--------------------------------------------------------------------*
* Local structure (ls_)
*--------------------------------------------------------------------*
    ls_keyvalue_pair            TYPE wdy_key_value,
*--------------------------------------------------------------------*
* local variables (l_)
*--------------------------------------------------------------------*
*   Risk id
    l_risk_id                   TYPE j_objnr,
*   PCD Location
    l_pcd_location              TYPE string.


*----------------------Begin of main processing----------------------*

  lo_current_controller ?= wd_this->wd_get_api( ).

* Get message manager
  CALL METHOD lo_current_controller->get_message_manager
    RECEIVING
      message_manager = lo_message_manager.

  lo_componentcontroller = wd_this.
  lo_api_componentcontroller = lo_componentcontroller->wd_get_api( ).
  lo_port_manager = lo_api_componentcontroller->get_portal_manager( ).

* Generally the paths for the IView is stored in below table.
* Get the url of the pcd page for the common transaction iview
  SELECT SINGLE b~text INTO l_pcd_location
                       FROM t7xssserstring AS b
                 INNER JOIN t7xssserres AS a
                         ON a~respcdpage = b~guid
                      WHERE a~ressource = 'RESOURCE_KEY'.
  IF sy-subrc <> 0.
*   Error!! Invalid configuration
    CALL METHOD lo_message_manager->report_t100_message
      EXPORTING
        msgid = 
        msgno =
        msgty = 
  ELSE.
* Build launch parameters
If you have build any parameters for the application then pass them here.

    CLEAR: ls_keyvalue_pair.
    ls_keyvalue_pair-key = *'MODE'.*
    ls_keyvalue_pair-value = +'E'.+  "Edit
    APPEND ls_keyvalue_pair TO lt_bus_parameter_list.

    CLEAR: ls_keyvalue_pair.
    ls_keyvalue_pair-key = *'ID'.*
    ls_keyvalue_pair-value = id. "Unique key
    APPEND ls_keyvalue_pair TO lt_bus_parameter_list.

    CLEAR: ls_keyvalue_pair.
    ls_keyvalue_pair-key = 'NavMode'.
    ls_keyvalue_pair-value = '3'.
    APPEND ls_keyvalue_pair TO lt_launcher_parameter_list.

* Navigate risk assessment web interface.

    CALL METHOD lo_port_manager->navigate_absolute
      EXPORTING
        navigation_target   = l_pcd_location
        navigation_mode     = '1'
        use_sap_launcher    = true
        business_parameters = lt_bus_parameter_list
        launcher_parameters = lt_launcher_parameter_list.

  ENDIF. "If PCD path is found

In HANDLEDEFAULT method of the called WD component, create a import parameters as MODE.

Use the same in the application parameter .

When the above code is executed, a new portal page is launched. The dynamic parameters are bound to the url and they are copied into the applications and are available in the import parameters of HANDLEDEFAULT.

Hope this helps.

Regards,

Sravan varagani