Setting up a single report hyperlink in an SAP dashboard that works on desktop and on mobile

As of SAP BI 4.0 SP7, there are still two different APIs for opening reports over URL through linking on mobile and on desktop. The desktop API is the true and tried openDoc API that has been around for many years. Mobile, introduced the sapbi links that work within the mobile app.
So, when designing a dashboard that has a link to a report, there is no simple way to configure the URL button URL to support both types of links. The dashboard itself doesn’t “know” it is being opened in the mobile app or on a desktop computer, so does not automatically convert openDoc URLs to sapbi (webi seems to do that well). To work around this problem, you can use a hyperlink to the dashboard, and pass a simple flash variable to indicate it has been opened in the desktop mode and the openDoc url should be used, not the sapbi, and vise versa. There are other advantages to using a heprlink to the dashboard such as passing the host information to prevent the need to change that in the xlf on migrations, as well as specifying the dimensions of the swf object, something that cannot be done when opening the swf object directly from the BI Launchpad. Here are the steps to configure a single URL button to work for both desktop and mobile

1. First, you will need to craft both links. You can use the share functionality in the mobile app to generate the link for you and the BI Launchpad to generate the openDoc link. Your links will look something like this :
For mobile: sapbi://OpenDoc/?authType=secEnterprise&default=yes&connection_name=myconn&server_url=https://myserver.com&ConnectionType=BOEConnection&cms=myCMS&type=webi&iDocID=AVX4JiBBBoFPk123456&reportPageNumber=0&sReportName=Sales%20Summary
For desktop:
https://myserver.com/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID= AVX4JiBBBoFPk123456&sIDType=CUID&sReportName=Sales%20Summary

2. In the dashboard, add your flash variables. You may use a host info variable to pass info like the host name, port and protocol to avoid having to change those in the XLF as you migrate it between environments. For the purpose of determining the dashboard has been opened in desktop, I added a flash variable called OpenedInDesktop

3. In the model create a formula that evaluates the value of the OpenedInDesktop flash var. If it is set as expected from the desktop, set the formula value to be the desktop link, otherwise, make it the mobi link

4. Add the URL button top the dashboard and bind it’s URL property to formula created to evaluate which link to use based on the flash var

6. Export the dashboard to HTML format on your computer and edit the HTML file produced by dashboard as follow: add your server host info for the value of the HostInfo flash var and add YES as the value of the OpenedInDesktop flash var. Note there are two places to set each value as highlighted in the image below. Place this file on your BO server web server. Note the location, you will create a hypelink for it. For example, you can place it in Tomcat root directory

7. Finally, configure a hyperlink object in the BI Launchpad to the dashboard and place that object in the folder where users will be looking for the dashboard link

And that is it! When users open the dashboard from the BI Launchpad on their desktop, the link will work as openDoc, and when they launch the dashboard from the mobile app, the link will work with as sapbi

Great questions Peter! 1. You will need the swf to be available to the HTML, so either move it physically in, or, better yet, use an OpenDoc URL for the swf source. You can also find other posts in this blog that discuss using an intermediate file to solve xlf deployment issue at greater detail. 2. The flash var names used in this post are not reserved, just examples, you may use any other valid name in your implementation. Thanks! – Ron