I have a .Net app which was previously using BO 3.x's OpenDocument
URL to open a particular instance of Webi Report, with a particular set of parameter values. It worked brilliantly.
But with BO 4.1 and 4.2, whenever I use &sInstance=Param
to get OpenDocument
to open a particular instance of a report, it fails miserably, silently throws a Java error, and leaves me with an (almost) blank webpage.
Does OpenDocument
work anymore with &sInstance=Param
?
I received the following email on August 6, 2016:
"Issue reproducible on BI 4.2 SP2 Patch 2. This issue has been resolved on BI 4.2 SP2 Patch 3. Regards..."
September 2016: Just to confirm, with the latest patch, OpenDocument
does (finally) work properly again, managing to open a particular instance of a Webi report.
Description of problem (for other BO victims)...
It's been a couple of months since I posted this article, no one the SAP forum has offered any help, and I'm still stuck on this problem.
Here's a step-by-step guide of how to reproduce the issue.
To keep things simple, I now have a "dumb" BO Report, which merely takes two parameters, and shows their values in a report. Nothing more.
I have a few instances of this report, and what I'm trying to do is open a specific instance of that report, using an OpenDocument
URL. Here's the history of my dumb report, and you can see I have 3 instances of it.
If I open the instance whose parameters are AVE;CHF
then I see this:
Wonderful.
Now, I want to open this particular instance of the report programmatically. using OpenDocument
. In the "real" version of my app, these reports are refreshed each night, and each instance might take 20 minutes to refresh, so I do not want to let OpenDocument
refresh the report... merely to open an existing instance of a report.
My report takes two parameters called FX Type
and Currency
, and I try to open the report using this OpenDocument
URL (split into separate lines, for readability) :
http://MyServer:6405/BOE/OpenDocument/opendoc/openDocument.jsp?
iDocID=AdF8qLrXtBdEgJxiPvS8s6Q
&sIDType=CUID
&sOutputFormat=H
&sType=wid
&sRefresh=N
&sInstance=Param
&lsMFX+Type=AVE
&lsMCurrency=GBP
&token=blahblahblah
When I open this URL, I just get this, in both Chrome and IE11.
Notice how the right-hand panel shows that it has got that report's details... so I am logged on correctly and it managed to find the correct report, but the report area is blank.
Being the geek I am, I used Google Chrome to Inspect the blank area, and found this..
Basically, Webi has thrown a Java error, and Webi has decided not to tell the user.
<body>
<script type="text/javascript">
onInvisibleError({actionId: '4587', message: 'while trying to invoke the method java.lang.String.length() of a null object loaded from local variable \'sToDecode\''});
</script>
</body>
Removing &sInstance=Param from the URL
Back in my URL, if I remove the section &sInstance=Param
then the report does open successfully, and shows the parameter values correctly. But, crucially, it refreshes the report, which is what I don't want.
We already have an instance of this report, I don't want to wait 20 minutes for my report to refresh, when this instance already exists.
Replacing &sInstance=Param with &sInstance=Last
Out of interest/desperation, I tried to get OpenDocument
to simply open the most recent instance of my report.
&sInstance=Last
When I did this, it worked as expected. My report opened perfectly, it didn't refresh the report, but, of course, it opened whichever instance was last created.
Parameter Names containing a space
When I originally posted this article, some readers recommended using %20
instead of +
in any parameter names containing a space.
I should say, if I take my OpenDocument
URL, remove the &sInstance=Param
section, and modify the FX Type
parameter from &lsMFX+Type=AVE
to &lsMFX+Type=CHF
, then report refreshes using this new FX Type value.
So the URL definitely is parsing the URL correctly, and setting the two parameter values to the correct parameter names. But then it falls over when trying to find an existing instance.
Final thoughts
So. In a (longwinded) nutshell, if I use &sInstance=Param
, BO v4.2 (and v4.1) quietly throws an error and returns a blank screen.
It won't let me load an existing instance of a Webi report.
And SAP's support seems to have gone AWOL.
Has anyone seen this problem, or found a workaround ?
One day later...
This morning, I created a second Webi Report, with a hyperlink to the "Mikes Test" report.
When I clicked on this link, it successfully opened my Webi report with the specified parameters. No problem there.
But when I changed the "Target Window" setting from "Current Window" to "New Window"...
...look what happens when I click on the hyperlink...
It's our Java error again !
So, I think this proves that this is a bug in BO 4.2 itself.
Even the Hyperlink URLs it creates itself aren't able to open a specific instance of a Webi report.
SAP... over to you...
I think that the cause of the error message is that you haven't specified a index value matching the prompt value you passed (BU Cat
). Have a look at the section on lsI[NAME]
in the OpenDocument manual.
Here's a rather easy option to compare and check your OpenDocument links: have the Document link feature in Webi create them for you. Here's what you do:
Important: make sure that you're using the HTML Webi client, not the Java applet (RIA) one.
Remark: take into account that some prompts might require index values along with text values (this is especially true for BW variables/prompts).