Call Bex Workbook from browser through ActiveX or OLE
Hello. I have to run bex workbook from browser. I found out that I can do it through ActiveX and "SAPBEX.XLA!SAPBEXgetConnection", but I didn't succeed. Can anybody help me out?
Vanessa,
Please do not raise the same post across forums ..
/thread/1257238 [original link is broken]
the above thread is being considered as duplicate and being deleted - because this particular post has been raised in the correct forum..
Similar Messages
-
Calling Bex Workbooks from the Web Dynpro
Hi All,
I'm calling Bex Workbooks from my dynpro using the following code:
create reentrance ticket
call function 'CREATE_RFC_REENTRANCE_TICKET'
importing
ticket = l_ticket
exceptions
ticket_logon_disabled = 1
ticket_creation_failed = 2
kernel_too_old = 3
others = 4.
check sy-subrc = 0.
system number
call function 'GET_SYSTEM_NUMBER'
importing
instancenumber = l_sysno.
create the shortcut
CONCATENATE '[System]' cl_abap_char_utilities=>cr_lf
'GuiParm=' sy-host ` ` l_sysno cl_abap_char_utilities=>cr_lf
'Client=' sy-mandt cl_abap_char_utilities=>cr_lf
'[User]' cl_abap_char_utilities=>cr_lf
'Name=' sy-uname cl_abap_char_utilities=>cr_lf
'at="MYSAPSSO2=' l_ticket '"' cl_abap_char_utilities=>cr_lf
'Language=' sy-langu cl_abap_char_utilities=>cr_lf
'[Function]' cl_abap_char_utilities=>cr_lf
'Title=' cl_abap_char_utilities=>cr_lf
'Command=*RRMXP WBID=' l_workbookid cl_abap_char_utilities=>cr_lf
'Type=Transaction' cl_abap_char_utilities=>cr_lf
'[Configuration]' cl_abap_char_utilities=>cr_lf
'GuiSize=Normal window' cl_abap_char_utilities=>cr_lf
'Workplace=true' cl_abap_char_utilities=>cr_lf
'[Options]' cl_abap_char_utilities=>cr_lf
'Reuse=0' cl_abap_char_utilities=>cr_lf
into l_content.
lo_conv = cl_abap_conv_out_ce=>create( ).
lo_conv->write( data = l_content ).
l_content_x = lo_conv->get_buffer( ).
concatenate l_workbookid `.sap` into l_filename.
cl_wd_runtime_services=>attach_file_to_response(
i_filename = l_filename
i_content = l_content_x
i_mime_type = `application/octet-stream`
i_in_new_window = abap_false
i_inplace = abap_true ).
Most of the time it's working fine - but some user experience a "Host Unknown" failure ?? - I suspect than it has something to do with contacting Excel, but I can't figure out exactly what goes wrong. The users have all needed componets of course, and they can run Workbooks from SAP GUI without getting this error.
Thanx Ahead.Look at below link: it might help you.
[WAD URL Call for BEX|/thread/268199 [original link is broken];
Raja -
How to call BEx workbooks from EP?
Hi!
How to call BEx workbooks from EP (in new window)?
P.S. For creation iView for workbooks I use "Role Upload" in Portal (System Administrator -> Transport -> Role Upload). Automatically created iView (for workbooks), unfortunately, do not work (bad argument in RRMXP transaction).Maxim
The role migration does not do this properly so you will have to do this manually.
Create a transaction iview using transaction RRMX. Then add the following to the Application Parameter field
WBID=XXXXXXXXXXX (the workbook ID).
Then change the AutoStart Parameter to True.
Viola! -
Call BEX-Query from VBA with BEX-automatic login?
Hi,
I'm trying to call a query from VBA. I have two problems/questions:
1. Automatic login?
I want to do an automatic login. I found this peace of code here, but I get an error:
Public Function LogonToYourBW()
' create Logon & RFC-Handle
logonToBW = False clear connect Flag the flag can be used to find out if connected or not
'load SAP functionality by opening BEX file ( use your installation path)
Workbooks.Open (c:\sappc\bw\sapbex.xla)
With Run("sapbex.xla!sapbexGetConnection") call the connection
' Set the params for Auto logon
.client = YOUR CLIENT NO
.user = YOUR BW USER
.Password = YOUR BW PWD I recommend to create a dummy reporting user for this task
.Language = YOUR LANGUAGE YOU LIKE TO USE FOR QUERY DISPLAY ( i.E. EN)
.SystemNumber = YOUR SYSTEM NO
.ApplicationServer = YOUR SERVER Name OR IP-ADDRESS
.UseSAPLOgonIni = FALSE 'important for automatic connection
.logon 0, True This will provide a dialog to appear
If .IsConnected <> 1 Then
.logon 0, False
If .IsConnected <> 1 Then Exit Function
Else
Set g_oFunction = CreateObject("SAP.Functions")
Set g_oFunction.Connection = g_oConnection
End If
End With
Run "sapbex.xla!sapbexinitConnection" this will enable the connection you just created
logonToBW = True
End Function
The error is by this row:
Set g_oFunction.Connection = g_oConnection
Object is needed! How is the g_oConnection-object defined?
2. How can I pass values for the parameters from VBA?
If I open the query usually from SAP-BEX-Toolbar, after selecting the query, I get a parameter mask, where I must put in a value. How can I this automatize from VBA? Has anybody a short samplecode for that?
Thank you for your help
Stefan
[email protected]Peter and others:
What I really want to do is write a stand-alone application that I can run from windows scheduler that queries our BW for sales data for certain items (in a tabular form) and pulls that data into a VB recordset, or a .NET dataset so that I can insert the rows into another database (SQL Server, or Access) I already know how to do all the data movement to/from datasets and databases I just cannot figure out how to programmatically grab this sales data from BW our company has workbooks already set up that aggregate WW sales information by region (IE, there is a separate workbook for each region of the world) I can manually go into the Excel interface, tell it which items to pull the sales info for, and it dumps the data into the worksheet (organized by customer, and then by cat #)
So, what Id like to do is write an app that will pull data every week or so from the BW (from each regions sales invoice detail workbook), and insert it into another database that we use for reporting other, non-sales, data.
Thoughts on this ? Is there another, non-BEx method that is better ?
thanks !! -
Javascript Error while executing BEx querry from browser
Hi Folks
We have been getting a number of Javascript errors while executing BEx querries from the browser.
The various errors that we have been getting are:
'SAPBWItemCatalog' is undefined
'SAPBWJSgdo' is null or not an object
'SAPBWShortCutCatalog' is undefined
We have already looked at SAP Note 783496 and validated the solution.
Is there some specific settings that needs to be maintained for this?Hi Sandip,
Just spent 2 hours chasing this one so I know how frustrating it is.
Solution:-
Check mime service in SICF - dafault_host/sap/bw/mime - if it's greyed out activate it.
Regards
Nev -
How to copy BEx Workbooks from one user's favourites to another user's
Is there a way to copy BEx Workbooks (Excel Analyzer) from one user's 'Favourites' to another user's Favourites?
A user is away on vacation and we need to get at a couple of workbooks that are stored only in that user's Favourites. We do not have access to that user's user id and password.
Were on BW version 3.5.Thanks Ravi.
We are aware that if a workbook is assigned to a Role then other users can access the workbook.
In order to assign the workbook to a Role, we need to be able to see it in the first place.
The workbook is currently saved only in a specific user's Favourites, and that user is away on vacation. We can not assign it to a Role unless we sign on as that user. We do not have the user's logonid and password.
So we are still interested in finding out how to copy from that user's Favourites, perhaps via a program or via the Administrator Workbench. -
Call Bex Workbook with parameters via ABAP
Dear all,
I have a problem with Excel workbook run from the functional module and transfer parameters to it.
For this purposes I have used FM RSAH_LAUNCH_EXCEL. I use SAP BW 2004s version.
In fact this FM opens the Excel workbook but these parameters (that were defined in the table I_T_VAR) are not available in Excel. The window with variables pops up anyway and fields in this window are empty.
What I would like to do finally is to run this Excel workbook, send some parameters to avoid of appearing this window. It was possible to do in Sap BW 3.5 (according to my experience). Probably it is possible to do in some other way in 2004s? If you know please give me a clue.
One more question: I try to use the function SAPBEXsetVariable() in BeX that I used to use in 3.5. In 2004s it is not available. Does somebody know what can be used instead of it in 2004s?
Thanks in advance.How about putting values of variables into filter area of WB?
-
Open Bex workbook from BPS web interface,How hard it could be?
Hi all,
I want to add a link or function-button in my BPS web interface,hope it could open a query(excel analyser),I tried 2 methods as follow:
1. MIME , It can only open a static excel file, not a analyser query. I gave up this method.
2. I use the program RRMX_START_EXCEL and add a plan function which is a EXIT in BPS0,in my EXIT function I used some code in RRMX_START_EXCEL,I test it in BPS0 ,it works ,it can open a analyser excel query.But when I put this plan function(including a parameter group ) in BPS_WB ,when I click the function-button in web interface, it crashed,says:
Error when processing your request
What has happened?
The URL http://bw1.:8000/sap/bc/bsp/sap/zwebcaxa001_998/page1.htm was not called due to an error.
The termination type was: TH_RES_FREE
and some other Error infomation,
Is it possible to realize my requirement? or Web interface and analyzer are just 2 total differrent things ,it is not possible to realize this?
thanks allHi Denny,
Have a look at www.javascript.internet.com and do a search for "whatfile".....
This should give you the javascript code whereyou can enter a file name (say an excel file name) and click a button to navigate to it.
Although I have not tried exactly what you have asked, I have successfully used parts of this code to open specified files (excel files) on our local directory from a BPS planning web page.
Obviously you will need to adapt the code to your specific evironment/situation...
Good luck.
Rael -
Call Workbook from another Workbook
Hello,
I want to call a Workbook from another Workbook just like calling a Query via Report-Report-Interface with restrictions from the selected line.
Does anybody know, if this works in Excel?
Thank you for your answers!
AndreasHi Andreas,
San's response will open the workbook. If you want to also refresh the queries in the workbook, you have the option of setting workbook properties (see the Interaction tab in the BEx Workbook properties dialog) to refresh all queries when the workbook opens; or, use
Run "sapbex.xla!SAPBEXrefresh", True
But, you also mentioned restrictions (filters?) based on the line selected. You can do this using
ReturnValue = Run("SAPBEX.XLA!SAPBEXSetFilterValue", myFilter, "", myRange)
I would suggest an entirely different approach, however. I would suggest that you actually do use RRI; and, if you want to have the RRI query open a particular workbook (instead of in a blank workbook), you set the local properties to "Use permanent template" ... and define the workbook you want the RRI query to embed in as the "permanent template". Then, after the RRI query refreshes and embeds, change the embed option back to whatever the user's default was before.
Here is example code to achieve this:
Sub jump2KPIODS()
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 KPI 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 KPI ODS query."
Exit Sub
End If
'set New Workbook on embed ... is based on Permanent Template
Run "sapbex.xla!templatePermanent"
'define the KPI ODS 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 KPI 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
NOTE: the RRI jump query will embed on top of the LAST query embedded in the "target" workbook. So, if there is more than one query in the "target" workbook, be sure that the jump query is the LAST one embedded.
- Pete -
BEx workbook does not open from portal when excel is already opened
Hi all,
When I go to the portal and open a BEx workbook from there while excel is already open, then the workbook does not open.
When I close excel and then open the BEx workbook it all works fine.
I do not get any error: just nothing happens.
Any idea how to solve this?
Versions:
BI 3.5
Excel 2003
ADDITIONAL INFO
I found this only happens when excel is open with a cell in edit mode. Whenc I then open BEx from the portal I get the error 'please install suitable version'.
Let my know if you have any advice.
Message was edited by:
Arjen de Ruiter
nullNo solution for this.
-
Hello Gurus.
I wonder if there is an option to call a workbook from a web query.
I need to open a workbook from a web link or from a web query.
How can i do this??? i don't have SAP portal
Thanks in advance.learn about BSP from this link
http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
create the following BSP application.
1. go to se80 and choose BSP application from the dropdown and enter a name for hit and hit enter, the system will prompt you to create it, create the same .
2. add a page to the bsp application with .xls externsion. (wbviewer.xls)
3. declare the following page attributes
file_content TYPE STRING
file_xcontent TYPE XSTRING
wa_wbdata TYPE RSRWBSTORE
wbdata TYPE RSR_RPEC_BIN_FILE
wbid TYPE RSSGUID25
for wbid attribute make sure auto checkbox is checked.
4. clear all the default code from layout section.
5. in oninitialization event enter the following code.
refresh wbdata .
clear: file_content .
data: temp_string type string .
select * from rsrwbstore into table wbdata
where workbookid = wbid.
if not wbdata[] is initial .
loop at wbdata into wa_wbdata.
clear temp_string .
temp_string = wa_wbdata-clustd .
concatenate file_content temp_string into file_content .
endloop.
clear file_xcontent .
file_xcontent = file_content .
call method response->if_http_entity~set_data
exporting
data = file_xcontent.
endif .
save and activate the page and application.
now if you call the following url, it will open the work book and the same url can be set in your webtemplate.
http://<bwhost>.<domain>.com:<port>/sap/bc/bsp/sap/<bspapplicationame>/pagename.xls?wbid=<workbookid>
Hope this helps.
Regards
Raja -
Calling Javascript from Flex through FAB
What's the standard way of calling JavaScript functions from
Flex through the FA Bridge?
i.e. is there a new way other than navigateToURL or
ExternalInterface.call()
Most of the examples I've seen are scripting Flex from
JavaScript, not the other way around.
Thanks.Hello,
You need to register the JavaScript function as a callback to
a Flex action. You can do this from javascript in a function that
gets called when the flash movie has finished loading. Then, when
the Flex event is triggered it will execute the JavaScript
function.
Hope this helps,
Cristian -
Executing BW Workbooks from EP as background process
Hi all!
I need to execute BEX workbooks from Enterprise Portal with automatically predefined values of variables. Iu2019d like to do this in two ways: normal (ordinary way) and as background process (result: xls. file). Can you help me?Hi Alzatula,
You can do this in information broadcasting.
You can configur broadcast settings for workbooks.
The prerequisite is you need a precalculation server.
Check on sdn, how to register a precalculation server.
You can execute it in foreground or you can schedule it in background.
Check this link, it may help you to set up the broadcast setting.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00172934-f3c1-2b10-728a-c42a0fc28c61
Check this how to as well
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d09dea78-b61a-2b10-c7ad-acd94d64079a
Information broacasting can be called through BEx broadcaster in EP.
Hope it helps,
Regards,
Sunmit. -
Executing BW workbooks from EP as back groun process
Hi all!
I need to execute BEX workbooks from Enterprise Portal with automatically predefined values of variables. Iu2019d like to do this in two ways: normal (ordinary way) and as background process (result: xls. file). The question is how to execute Bex analyzer in background mode?
Thanks.Hi Alzatula,
You can do this in information broadcasting.
You can configur broadcast settings for workbooks.
The prerequisite is you need a precalculation server.
Check on sdn, how to register a precalculation server.
You can execute it in foreground or you can schedule it in background.
Check this link, it may help you to set up the broadcast setting.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00172934-f3c1-2b10-728a-c42a0fc28c61
Check this how to as well
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d09dea78-b61a-2b10-c7ad-acd94d64079a
Information broacasting can be called through BEx broadcaster in EP.
Hope it helps,
Regards,
Sunmit. -
Iview in portal PA to open BEx workbook in a different server
Hello gurus!
It is my first post in this forum, so I hope I can be clear enough. I am facing a client request for which I have not found any documentation of how it could be possible. I will explain more or less the requirements. I have been searching through the forums and I could not find anything.
We have 2 production servers PA and PB. The portal is working over the PA. Is it possible to create an Iview in the PA portal to link somehow and get a BEx workbook from the PB BW server opened? Do you know of any document or guide on how to do it?
Thank you very much in advanced,
VictorHi Lawrence,
Using this link I created the iview. Then in collaboration with the basis we configured the system landscape correctly and now it works perfectly
BEx Analyzer Workbook as an iView in the Portal - Business Intelligence - SAP Library
Kind Regards
Victor
http://help.sap.com/saphelp_nw70/helpdata/en/4d/f3fa40badbf36fe10000000a1550b0/content.htm?frameset=/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm¤t_toc=/en/e3/e60138fede083de10000009b38f8cf/plain.htm&node_id=1856
Maybe you are looking for
-
Problem with revoking accounts on deprovisioned Date
Hello, I am setting the De-provisioning date for a user manually from UI to the current date(tried with yesterday's date too). After I submit, I ran the "Set User Deprovisioned Date" Job. It has updated the user deprovisioned date field, but the user
-
Failed to update payment information
I had tried to update my applications but it seem like need me to update my payment information. Once I update my payment information and it shows decline, I had try few cards to update it and it keeps showing "your payment method was declined. Pleas
-
CS4 downloaded raw 5.7 still cant open cr2 files on windows 8 HELP!!!
Does CS4 work ok on windows 8 I have purchased a new windows 8 laptop and installed CS4 and I could not open my CR2 files so I downloaded raw 5.7 convertor and still nothong can you please help.
-
What to do when the client asks for changes after final audio mix?
Sometimes a client will want changes after the final audio mix has been done. That is, I've already sent the project from Premiere Pro to Audition, done a master mix, and sent it back to Premiere Pro. If I'm then asked to make changes to the video, I
-
Slideshow Keeps Looping after a few images
My slideshow keeps looping back to the first image after displaying 2-5 images. It displays them in the correct order (I don't have 'random' turned on). I can get it to display the images correctly if I set 'Slide Duration' to .1 seconds (with no fad