BEx Analyzeru2019s API via VBA
Hello All,
I'm using BI 7.0.
For my workbook, I need to set 5 filters, getting values from 5 Excell cells and then refresh it.
Could you suggest me how to solve this issue and/or an example of VBA code.
Thanks in advance
Hello Massimiliano,
I am afraid that wouldn't be possible, filters are processed within com.sap.bi.et.analyzer.addin.BExConnect automaiton object.
You can only simulate double clicking on a characteristic value by calling addin function.
Sub MyFilter()
On Error Resume Next
Dim iTarget As Range
iTarget = ActiveSheet.Range("F17")
Call pAddin.ExcelInterface.SheetBeforeDoubleClick(ActiveSheet, iTarget, False)
On Error GoTo 0
End Sub
Similar Messages
-
BEx Analyzer - Edit Variables via VBA
Hi all,
I need to set the BEx variable values via VBA to change a selection for an input ready query.
Is there a way to do that?
Thanks a lot.
Best regards,
Christian.I heard that are some functions in BW 3.5 with getBex and setBex.
But it isn`t supported for BW 7.0. -
Control BEx Analysis Grid context menu entries via VBA
Hey Forum,
I have kind of a tricky question for you. I want to control BEx Analysis Grid context menu entries via VBA, namely the Expand Hierarchy Node function when I right click on a Hierarchy node entry.
Does anyone know how to access this function via VBA?
I also thought about adding a BEx button and access it via VBA but I am lacking the correct Button Parameters to expand/collapse a hierarchy node.
Anyone has a tipp for me?
Thanks,
R.Hello, DDrazdou and All too
Did you have any information about requested function?
I need to call binded transaction in R\3, and meanwhile, I just write wrapping functional module in the R\3, and making RFC call from VBA...
It seems to work fine, but may be the better(standart) way is posible.
with best regards, Alex. -
How to set variables values via VBA.
Anybody please help.
How to set variables values via VBA in workbook. SAP Netweaver 2004s.Pass variable values with VBA and BI 7.0 funtions to Query
At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
How to start:
Switch to design mode in BEX Analyzer:
Implement a BEX 7.0 design item u201Cbuttonu201D
Click on the button to implement the properties
Make the input for the commands
data_provider = dataprovider_1
cmd = process_variables
subcmd = var_submit
No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
Make a range somewhere in the excel with the following structure:
Name Index Value
VAR_NAME_1 1 Variablename
VAR_VALUE_EXT_1 1 variablevalue
Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
Set a name for this range with EXCEL functionality but without the header:
Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
If you have more variables to process you can of course enhance your Filterrange!
In the left upper Corner you have a name for your button:
Now you can raise the button-click in vba like this:
Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
regards, Lars -
The BEx Analyzer cannot generate VBA code due to the security settings
Hello experts,
when I try to open a query in BEx Analyser I get this error message for each Item of the Query:
Diagnosis
The BEx Analyzer cannot generate VBA code due to the security settings.
System Response
VBA code is not generated.
Procedure
Choose Tools -> Macro -> Security.
On the Trusted Publishers tab page, select Trust access to Visual Basic project.
Choose OK.
Close the BEx Analyzer and continue working as before.
Access to Visual Basic project is only needed when generating VBA code.
This only takes place in design mode or when 3.x workbooks are upgraded.
Of course I did exactly what was recommanded in the "procedure-section" of this error message. But BEx ist still not working!
I use SAP NetWeaver 7.0 together with MS Excel 2007
Thanks
AxelHello experts,
I am an additional person interested in the way this issue was solved.
I confirm that the issue is coming from the SP2 of Microsoft Office (I have another environnement without the SP2 and everything works well), and I am in a situation where I can't remove the update.
Regards
Guillaume P.
EDIT :
Solution found : I applied the bi710sp10p_1001-10004472.exe patch
(downloaded via the download maanger : Support Packages and Patches - Entry by Application Group" SAP Frontend Components" BI ADDON FOR SAP GUI" BI 7.0 ADDON FOR SAP GUI 7.10)
Edited by: GUILLAUME PETIAUX on Apr 13, 2010 10:29 AM -
How to set a sheet as Ad Hoc via VBA ...
We keep trying to convert our existing workbooks for Smart View.
As you can imagine this is a nightmare process but we keep trying ...
There is some progress and we learnt a lot on the way but we still face some major issues - we find SV with VBA to be an unpredictible combo.
Anyway ...
In simple words I use a sequence of VBA SV API calls to create private connection (HypCreateConnection), to connect the sheet (HypConnect) and to retrieve data (HypRetrieveRange) - along the way I set up SV options and hide the Panel and the POV.
All "by the book" - I wish such "a book" ever existed ... I mean the documentation is far from "in depth" ...
The process works in c. 80% of cases (i.e. grids) but it fails on some (so far I found no correlation with anything else)
I have tried and tried all sorts of tricks to debug it.
It works with ALL grids in 1 in 20 tests but you can never predict when and why.
So it can work but something somewhere causes the process to fail on some grids in most of the tests.
I noticed one detail ...
While the sheet gets connected and retrieved with our process the Sheet Info still shows the sheet status as Empty ...
When working from a blank worksheet and with the Panel open (i.e. NOT via VBA) one of the steps is to click on Ad Hoc Analysis button.
It is unclear to me what exactly this one step does and it does not seem to be connecting or refreshing the grid.
It seems it defines the grid to be an Ad Hoc one.
Can the same be achieved programatically via VBA ?
So far I have NOT found any equivalent API call.
In desperation I am going to replace all HypRetrieveRange calls with HypMenuVRefresh call.
Would it define the sheets as Adf Hoc ?
I will find out ...
Will it help with some odd grids ?
Fingers crossed it will.
RegardsHi Deiter,
You can achieve this with below steps.. I am giving below steps considering you want
to keep the condition type set as Obligatory always in your Pric Procedure
-> Write a custome routine for "Requirement Routine" with the logic : When item category
is ZAN, remove "Obligatory" check from KOMT1-KOBLI.
-> Assign this routine to condition type ZZ00
you are ready to go now.
Why i am suggesting this...
-> Industry best practise, to write minumum codes in user exits (in this case it will be sales user exit),
as it increases system response time
-> If we change someting in user exit, imagine, everytime you are creating a Sales Order, which does
not call for this pricing procedure (with cond typ: ZZ00 ), still this part of user exit code written
to check if item cat is ZAN or not will be called, so why to make system work more when
actually not required
Hope this helps !
Regards
Subhajit -
Scritping the Restful API in VBA
Hi All,
I´m trying to script calls to the Restful API using VBA . This is the code I´m using :
Private Sub CommandButton1_Click()
Set objhttp = CreateObject("MSXML2.XMLHTTP")
URL = "http://vrt0568.bndes.net:6405/biprws/logon/long"
objhttp.Open "POST", URL, False
objhttp.setRequestHeader "Content-Type", "application/xml"
objhttp.send ("userName=plank&password=Cecili@123&auth=secLDAP")
I = 1
End Sub
The problem is that I keep receiving a 401 error (unauthorized).
Does anyone knows what I´m doing wrong ?
Thanks in advance,
RogerioI posted some real sample code a while back for a completely different function (member renames).
Renaming Existing Member Names
So while you'll have to write the calc modification code yourself (or ask Glenn his rate ;-)), this at least shows you how the initialization / login / termination of the API would work. That's probably the most confusing aspect of using the VB API for the first time anyway.
All that said, if this is from Excel and the user will already be logged in via the Excel Add-In, I believe that you can make life much easier and grab the hCtx directly without any initialization / login/ termination worries. I probably should have done that myself in the example I gave. See Tim Tow's posts in this thread:
API
EDIT: Two things I just noticed - first, the code sample I gave even has an example of polling for ProcState, so that gets you closer than I thought! Second, remembered that the line that reads...
While ProcState.State ESB_STATE_DONE
...should actually have a 'less than / greater than' symbol between ProcState.State and ESB_STATE_DONE. Can't get the forum to display them correctly, even in code tags...
Edited by: TimG on May 16, 2011 2:55 PM -
The ForEach Loop Enumerator is Empty - SSIS Error when executing through CMD via VBA
I am currently working on a SSIS package that is to be triggered through CMD via VBA (Access). All that the package does is read a bunch of files from a folder and upload them into a table in SQL Server. The tricky part comes is that this folder location from
which the package is to read the files is dynamic.
I figured out a way to make it dynamic, by using variables
I have used the following variables:
"Directory" against DIRECTORY in COLLECTION>>EXPRESSIONS in the ForEachfile Enumerator,
"FilePath" (With Index 0) in the Variable Mappings
PROBLEM : As the final link in the chain, I have used following to be triggered from VBA
dtexec \f "C:\Desktop\SSISAppend.dtsx" /Set "\Package.Variables[User::Directory].Property[Value];C:\Desktop\AppendFiles"
When I try to execute the package using the above command, it gives out the error
Code : 0x8001C004
Description: The For Each File Enumerator is empty. The For Each File enumerator did not find any files that meatched the file pattern, or the specified directory was empty.
But, when I run the package from MS VisualStudio 2008, the package runs fine, takes the location of the file assigned to the variable "Directory".
All help is appreciatedWhere are you executing the package from? You're giving an aboslute path so this will work only if package as well as the folder is in the same machine from which you execute the above code. Otherwise you need to use UNC path.
Another thing to check is what login is executing the command and you need to ensure it does have access to the directoty path as well as to the path where package resides.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Accessing ribbon via vba ApplicationOptionsDialog
hi,
I am using microsoft access 2010 project (adp). I need to disable the file menu when I distribute the ade to
clients.
the backstage disable has no effect. my customized ribbon below. I only need to a way via vba to turn off the
ApplicationOptionsDialog button! thanks!
Code:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab idMso="TabExternalData" visible="false" /> <tab idMso="TabCreate" visible="false" />
<tab idMso="TabDatabaseTools" visible="false" /> <tab idMso="TabHomeAccess" visible="false" />
</tabs>
</ribbon>
<backstage>
<tab idMso="TabInfo" visible="false"/>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileOpenDatabase" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
<tab idMso="TabRecent" visible="false"/>
<tab idMso="TabNew" visible="false"/>
<tab idMso="TabPrint" visible="false"/>One thing to remember is that backstage commands ONLY work for the system wide ribbon. In other words, you cannot place backstage commands in a ribbon assigned to a given form/report.
And as noted here, your schema definition needs to be changed from:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
To
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
As a general rule, the older ribbon format will work, but not if you using new 2010 features. So backstage commands ONLY work in the application wide ribbon specified for startup. And you need to use the 2009 schema as opposed to 2006 schema.
Regards,
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada -
Hi friends,
While the following commands work great when launched from the T-SQL:
SELECT 'XLS' AS [Version], *
from OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0; Database=C:\Users\faraz.qureshi\Desktop\OldJunk\Book1.xls; HDR=YES; IMEX=1',
'SELECT * from [testdata]')
UNION ALL
SELECT 'XLSX', *
from OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0; Database=C:\Users\faraz.qureshi\Desktop\OldJunk\Book1.xlsx; HDR=YES; IMEX=1',
'SELECT * from [testdata]');
to import from Excel 2003 as well as Excel 2007+ both, what command could help me to achieve the same without interaction with SSMS, i.e. directly from Excel?
In other words, suppose I have a named range in excel testrange
how can I export the same in a new table named Test
in a database named Test_DB that exists on a server and instance named
MyComputer\SQL_FAQ.
Further, is it necessary to close
the Excel File first? Couldn't I export the selected range of Excel?
Thanks in advance.
Thanx in advance, Best Regards, Faraz A QureshiHi FARAZ,
Regarding your description, Your requirement is about some programing approach to export excel to SQL Server, which is out of the queue of this forum.
According to "via VBA" in your question, I would you suggest you post your question to a dedicated
VBA forum. It is more appropriate and more experts will help you.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Password protect javascript via VBA
Hey all,
I need to execute javascript from my VBA code that will password protect my PDF file. I am currently using the method below:
AForm.Fields.ExecuteThisJavaScript password_js
where password_js is a variable with the javascript code in it. I have executed other javascript this way (adding text to the pdf) and it works fine.
The javascript I am trying is from Applying PDF Password Security Using Acrobat JavaScript and works fine when run from within acrobat but it's not working through VBA. One thing I noticed is that when run from acrobat a save dialog pops up but through VBA nothing happens at all..
Anyone know a simple way to do this? The password will be the same each time it is used - currently it is applied using the action wizard in acrobat but if I can run it via VBA after exporting the file to PDF it would be very nice!
Thanks,
JoshUsing JavaScript within a PDF is a little different than processing within an external program or plug-in. You need to add more code to establish the PDF object and the objects within the PDF. You will need to download the Acrobat SDK and study the documentation for VBA.
-
Connecting Microsoft Access with Primavera via VBA
I'm Primavera expert and Microsoft Access as well
I want to know where to start to learn how can I establish a connection or session with Primavera from Microsoft Access via VBA.
Thank you
EmadHello,
I'm not familiar with Primavera P6 and Access. May be you should post the question in the
Oracle Primavera forum.
The following thread is about similar issue, you can try to use primavera SDK provider or ODBC connection:
http://www.planningplanet.com/forums/planning-scheduling-programming-discussion/527878/primavera-p6-software-development-kit-sdk
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
OT: admin api via soap?
Is there any work going on to provide the equivalent of the admin api via
soap?
Thanks,
JohanJohan,
Yes, there is a effort taking place in this area. No official release dates
have been announced.
Jay
"Johan Reinalda" <[email protected]> wrote in message
news:vGA9j.10280$[email protected]. .
> Is there any work going on to provide the equivalent of the admin api via
> soap?
>
> Thanks,
> Johan
>
> -
Using VB API in VBA to edit the Calc Scripts
Guys,
Does anyone of you have VBA source code/examples utilizing Essbase API for the following operation.
I want to copy Calc Script from Server to the client, edit the Script using VBA and copy back the Script to the Server. Any kind of info is appreciated.
Thanks in advance
HYPuserI posted some real sample code a while back for a completely different function (member renames).
Renaming Existing Member Names
So while you'll have to write the calc modification code yourself (or ask Glenn his rate ;-)), this at least shows you how the initialization / login / termination of the API would work. That's probably the most confusing aspect of using the VB API for the first time anyway.
All that said, if this is from Excel and the user will already be logged in via the Excel Add-In, I believe that you can make life much easier and grab the hCtx directly without any initialization / login/ termination worries. I probably should have done that myself in the example I gave. See Tim Tow's posts in this thread:
API
EDIT: Two things I just noticed - first, the code sample I gave even has an example of polling for ProcState, so that gets you closer than I thought! Second, remembered that the line that reads...
While ProcState.State ESB_STATE_DONE
...should actually have a 'less than / greater than' symbol between ProcState.State and ESB_STATE_DONE. Can't get the forum to display them correctly, even in code tags...
Edited by: TimG on May 16, 2011 2:55 PM -
Open BEx Query Designer From VBA
Hi All,
I have a requirement where I have to open the BEx Query Designer by using VBA Code.
When I execute the code the query designer should pop up.
Can anyone please suggest an API for the same.
Thanks for the help in advance.Hi Jacques,
that is a known issue in the toolbar of Crystal Reports.
You can start the Query Designer 3.5 / 7.0 from the BEx menu item
Ingo
Maybe you are looking for
-
Callmanager, Unity Issue with Voice Mail
Hello Guys, I am currently facing an issue with a Callmanager <-> Unity integration. The situation is the following one: All user own a voice mail box. User A forwarded its phone to his voice mailbox. User B forwarded its phone to User A. If now Us
-
Moving from Photoshop CS6 on a Dell to Photoshop CC on a MacBook Air? Options?
In 2013 I'd purchased Photoshop CS6 and have been using it on a Windows based Dell laptop. I recently purchased a MacBook Air and I'm considering the $9.99 Adobe download deal of Photoshop CC. Do I have any other options? Does Adobe offer any type
-
From where I can download Oracle 11i EBS
Hi, From where I can download the Oracle 11i EBS software? The Oracle e-delivery listed only R12. Kumar.
-
Importing with flash drive from windows xp computer?
Have a xp that the music was managed from old verision accout. using a flashdrive i copied wma files. and cant transport to itunes. also having same problem with avi file and imovie.
-
How do I get back sound or volume control that vanished as I was reading Canterbury Tales?
Can you tell me how to get back sound or volume control that mysteriously vanished as I was scanning Canterbury Tales? I still have it for other sites. Any help appreciated.