VBA in BEx: macro call on saving a WB
Hi experts,
I want to know if it's possible to execute macros after clicking on standard button on BEx toolbar "Save an existing workbook"?
For example, the similar macro call for button "Refresh" we implemented as follows:
Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
Call plan_SAPBEXonRefresh(queryID, resultArea)
End Sub
But how can I do this for another button?
Hope for your help!
Thanks in advance,
Mariya.
Hi Mariya,
We have a function 'SAPBEXsaveWorkbook' for maintaining a customization on buttons etc and its not meant for creating action item.
This particular SAPBEXonRefresh provided for defining action items .
We need to know the standard code for accessing that standard save/open buttons which is not in scope of the users.
Similar Messages
-
What is the main purpose of VBA in bex analyser
what is the main purpose of VBA in bex analyser
Hi,
you can enhance standard BEx functionality with VBA Macros (Excel).
Pls chk This link:
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55f9e09411d2acb90000e829fbfe/frameset.htm
Regards
CSM Reddy -
My iphone donot appear the name of the caller although the caller name saved on my mobile
my iphone donot appear the name of the caller although the caller name saved on my mobile
if i save any number with its name.......when its number call me the name donot appearHello waleed101,
I would recommend force closing all open apps on your iPhone, then restarting.
iOS: Understanding multitasking
http://support.apple.com/kb/HT4211
iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
http://support.apple.com/kb/HT1430
Cheers,
Allen -
Hi All
DOes anyone has detail guide document on how to use VBA into BEx reporting tool? Any help will be great help
Thanks
AGHi Al,
Have you checked out the info in sap help:
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55f9e09411d2acb90000e829fbfe/content.htm -
My question is ,
with the recent calls is the a way to save certain calls without saving them as contacts, and delete the others that i dont need? I am a truck driver and i need only certain calls during the day and if i could delete only the ones that arent needed for the day and keep the others that would make the day run smoother. Each is different and when the day is finished then i would delete the ones i needed for the day and start all over again. Is this possible?I think you would have to reinstall the keys seeing that if you format the computer all the data is gone. Even though you backed up that data you never know what can happen when you try to reinstall certain apps. Not sure what method you can go by, you should run a diagnostics test to see how you computer is doing internally.
Goodluck -
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 !! -
Receiving a call from saved number but not showing the name
I have problem with my contacts, after upgrading the IOS to IOS 5.0 I found this issue:
I have some of the contacts which their numbers saved on the phone book and when they call me their name doesn't show and it shows only the number. I tries to make changes such as removing or adding the country code and still no change.
It is not me only because I asked some of my friends and they said they have the same isuue since they upgraded the IOS into IOS 5.0.
Note: I have upgraded the IOS today to IOS 5.0.1 and the same issue and no change.
Help Me PLzzzAnyone can help me in my issue Plzzzzz
-
Default macro is not saving values
We created a macro for a calculation and its updating a KF, the macro is kept in default mode. But when we check the updated KF in a different view, the values are not showing. Though we saved in initial step, the values are not reflecting in different view. The macro is just addition of 2 KFu2019s. Any help is appreciated.
Thx
JeffHi Jeff,
If the values are not saved in liveCache then thevalues of keyfigure in different data view will not get updated. But after running the macro, once you click on save in //sdp94 values should get updated in livecache. I kindly request you to do the following.
Execute the macro, save the value by clicking on Save button.
To confirm whether values are updated or not, what you can do is remove the macro from the default event, then load the selection.
Check if the keyfigure has value after you have saved.
If the keyfigure value is updated in this planning book, then value should get updated in different data view if you are loading for the same selection.
I hope the above information was of some help.
Thanks and Regards,
Nithin. -
Hi Gurus,. I just installed MS 2007. Now when I try to go to BEx Analyzer I get this error message "Object library invalid or contains references to object definitions that could not be found". If I click OK, MS Excel is opened up and I cann see the BEx Add-in in. If I try to click open any Query, I get this message ""Could not find SAPBEX.XLA." and also "Cannot run the macro 'sapbex.xla!repoNewQuery'. The macro may not be available in this workbook or all macros may be disabled"
It was working fine earlier until I re-installed this MS Office and SAPGUI710 on BW3.5
I made sure that the amcros is enabled and active x is on as well. Any ideas as what I ma missing how i can install it?Hi,
Open a command prompt. Then type this:
> CD \Document And Settings
> DEL /S /A:H /A:-H *.EXD
That is what worked for me. Essentially the command recursively deletes all your hidden and exposed exds. That will make all your activeX components load a bit slower the first time you use them again, but it should also clear out the problematic ones.
I got the above solution from:
http://www.ozgrid.com/forum/showthread.php?t=49384 -
In macro call method of object
Hi,
is it possible to call method provides in parameter to macro ?
From the call of my macro i provide object instancied and the name of my method. In my macro i wanted to do : CALL METHOD &1->&2 but it don't work.
I provided you my code which does not function :
REPORT z_erca_test.
CLASS lcl_ee_data DEFINITION
CLASS lcl_ee_data DEFINITION.
PUBLIC SECTION.
METHODS:
get_data_list,
get_data_list_suisse.
ENDCLASS. "lcl_ee_data DEFINITION
CLASS lcl_ee_data IMPLEMENTATION
CLASS lcl_ee_data IMPLEMENTATION.
METHOD get_data_list.
WRITE 'Default'.
ENDMETHOD. "get_data_list
METHOD get_data_list_suisse.
WRITE 'Suisse'.
ENDMETHOD. "get_data_list_suisse
ENDCLASS. "lcl_ee_data IMPLEMENTATION
DEFINE MACRO
DEFINE launch.
data: l_method type string.
l_method = 'get_data_list'.
concatenate l_method &2 into l_method separated by '_'.
write l_method.
call method &1->&2.
END-OF-DEFINITION.
START-OF-SELECTION.
DATA : l_ee TYPE REF TO lcl_ee_data.
CREATE OBJECT l_ee.
launch l_ee 'suisse'.Hi,
partly...
From the ABAP documentation:
+Using the standard ABAP parenthesis semantics you can call methods dynamically.
· Calling an instance method meth:
CALL METHOD ref->(f)
· Calling a static method meth:
CALL METHOD class=>(f)
CALL METHOD (c)=>meth
CALL METHOD (c)=>(f)
· Calling a user-defined method meth:
CALL METHOD (f)
CALL METHOD ME->(f)
+
Regards,
Gianpietro -
Dashboard to BEx query call run time very slow (7-8 mins)
Hi Guys,
I am currently working on a project where BEx query is being consumed using BICS. The functional team has built a BEx which is being cached in Webi by the BO developer and then that cashed Webi is being used in Dashboard. We have many hierarchies (Fund Center, Profit Center, GL Account etc.) used in the dashboard.
BEx query > WEBi (Cached) > Dashboard
Clicking the main level in hierarchy in dashboard the data comes back in 2-3 secs as the data is cached in Webi
ISSUE: In Dashboard based on where user is on the Fund Center hierarchy there is a button called “Summary Report” on the dashboard which calls the BEx query and that second call takes roughly about 7-8 minutes. How could we reduce the run time of the second query?
The secondary query uses the same data set as the first one but as the data is cached in Webi and it uses Web services to pass data to dashboard, so any call back from dashboard to the cached webi the hierarchy information is lost and thus the secondary query call to BEx query.
Would it be possible to recommend any solution where we could bring the run time of the secondary call to less than a minute?
Thanks,
KeysFirst update to current frontend patch. many correction are included.
Further check these notes: (relavant only if Analyzer is culprit)
1160093: REPAIR MODE - Prog error/performance problems when using large workbooks
1289127: REPAIR MODE - BExAnalyzer: performance issue applying styles in Excel 2007
1293255: REPAIR MODE - BExAnalyzer: crash when repairing workbook with Excel 2007
1150242+1094799: ANA_USE_SIDGRID - Improving performance/memory in the BEx Analyzer
1179647: ANA_USE_TABLE - Performance: Network load in BEx Analyzer
1260213: ANA_USE_OPTIMIZE_STG - Performance problems during workbook opening in Excel 2007
1287179: ANA_SINGLEDPREFRESH - Single Data Provider Refresh
1286653: Performance issues while displaying hierarchy (especially in Excel 2007)
1352375: ANA_USE_SIDGRIDWBUF / ANA_USE_SIDGRIDMASS Performance improvements in a WAN (roundtrip reductions)
1373214: Workbook compression
1392745: ANA_CACHE_WORKBOOK - Workbook caching -
VBA and Bex 7- Event to use in VB code BEFORE Query Refresh ?
Gurus.. is there a Bex Event that I can use to 'intercept' a Refresh Query command to Bex and run some VBA first ? I'm trying to find a way to solve the analysis grid overlap problem when two queries are provided on one Excel worksheet, and navigation takes place.
I've been able to figure out how to bring the results areas together (by deleting blank rows between them), but I'd like to be able to add a chunk of blank rows between analysis grids before the queries actually refresh.Hi Charlie,
if you're interested:
I've found a way to move the areas after the refresh - using the callback event.
The logic is generally:
- Check where analysis-grid for DP1 ends
- Leave some empty lines
- Move the offset of DP2 here.
- Repeat the same for further DP's.
There's only one hatch: I've got some trouble to reactivate the BEx-context-menu after this momvement.
So far I found only the workaround "do another refresh" to solve this issue; that's ok but not 'beautiful'.
Let me know if you need further input.
Maybe you've got an idea for my issue:
I'm looking for a way to execute the a routine only once after refresh - even if there are multiple queries in a workbook.
The problem is that I do not know the order of the query-refresh or any flag that I could use to identifiy the "last query to be processed in this refresh-run".
Kind regards,
Marco -
Looking for example workbooks with vba on BEx
Hi,
does anybody have example workbooks including VBA programming for the BEx in excel.
i am using BW 3.5
- such as setting filter values / setting result area for pivot tables
- example of the use of the excel functions that are available in custom functions.
thanks,
JackHi,
Please check this document:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0a89464-f697-2910-2ba6-9877e3088954
Hope this helps.
Regards,
Mona -
BEx Macros for adding a column in workbook
Hi All,
I want to write a VB code for adding a next column to my workbook. I am working in BI 7.0.
I dont know VB so , plz provide me the code for the same.
Can someone guide me or provide the codes for these following functions also:
�� create adhoc report formats with BEx Reports
�� retain the format defined on the Bex reports
�� enhance the report layout with shadow boxes
�� add or remove rows and columns
�� hide navigation and filters
�� hide rows and columns
�� add calculations
�� adjust the print settings dynamically
�� change report title
�� add comments to the report
�� change width, height, color, font etc properties of the cell
Answers will be awarded with points.
Regards..
Vinod.were you able to achieve this? i have the same requirement...please help if possible
-
Dear Experts,
I'm running a BI query to extract data then used VBA code to import external data from another Excel file. After storing the external data in a variable, I'm having trouble getting back to my original worksheet using VBA command Windows("Step Pricing Query.xlsm").activate.
Query Name: Step Pricing Query
Workbook Name: Step Pricing Query.xlsm
I've checked the spelling and the file extension. It doesn't seem to work. I'm doing something wrong or my method is incorrect? Your help is appreciated.
Thanks,resolved.
Maybe you are looking for
-
How to backup and restore working Mac OS 9 computer ?
I have a working G4 running OS 9.0, and I would like to backup and restore that hard disk to a second G4 computer that is OS 9 bootable. I have a CD backup taken by Toast v4, of the entire disk, but I do not know how to restore the contents to the se
-
My Thinkcenter Edge 72Z had Windows 8 Single language preinstalled. Due to problems, the C drive was reformatted and subsequently Windows 8 Pro is installed on the computer (apparently from wrong version RDVD). However, because the original preinsta
-
Report with top 10 tables ...
Hello ! I need to create an report with the top 10 tables : 1 - The most bigger tables 2 - The most access tables 3 - The bigger number of sorts 4 - The physical access 5 - The bigger shared memory use The first one i can get from dba_segments, but t
-
Report pianter report issue (Cost center Heirarcy issue)
Hi, Please consider this issue as an emergency and reply, when I execute a report painter report for highest cost center heirarchy, all cost centers are appearing at level 2, (cost center group level) in the report, but when I execute the same report
-
Select query... a tricky one
I have 2 tables : EMPLOYEE table: Employee_Id Parent(Y/N) 1 Y 2 Y 3 N 4 N 5 Y 6 Y 7 N 8 Y 9 Y 10 Y 11 N 12 N 13 N 14 N EMPLOYEE_RELATION table: Parent_employee_id Child_employee_id 1 4 2 13 5 14 6 11 8 3 9 12 10 7 Clearly, the EMPLOYEE table has 14 r