How to call a Portal iview directly using NavigationTarget
This blog post will be useful if you would like to link to a specific Portal iview directly, e.g: from a pdf, document, another site etc. Using the NavigationTarget property we can call any iview, role object directly, plus also pass any additional properties via GET method as required (e.g: Application Parameters, NavMode, sap-ie etc.).
This method is also useful for testing iviews under the different document rendering modes: Quirks and Standards, which I will explain below.
The NavigationTarget property supports the following values:
– Full PCD location to a role, iview etc.
– Short URL value
Logging on to your Portal as an administrator user, call the below URL:
What happens here? We are calling the UserAdmin WebDynpro Java application, we are passing Navigation Mode = 3 so it will display in a seperate headerless portal window and sap-ie=EmulateIE8 to force the application to render under Quirks.
You should see the window open as below:
Looking at the URL in detail, we are passing 3 parameters:
NavigationTarget: This should include either a PCD Object location, or Short URL value exactly as below (important points in bold):
For a PCD object location, we must include pcd: prefix before we include the PCD location. For a Short URL we must include navurl:// before the Short URL value.
NavMode: The Navigation Mode is the mode we wish to open the application under. Choosing NavMode=0 for example, the application will be called under the Portal Content Area, so the entire Portal will be loaded. Calling NavMode=1 will open the iview in a frameless window (No iframe).
The list of available navigation modes may be found below:
- NavMode=0 –> Display in Portal Content Area
- NavMode=1 –> Display in Separate Window
- NavMode=2 –> Display in Separate Portal Window
- NavMode=3 –> Display in Separate Headerless Portal Window (Quirks Mode)
- NavMode=4 –> Display in separate headerless portal window (embedded)
- NavMode=10 –> Display in separate headerless portal window (standard mode) (Standards/EDGE Mode)
- NavMode=11 –> Display in separate headerless portal window (viewport)*
sap-ie: May contain a value of either EmulateIE8 or EDGE. Emulate IE8 will tell the application to run under Quirks, while EDGE will tell it to run under Standards document mode.
Locating the PCD object location
As above, for an example I have picked an iview that you will all have deployed on your Portal. but you will probably have your own iviews/other content you will want to call using this method.
I have created a new iview called UI5, which is based on the SAPUI5 iview object template. This I want to call directly, under Standards document mode, plus using a new headerless Window.
Open the iview via your Content Administration -> Portal Content Management you wish to link to.
Open the Properties section for this iview and choose All properties.
Under the iview properties filter, use Filter as: Location, the iview PCD location will be displayed as below. Copy the value for location:
In this case, the iview is located under potal_content folder, and it is called UI5. To call this iview directly, we would construct the following URL:
The iview will now get called (for this example, I don’t point the iview to a UI5 application, so the Application Testing screen is displayed):
Notice in the URL I pass NavMode=10, sap-ie=EDGE for Standards mode?
Using Short URLs
In my above example, I have a very short PCD Location consisting of just: pcd:portal_content/UI5. But for many cases, you will be using folders, longer names for the objects and the PCD location does get quite large.
We can see this for our first PCD Location:
You may even have longer PCD locations than above! It is not ideal to include such a large URL in a request. Instead we can use the Short URLs feature of the Portal.
To locate a Short URL value from a PCD Location?
Logon to your Portal as an Admin User and Navigate to System Administration -> System Configuration -> Runtime Settings -> Short URLs
Note: Short URLs must be enabled under this location before you can use Short URLs in Navigation!
Under the Short URL Search box, paste the entire PCD location excluding the PCD: prefix using an asterisk at both start and end of the string.
For the above example (UserAdmin iview), you would search exactly as below:
Your iview/role etc. object should be listed now under the results. Press the + button next to the result(s) to confirm the location is correct.
You will now see the correct Short URL value for your iview/object as below:
In my case the Short URL to the UserAdmin/umeAdminWD application is (this will be different in your system):
To Call the UserAdmin application using the Short URL value, I will use the following URL:
The UserAdmin application is now opened via Short URL: