on 10-28-2004 9:05 PM
We are implementing the bookmark functionality in BW Web Reports. Web reports are then made available to end users using SAP Enterprise portal.
In order to achieve the bookmark functionality we have used the code as published in the BW Expert magazine Issue Jan 2004. If a web report is executed on the WAS server, the bookmark works fine.
However the same report when executed from EP Portal, we get a JavaScript Permission denied when executing the bookmark.
Appreciate if you can share your thoughts on how to resolve this issue.
Thanks, Jay
Make sure you set the document.domain property of the bw template the domain of the of the server.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I checked that the domain of the web template and the domain of the child popup window are the same.
I think the problem is that our portal is on xxx.company.com but our web templates are on yyy.company.com.
I dont understand why everything works fine when i run it directly on WAS but when I run from the portal, i get that javascript "permission denied" error.
Any help is appreciated.
On my web template i have a text box for the user to enter some value. And there's a submit button. When the submit button is clicked, the javascript function gets executed. This is the code for the javascript function:
function addToFavorites() {
report_name = document.getElementById('rept_name').innerHTML;
report_name = report_name.replace(/ /g,"%20");
text = window.document.forms["input_text"].elements["add_to_fav_text"].value;
text = escape(text);
// > Begin code from BWExpert Volume 2 (2004) - Issue 1 (January) <
var bwUrl = "<SAP_BW_URL CMD='BOOKMARK'>";
//Open the child window to generate the BW bookmark url.
child1 = window.open(bwUrl, 'win1', 'width=1,height=1,alwaysLowered=0');
window.focus();
var pageTitle = document.title;
//Ensure that BW completed generation of the bookmark url.
now = new Date();
startTime = now.getTime();
delayTime = 30000; //Set timeout to 30 seconds
waitTime = startTime;
//check if the bookmark url is ready and timeout after the specified time (delayTime).
while (waitTime<(startTime+delayTime)) {
now = new Date();
waitTime = now.getTime();
//BW identifies a bookmark using BOOKMARK_ID. The presence of this string
//in the url is used to identify creation of the bookmark. If bookmark
//is created on the server, proceed to the next step.
document.domain = "mydomain.com";
if (child1.location.href.indexOf("BOOKMARK_ID") > 0) break;
}
// > End code from BWExpert Volume 2 (2004) - Issue 1 (January) <
bookmark_url = escape(child1.location.href);
//Add bookmark
bsp_url = "/sap/bc/bsp/sap/z_add_to_fav/addCustomText.htm?TEXT=" + text + "%20(" + report_name + ")" + "&URL=" + bookmark_url;
child1.close();
SAPBWOpenURL(bsp_url);
}
I partially follow the code from BWExpert Magazine. Their code opens a child window which creates the bookmark. The parent window grabs the URL from the child window.
I pass the URL of the bookmark to a BSP which adds the URL of the bookmark to the users favorites.
Thanks,
Audrey
I implemented the bookmark functionality some time ago and found that if I put the javascript code into a module on the BW server, and then included the javascript file, then I got a similar error.
If i included the javascript within the actual web template, then I didn't get this error.
Unfortunately this means that I have to add in the javascript functionality to every web template that I use, instead of being able to put a reference to the .js file on the server, but at least it worked.
Not sure how you have implemented it, so this may not be helpful.
Jayant,
I'm having the same issue. Did you find a solution?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have implemented the SAP Enhance Web reporting functionality but it's lacking a few bit and pieces.
Is there anyone out there who know how I can set a web page to landscape from a web template?
Come on, someone out there must have beaten this probelm.
Thanks
Paul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.