on 07-27-2005 7:38 AM
Hello Guros,
I've built two workbooks and tried to do drilldown from one workbook to the other. I get the correct data but without the workbook that i've built.
I know that there is the option to save the workbook as jump target but i dont know how to use the view that i saved.
Please Advice,
Amir
I have been very tied up on other projects and am just now getting back to this.
Thanks for the input.
I will try and get back with you.
I will also award points!
Thxs,
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does anybody has a solution?
I'm still looking for an idea.....
Amir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amir,
I have done what (I think) you are trying to do.
On the BEx Toolbar, under the Settings icon are two commands you need to use:
1. New Workbook on embed ... is based on permanent template;
2. Permanent workbook template.
So, you save your "receiver" query in a workbook (if there are multiple queries in the receiver workbook, your RRI receiver must be the LAST query embedded). Then, you define that receiver query as your permanent template.
This sounds bad, doesn't it? But, it is not as bad as it sounds. All you need to do is to set this workbook dynamically, make the jump, then reset the New workbook on embed setting. Here is code I used:
Sub jump2ODS()
Dim myCell As Range, resultRng As Range
Dim ws As Worksheet, myRange As Range
Set myCell = ActiveCell
Set ws = ActiveSheet
If Not BExIsLoaded Then Exit Sub
'ensure that user selected a cell within the query results table!
On Error Resume Next
Set resultRng = Range(ws.CodeName & "_results")
If resultRng Is Nothing Then
MsgBox "Unable to locate query results on " & ws.Name & ".", vbCritical, _
"Unable to jump to ODS query."
Exit Sub
End If
Set myRange = Application.Intersect(myCell, resultRng)
If myRange Is Nothing Then
MsgBox "Please select a cell in the query results table.", vbCritical, _
"Unable to jump to ODS query."
Exit Sub
End If
'set New Workbook on embed ... is based on Permanent Template
Run "sapbex.xla!templatePermanent"
'define the jump workbook as the Permanent Template
wbID = Documentation.Range("M5")
retVal = Run("sapbex.xla!rfcSetTemplate", wbID, "")
'rfcSetTemplate function returns a Boolean
If Not retVal Then
MsgBox "Unable to set workbook for receiver query.", vbCritical, _
"Unable to jump to KPI ODS query."
Exit Sub
End If
'check that jump is valid
retVal = Run("sapbex.xla!SAPBEXcheckContext", "BS01", myCell)
If retVal <> 0 Then
MsgBox "Please refresh query before attempting jump to details.", vbCritical, _
"Unable to jump to ODS query."
Exit Sub
End If
'make the initial jump via RRI to QURY0001
Run "SAPBEX.XLA!SAPBEXjump", "r", "QURY0001", myCell
'set New Workbook on embed ... is selected from list
Run "sapbex.xla!templateChoose"
End Sub
- Pete
Hi Dan, sorry I did not see your question sooner. Was out all of last week.
In that passage, I was referring to setting the "Permanent template on embed ...". I meant to say that "Permanent" can be very temporary (i.e., "dynamic"). From the wording of your question, I suspect that THIS is not the problem you are having. I imagine that you are getting stuck somewhere earlier than this. So, try to explain in more detail.
I assume that you have your two queries already created. And, that both work separately. I further assume that you have successfully "joined" the two queries using RRI. So, you are able to drill-through from query 1 to query 2. But, that each time that you do the drill-through, query 2 embeds in either a blank workbook or in a standard template; but, not in the workbook you want it to. If I am wrong about any of these assumptions, let me know.
Before doing anything in VBA, let's get this to work manually.
Take the workbook that has query 2 embedded and formatted the way you want it and save it to the BW server (I will call it "workbook 2"). For now, you can save it to your favorites if you like.
THIS IS IMPORTANT: if there is more than one query in workbook 2, then the jump-to query (query 2) MUST be the LAST query embedded (if you are familiar with the hidden query sheet SAPBEXqueries, this means that the local query ID will be listed LAST in column F).
On the Business Explorer toolbar, go to the Settings icon. Here, you must do 2 things:
1. Set "New workbook on embed" = "is based on permanent template"
2. Use "Permanent workbook template ...", this will bring up what looks like an Open Workbook dialog. Navigate to workbook 2 and select it.
Now try your drill-through. When you jump from query 1, query 2 will be processed on the server. When query 2 is finished running it will embed in workbook 2, replacing the query 2 that was there when you saved the workbook.
You can now go back to the Business Explorer toolbar and change your "New workbook on embed", if you wish.
Success? If so, do you see the problem with extending this to a wide user base? The problem is that each user will have to do exactly the same thing that you just did. The code that I posted in August automates the changes in the "New workbook on embed" settings so that users do not have to know about these settings.
What the code does is:
+ changes the "New workbook on embed" = "permanent template"
+ uses the server workbook id to tell BW which workbook is the "permanent template"
+ executes the RRI jump
+ resets the "New workbook on embed" back to (in my case) "is selected from list"
This is what I meant by "set this workbook dynamically".
Hope this helps. If not sufficient, post again. I will try to do a better job of keeping up with this real-time.
- Pete
I'm not sure that it's correct with workbook.
You can try : In the SAP Easy Access Menu of the BW system, choose SAP Menu -> Business Explorer -> Query -> Jump Target. You reach the Sender/Receiver Assignment Maintenance screen.
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fabio,
Thank you for your replay.
I already conected between the quaries useing transaction RSBBS (=the same that you suggested) but i cant find any way to connect between two workbooks.
I can save a template workbook insted but it will influence the presentation of all the other quaries as well and i dont want that to happend.
Amir
Hi Amir,
It is required to write macro to connect between two workbook.
Create commond button on first workbook and write following code for jump to other workbook.
Private Sub CommandButton1_Click()
Dim wbID As String
ActiveCell.Activate
wbID = "Target workbook ID"
retVal = Run("SAPBEX.XLA!SAPBEXreadWorkbook", wbID)
If retVal = "" Then
MsgBox "Unable to locate workbook on BW server."
End If
End Sub.
Hope it helps. If you are still finding problems please revert.
Regards,
Aditya
I know this thread is quite old, but I havent found a solution for my particular problem in newer ones as well.
I want to connect between workbooks like described above.
The "SAPBEXreadWorkbook" works fine, but... when I want to jump to and fro or when I press the button twice, the workbook is opened again. But I want it not to be opened again, but just activated.
Is there any solution??
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.