Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

We can read the URL parameters in the following ways. 

If we have one or two parameters attached to URL then simply we can declare those parameters in the interface of window method HANDLEDEFAULT from there directly we can access the values.Please find the screen shot below for the same.

Sample URL:

If we have more parameters or repeated parameters with values in the URL like below.

Eg URL:  

In the above URL we have repeated parametes with values to read them follow the code below.

METHOD handledefault .
*--Declaration to hold values of parameters
  TYPES:begin of ty_values,
      pernr type persno,          " Eemployee number
     name type pad_cname,   " Employee name
  end of ty_values,
 ty_t_param_val  type standard table of ty_values.
*--Field symbols   
     <fs_data> TYPE tihttpnvp, 
     <ls_data> TYPE ihttpnvp.
      ls_value type ty_values,
     lt_values type ty_t_param_val,
   ls_parameter like line of wd_event->parameters.

We have an attribute PARAMETERS in the class CL_WD_CUSTOM_EVENT which holds all the parameters of the URL during runtime.

*--To read all URL parameters
read table wd_event->parameters into ls_parameter with key name = if_wd_application=>all_url_parameters.
if sy-subrc eq 0.
*--Assign parameters to internal table(name &value )
 assign ls_parameter->* to <fs_data>.
loop at <fs_data> assigning <ls_data>.
if <ls_data>-name = 'PERNR'.
 ls_value-pernr = <ls_data>-value.
elseif <ls_data>-name = 'NAME'.
 ls_value-name = <ls_data>-value.
append ls_value to lt_values.




  1. Guest


    Regarding this article, how can I read the standard WD parameters? Example: WDTHEMEROOT.


  2. Guest

    You can get url parameters from cl_wd_runtime_services=>get_url_parameter( ).

    HANDLEDEFAULT doesn't work in all cases because this method is called after the view/controller wddoinit methods.

    -- Venky