Skip to Content
Author's profile photo Roman Loshevsky

iView with dynamic parameters in URL for NetWeaver Portal 7.3

After a lot of questions without answer in portal forum areas, I decided to publish this “how to” which describes one of the existing solutions.

This blog will provide an answer to the question “How to create an iView with dynamic parameters in the URL” and provide a step by step example.

Prerequisites – a portal content administrator role is assigned to a user.

1. Create an iView based on “com.sap.portal.appintegrator.sap.Generic” application component:

    1. Browse: Content Administration -> Portal Content Management -> Portal  Applications -> com.sap.portal.appintegrator.sap
    2. Copy “Generic”

copyGeneric.png

     c. “Paste as PCD Object” and complete the creation wizard.

pasteAsPCD.png

iviewCreated.png

2. Configure the iView

  1. a. Open the properties of the created iView

openProps.png

          b. Choose “All” -> “Content – Generic Launcher” -> “Modify  Properties”

          c. Enter the URL in “URL Template” – the URL consists of the following parts: base part of URL and  

             ?<DynamicParameter> exactly as it appears in the screen.

cofigURL.png

3.Save and preview the created iView

a. Copy the URL of the opened preview window

b. Use this URL to concatenate with the required parameters according to the next syntax:

<Copied URL>?DynamicParameter=<encoded parameters>

Example:

http://server:port/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fsdn!2fURL_with_dynamic_parameters?DynamicParameter=q%3DSAP%20success

Where “q” is parameter name expected by Bing search. Here we pass the value “SAP success”, the equal sign “=” is encoded to %3D and ‘space’ is encoded to  %20

See URL encoding rules in http://www.w3schools.com/tags/ref_urlencode.asp

4. The result is that “Bing” search receives parameters in a dynamic way

/wp-content/uploads/2012/05/result_100438.png

This example can be used to point to an internal portal and external applications.

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks Roman. You may want to add a comment that sometimes it is required to change the HTTP Request Method from the default (blank) to GET. For example, in case of NWBC for HTML in order to pass parameters to the transaction that is a required step.

      Author's profile photo Roman Loshevsky
      Roman Loshevsky
      Blog Post Author

      Hi 🙂
      Thank you for comment.

      Best regards,
      Roman.

      Author's profile photo Antonette Venter
      Antonette Venter

      Thank you Roman!!!

      Very helpful!

      My only problem is that I have to force IE to open the iView in Standards mode (iView property - launch in seperate headerless portal window standard mode) but this setting is not applied in preview mode so I can't use that url.

      If I use the url that gets called (not preview) the parameter no longer gets passe 🙁

      Please help

      Thankss

      Antonette

      Author's profile photo Roman Loshevsky
      Roman Loshevsky
      Blog Post Author

      Hi  🙂

      We know about this limitation and it is resolved in latest versions with additional parameter added to the iView.

      But Generic component doesn't contains this property although the system version is suitable.

      So as workaround you can try to add this property to your iView via PCD Inspector (in case the system version is suitable according to the SAP note 2097861 )

      I am not tested this solution – so please update me and community 😉 with you results

      Best regards,

      Roman.


      Author's profile photo Antonette Venter
      Antonette Venter

      Hallo Roman

      Thanks for the quick reply.

      So what you are saying is, that when we add and set this property in the iView, the preview url WILL render correct?

      Setting the property I mentioned in my previous comment works, but is not applied in preview, why will this property be any different?

      Antonette

      Author's profile photo Former Member
      Former Member

      Hi Roman,

      Thanks for your valuable inputs ,I am also facing the same issue finally resolved

      Regards

      Apps