Show TOC

Method GET_URLLocate this document in the navigation structure

Method /UI2/IF_LAUNCHPAD_ACCESS~GET_URL

Returns a single URL with optional parameters. This can be an absolute URL or an LPD URL.

Table 1: Parameters
Parameter Type ABAP Type Description
IV_ROLE Importing APB_LPD_ROLE Name of a launchpad role as defined in transaction LPD_CUST

Together with the instance, it uniquely identifies a launchpad.

IV_INSTANCE Importing APB_LPD_INSTANCE Name of a launchpad instance as defined in transaction LPD_CUST

Together with the role, it uniquely identifies a launchpad.

IV_KEY Importing APB_LPD_GUID Key of a launchpad entry (application or folder)
IT_PARAMETERS Importing T_PARAMETERS Table with name-value pairs containing additional business parameters to be added to the application URL

All IT_PARAMETERS are used for the single URL.

IT_FILTER_SELECT_OPTIONS Importing /IWBEP/T_MGW_SELECT_OPTION Select options

The value is passed to the feeder class.

For more information, see Filtering URLs Using a Feeder Class.

EV_URL Exporting STRING Constructed absolute URL
EV_LPD_URL Exporting STRING Constructed LPD URL
CT_POST_BODY Changing T_PARAMETERS Table with name-value pairs containing parameters to be used during navigation

Example

The following example requires that there is a launchpad which includes an application with the alias SAP and the URL http://www.sap.com/search/index.epx .

DATA lp_da TYPE REF TO /ui2/cl_launchpad_da.
DATA lt_cont TYPE /ui2/if_launchpad_access=>t_lp_content. 
DATA ls_cont TYPE /ui2/if_launchpad_access=>s_lp_content.

CALL METHOD /ui2/cl_launchpad_da=>get_launchpad_reference
  RECEIVING
    ro_launchpad_da = lp_da.

CALL METHOD lp_da->/ui2/if_launchpad_access~get_launchpad_list
  IMPORTING
    et_content = lt_cont.

DELETE lt_cont WHERE alias <> 'SAP'.

READ TABLE lt_cont INTO ls_cont INDEX 1.
IF ls_cont IS NOT INITIAL.

   DATA: lt_params TYPE /ui2/if_launchpad_access=>t_parameters, 
         ls_param TYPE ihttpnvp,
         lt_p TYPE /ui2/if_launchpad_access=>t_parameters,
         lv_url TYPE string.

  ls_param-name = 'Query'.
  ls_param-value = 'Walldorf+research'.
  INSERT ls_param INTO TABLE lt_params.

  DATA lv_role TYPE apb_lpd_role.
  DATA lv_instance TYPE apb_lpd_instance.
  
  lv_role = ls_cont-role.
  lv_instance = ls_cont-instance.

  CALL METHOD lp_da->/ui2/if_launchpad_access~get_url
    EXPORTING
      iv_role = lv_role
      iv_instance = lv_instance
      iv_content_key = ls_cont-content_key
      it_parameters = lt_params
    IMPORTING
       ev_url = lv_url
    CHANGING
       ct_post_body = lt_p.

  WRITE: lv_url,/.
ENDIF.

Result:

http://www.sap.com/search/index.epx?q1=Walldorf+research