cancel
Showing results for 
Search instead for 
Did you mean: 

Getting URL parameter in Web Dynpro when using iViews in netweaver portal

Former Member
0 Kudos

Hello Everybody,

I'm having the following issue:

I created a WD-Application which would be accessed directly via URL with some parameters.

Getting these parameters works fine using the logic from the following link:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/2233b60c21072ce10000000a155369/frameset.htm

Now I want to implement my WD-Application into the netweaver portal.

My colleagues customized it that far, so that I can access the WD via a portal-link.

The only thing is, that the logic getting the URL parameters from above does not seem to work in this context any more.

Do I need different coding getting the parameters from the portal URL or is this a matter of missing "portal-customizing"?

Any ideas in this matter are kindly appreciated.

Thanks in advance and regards,

Marc

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marc,

I'm doing the same and it works fine.

Here is my coding:


  DATA: lt_url_parameters TYPE tihttpnvp.
  data: ls_url_parameters type line of tihttpnvp.

* Read URL Parameters
  wdevent->get_data( EXPORTING name  = if_wd_application=>all_url_parameters
                     IMPORTING value  = lt_url_parameters ).

  read table lt_url_parameters into ls_url_parameters with key name = 'MODE'.
  if sy-subrc = 0.
    case ls_url_parameters-value.
      when '1'.
      when '2'.
      (...)
   endcase.
  endif.

Check the following:

1.) are you using the event handler "HANDLEDEFAULT" of your WINDOW to get the url parameters?!

2.) in the portal iview with your wd application, the property "Application Parameters" has to be filled (in my example: mode=1)

If you need the value in the init method of your first view, you can store the parameter in an attribute of your component controler and read it in your view.

Regards,

Andreas

Edited by: Andreas Leis on Jul 14, 2009 11:05 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Andreas,

great, that was just the information I needed.

So as I was already guessing, it was a matter of missing customizing in the portal (iView).

My colleagues added the URL parameters to this list of parameters that are passed on to the WD and now it works fine.

Thanks a lot, this really helped me out!

Best regards,

Marc

Former Member
0 Kudos

Hello Lekha,

thank you for your response.

The other thread deals, as you mentioned, with getting the User-ID, that was used for the protal login into the WD-Application.

What I want to get into the WD-Application are the up to n parameters from the URL.

I need these parameters to read data from the back-end in the init-method of my first view.

How could that be realized?

Thanks again and regards,

Marc

Former Member
0 Kudos

Hi,

Please refer this for example as how to get the portal user information -

Regards,

Lekha.