02-02-2010 8:35 AM
Hi,
Question about javascript in WAD 7. When I push a button, a javascript is started to open a pdf file in the portal. This works fine.
function openInfoProviderDoc( )
{
var x=window.open( 'http://sapsvr62.mcb.local:50000/irj/go/km/docs/documents/mis/documents/sales/zsd_m01.pdf' );
}
Now I need the InfoProvider (technical name) in the javascript. Is there a function to get name or can I pass the InfoProvider as a parameter?
function openInfoProviderDoc( varInfoPro )
{
var x=window.open( 'http://sapsvr62.mcb.local:50000/irj/go/km/docs/documents/mis/documents/sales/' + varInfoPro +'.pdf' );
}
or
function openInfoProviderDoc( )
{
var varInfoPro=bla.get( INFOPROVIDER )
var x=window.open( 'http://sapsvr62.mcb.local:50000/irj/go/km/docs/documents/mis/documents/sales/' + varInfoPro +'.pdf' );
}
Regards,
Coen.
02-15-2010 1:25 PM
02-16-2010 9:36 PM
Hello Coen, why are you using window.open if a simple link (with property target set to "_blank") will open the PDF on a new browser? Is the infoprovider inserted in a textbox by your users or are you showing it on the webpage?
<a href="....../ZSD_M01.pdf" target="_blank">PDF doc</a>
Cheers
Michael
02-17-2010 5:54 AM
Hi Michael,
Thanks for you interest. We added 2 buttons to our default web templates. The first button opens a general document explaining the use of the buttons, filters, settings, context menu etc. The second button opens a document which describes the InfoProvider. I need the second button to be user unattended, opening the document of the current InfoProvider.
The key is, how can I capture the technical name of the InfoProvider into a variable? After that it's just creating a string and concatenate the variable.
Of course any alternative that match will be appreciated .
Regards,
Coen.
02-21-2010 1:35 AM
A question, what's the "infoprovider"? If it's master data of the user, you can calculate it and use it as part of thelink when "building" the HTML to be shown
02-22-2010 6:25 AM
Hi Michael,
The InfoProvider in this situation is a multicube. In our case, all queries are build on multicubes. Queries are linked to standard web template like the ZANALYSIS_PATTERN or ZDISPLAY_PATTERN. Standard template are maintained in the WAD, which has javascript functionality.
So, each template is connected to a query which is connected to a InfoProvider (multicube). Depending on the selection in the portal the ZDISPLAY_PATTERN can open a query that is build on InfoProvider ZSD_M01 (sales and delivery) or ZQM_M01 (quality).
Recently I found out that when I use the "Text" web item, I can bind a "General text element" and select the InfoProvider name. Question again is, how do I get this in a variable in the javascript.
Regards Coen.
02-23-2010 1:26 AM
02-23-2010 5:37 AM
02-23-2010 5:43 AM
Hi All,
Question is still open. We need a solution or alternative. Please help.
Regards Coen.