Url Iview Implementation

Url iviews are used for integrating non SAP website content in to the SAP Portal. Below help link explains more in detail about URL iview implementation

http://help.sap.com/saphelp_nw73/helpdata/en/49/86079dfeb92223e10000000a42189d/content.htm?frameset=/en/49/803213c6242221e10000000a42189d/frameset.htm

Multiple or Dynamic URLs

This document explains an implementation scenario where there is a business requirement to integrate user specific Url iviews in to the portal. On such requirements either the complete URL changes for every user or the parameters that are passed along with the url changes for every user .

So one cannot create multiple URL iviews to achieve this business need.

Forced URL

There is a property “Forced URL” in the url iview . When enabled , then same url iview can be called but with different urls/parameters. The above help documentation explains it better.

The motive of this document is to explain how to pass the parameters of the url. Normally it does not work in a straight forward say if the url has parameters to be passed.

Example

https://www.google.co.in&q=SAP&hl=DE

Here the url has two parameters “q” and “hl” to be passed.
Next sections show on how to use this parameter and what is the issue in the approach.

How to use ForcedURL Property

  • Create an URL iView as mentioned in the above help link
  • Fill in the “URL IView” properties. You can even ignore this  step if there is no need for default content .An example is shown below

/wp-content/uploads/2013/12/urliview2_341618.png

  • Enable the forced url property .Save the iView

urliview3.PNG

  • Now this iView can sufficiently handle different urls. (Iview need not be added to a role, but should have end user runtime permissions)
  • Now to call this URL iView with different urls , the iView can be called in the following way
  • Call the iView with the Navigation Target=pcdpath and forcedURL=the desired url. For example

          http://<host>:<Port>/irj/portal?NavigationTarget=pcd:portal_content/Test/testurl&forcedURL=https://www.google.co.in?q=SAP&hl=FR

          The navigation target can also be the short url of the iview instead of the pcd path

Issue in this approach
By calling this url in this way , the parameters does not get recognized.
http://<host>:<Port>/irj/portal?NavigationTarget=pcd:portal_content/Test/testurl&forcedURL=https://www.google.co.in?q=SAP&hl=FR

Encoding

The url that is called should be encoded . So in the called URL replace the special character in the following way.
?      as     %3F
=      as      %3D
&       as     %26

So the resulting url is

http://<host>:<Port>/irj/portal?NavigationTarget=pcd:portal_content/Test/testurl &forcedURL=https://www.google.co.in%3Fq%3DSAP%26hl%3DFR

The complete Special character encoding list is given in the w3schools link HTML URL Encoding Reference

Incase of this url being dynamically generated with a program,then that also should be
encoded.Refer this help link Setting a Dynamic Runtime URL – iViews – SAP Library

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply