Bex Excel VBA Save Workbook as New Workbook
Hi All,
I'm trying to write VBA to save a workbook back to the SAP server with a new name. Basically the code will have to emulate the "save as new workbook" button on the on the bex toolbar except we would already have the new name defined. I know there is a vba function sapbexsaveworkbook but I don't believe it can accomplish what I want to do.
Any help would be greatly appreciated.
Thanks,
Jon
Jon,
The BEx API Function you are referring to would be called with the following line of code:
Run "SAPBEX.XLA!saveNewWorkbook"
I think it will do exactly what you describe that you want. Try it, and if it does not do exactly what you want, please explain.
- Pete
Similar Messages
-
Regarding Saving the New WorkBook
Hi All,
I have a query that I want to save as a New workbook. I am able to save the workbook in Favorites. But I am unable to save it as workbook under SAP Developer Role. The error that I am receiving is "Workbook does not exist in the document store."
I checked the authorizations with the Basis people and the authorizations for the SAP Developer are correct.
Why am I receiving the error and unable to save the work book.
Regards
YJHi,
Check with the basis people if you have the proper authorization:
S_USER_AGR: ACTVT = 02,
ACT_GROUP = [name of the role you are editing]
S_USER_TCD: TCD = RRMX
See OSS Note #829008 - "Workbook storage fault 330 in Bex Analyzer".
Best regards,
Eugene -
BEx 7.0 - Save EXCEL 2007 workbooks in .XLS - format
Hi there,
I am currently creating some workbooks with BEx 7.0 .
I am using Excel2007, so the workbooks are saved as .XLSM files. However, it should be possible to open them with an Excel 2003 installation as well, so I tried to safe the workbooks as .XLS files.
I tried to proceed according to SAP OSS note 1052761 (changing the default format in which workbooks are saved to Excel 97 - 2003), but this did not work (the note also only aplies to BEX 3.5).
(I tried saving an old workbook under a new name as well as creating a new workbook from scratch. In both cases, .XLSM files where created and EXCEL 2003 users received error messages when trying to open the workbook).
Does anyone have a piece of advice for me?
Thanks in advance.
Tanja[Hello Tanja,|http://chandranonline.blogspot.com]
See this OSS Note
SAP Note 1061607 BW 70 BEx: FileExtension & Personalization (Development)
SAP Note 1089212 BI Addon (7.10): not able display workbooks with Office 2007
SAP Note 1013140 BI Frontend / BW Add-on - General Information & Limitations
[Thanks|http://chandranonline.blogspot.com]
[Chandran|http://chandranonline.blogspot.com] -
Copy and open i new workbook - vba
Hi All
I have the excel workbook "CENEO Quickview v.05.xlsm" with dozens of worksheets in it.
What I need is vba to :
1) Copy all Worksheets to new workbook with name: "CENEO Quickview 2015.02.15.xls"
Where 2015.02.15 is current date. I do not want to save it as a new workbook but only
open as a new workbook with the above name and with freezed formulas. After that:
2) Close the original file without saving "CENEO Quickview v.05.xlsm". Please note that the orignial file name could change in the future to for example: "CENEO Quickview v.022.xlsm".
Thanks for any suggestionsRe: "...this code must be placed in original file "CENEO Quickview 2015.02.15.xls"
In your initial post the original file was "CENEO Quickview v.05.xlsm" ?
To copy all the sheets in a workbook to a new workbook the following code can be used.
Note: that a new workbook has the default name of BookX until the file is saved.
The new workbook can be made to appear as if it had a name applied by entering text in the window caption.
Sub CreateNewWorkbook()
Dim WB As Workbook
Dim sht As Object
Set WB = Workbooks.Add
For Each sht In ThisWorkbook.Sheets
sht.Copy after:=WB.Sheets(WB.Sheets.Count)
Next
WB.Windows(1).Caption = ThisWorkbook.Name & Format(Date, "yyddmm") & ".xls"
End Sub
To run code when a workbook opens, use the Workbook_Open event found in the ThisWorkbook module.
In that module, in the top left dropdown, select "Workbook"
In the top right dropdown, you can select the appropriate event you need.
The code would look something like...
Private Sub Workbook_Open()
Call CreateNewWorkbook
End Sub
Note: Copying worksheets to a new workbook does not copy any code modules.
You probably don't want to go there as it can get messy. Other contributors may offer code to do this, I won't.
Jim Cone
https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2 -
Is it possible to publish Bex Excel workbook into portal?
Hello,
Is it possible to publish Bex Excel workbook into portal?
ThanksHi,
Publishing BW workbook in portal can be done in two ways.
1)Using RRMXP transaction
/people/arunkumar.sampathkumar/blog/2006/08/09/publishing-bw-workbooks-into-portal
2)Using information broadcasting in portal and publishing into the KM folder
For information broadcasting - you have to install the precalculation server in the portal server.This is needed for precalculation of the workbook.After installing the precalculation server start the corresponding service.If you execute transaction "RSPRECADMIN" in BW, it shows the status of precalculation server, Whether it is running or not
After doing this. Assign the BEX role inthe portal to the user.Now from this screen you can broadcast the BW workbook
Also you can create an iview for the same.
http://help.sap.com/saphelp_nw04s/helpdata/en/4d/f3fa40badbf36fe10000000a1550b0/frameset.htm
Hope this helps.
thanks,
rahul -
Delete workbook from repository from Bex Excel Interface
Hello,
Is it possible to delete a workbook from the repository from Bex Excel Macro.
Yesterday I have lost a workbook (is not anymore in the table RSRWORKBOOK) but the program RRMX_WORKBOOKS_DELETE was not used.
Since it was transported I have re run the Transport order so everything is fine but I can not explain.
thanks for helpHi,
A workbook can be deleted using function module RRMX_WORKBOOKS_DELETE (execute using Transaction SE37 and Test). Parameter workbook ID (I_WORKBOOKID) and object version (I_OBJVERS) must be specified.
check this sap help link....it might help you....
http://help.sap.com/saphelp_nw04s/helpdata/en/54/a493f7256b43698191a2623e5a0532/frameset.htm
please read the sap help link as well...it might help you...
Message was edited by:
Swetha G -
How to save querys to a workbook
Hi Pioneers
I have three queries which i need to group them in a workbook...Could u plz tell in steps how to create a workbook and include the queries in to that...
BR
RAviHi,
Execute the Query and save it as Work Book.
Save (from BEx too bar)->save as new work book>Provide description and click ok.
go to Tools (Bex tool bar)-->insert Query to insert more queries in the same wok book..
Before inserting new Query,make sure that you maintained appropriate number of worksheets (with excel functionality)
regards -
How to insert a query into a NEW workbook ?
Hi Friends,
Could some one tell me how to insert a query into a new workbook? i am trying to run query in NW2004S BEx Query Designer, which always open the query on web when executed. i want to run the query in NW2004S BEx Query Designer and want it to open the result in Excell.
If i am not wrong then to do the same, i need to embed the query into workbook. Correct me if i am wrong. If i am right then plzz tell me the steps to insert the query into workbook.
Ur help will be rewarded in terms of points.
Thanks,Hello,
If you open the BEx Query Designer from the desktop, you cannot execute the query directly to the BEx Analyzer for an Excel view. You can only execute it directly to the Web. This is true for the SAP BW 3.x version as well as the SAP NetWeaver 2004s version.
If you open the BEx Query Designer from within BEx Analyzer, once you select (or create) your query, you will have a green check mark icon that will then allow you to deploy the query directly to the BEx Analyzer for the Excel view.
However, this would only make sense if you are creating or modifying the query. If not, you would simply open BEx Analyzer and use the Open Query option in this tool to see your query in an Excel format, as has been previously suggested by the other respondents to this posting.
Regards,
Katie Beavers
SAP NetWeaver Product Management -
Excel 2010 Crashing on .xlsm enabled workbook
Hi,
I have a workbook that I had been using for over a year with a very simple formatting macro in it. As of about two weeks ago, adding new data to the spreadsheet causes Excel to crash, rendering the workbook as corrupt. I have started fresh with
a new workbook and re-recorded the macro at least a dozen times, and it will run once - maybe twice - and then, when new data is put into the workbook, it crashes. The weird thing is, I have anothe workbook that also has a simple formatting macro
in it and that one runs fine. Both worksheets get the data from the same source, which is copied and pasted into the workbook with the macro.
Any ideas?????
Thanks!
NancyHi,
Have you tried some general steps to troubleshoot this issue? For example, Repair Office. If not, please try this KB and check if they are helpful:
http://support.microsoft.com/kb/2758592/en-us
If this issue still exists, we need to collect the event log to do further troubleshoot.
Steps: Open Event Viewer to check whether there's any error about the Excel/Word crash issue.
Press Win + R, type "eventvwr" in the blank box, press Enter. In the Event Viewer, browse to Windows Logs -> Application, there may be some errors after the crash.
To protect your privacy, you may send the error logs to
[email protected], we will try to find the cause.
Regards,
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
OLE error (instead of opening a new tab it is opening a new workbook)
Hi friends
we have a requirement of passing the data from ITAB to excel
the code is hown below
INCLUDE ole2incl.
DATA: excel_object TYPE ole2_object, "EXCEL OBJECT
workbook_list TYPE ole2_object, "LIST OF WORKBOOKS
workbook TYPE ole2_object, "WORKBOOK
cell TYPE ole2_object, "CELL
font TYPE ole2_object, "FONT
activesheet TYPE ole2_object."ACTIVE SHEET
TABLES: pa0002.
DATA row_number TYPE i.
DATA: it_pa0002 LIKE pa0002 OCCURS 10 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM pa0002 INTO TABLE it_pa0002 UP TO 10 ROWS.
CREATE OBJECT excel_object 'EXCEL.APPLICATION'.
SET PROPERTY OF excel_object 'VISIBLE' = 1.
CALL METHOD OF excel_object 'WORKBOOKS' = workbook_list.
CALL METHOD OF workbook_list 'ADD' = workbook.
GET PROPERTY OF excel_object 'ActiveSheet' = activesheet.
SET PROPERTY OF activesheet 'NAME' = 'EMPLOYEE_RECORD'.
* FILL THE ACTIVE SHEET WITH COLUMN HEADINGS
PERFORM fill_cell_with_data USING 1 1 1 'Employee Number'.
PERFORM fill_cell_with_data USING 1 2 1 'First Name'.
PERFORM fill_cell_with_data USING 1 3 1 'Last Name'.
PERFORM fill_cell_with_data USING 1 4 1 'Date of Birth'.
PERFORM fill_cell_with_data USING 1 5 1 'Place of Birth'.
* FILL EMPLOYEE DATA TO ACTIVE EXCEL SHEET
LOOP AT it_pa0002.
row_number = sy-tabix + 1.
PERFORM fill_cell_with_data USING row_number 1 0 it_pa0002-pernr.
PERFORM fill_cell_with_data USING row_number 2 0 it_pa0002-vorna.
PERFORM fill_cell_with_data USING row_number 3 0 it_pa0002-nachn.
PERFORM fill_cell_with_data USING row_number 4 0 it_pa0002-gbdat.
PERFORM fill_cell_with_data USING row_number 5 0 it_pa0002-gbort.
ENDLOOP.
*FREE OBJECT EXCEL_OBJECT.
CALL METHOD OF workbook_list 'ADD' = workbook.
PERFORM fill_cell_with_data USING 1 1 1 'Employee Number'.
PERFORM fill_cell_with_data USING 1 2 1 'First Name'.
PERFORM fill_cell_with_data USING 1 3 1 'Last Name'.
PERFORM fill_cell_with_data USING 1 4 1 'Date of Birth'.
PERFORM fill_cell_with_data USING 1 5 1 'Place of Birth'.
* FILL EMPLOYEE DATA TO ACTIVE EXCEL SHEET
LOOP AT it_pa0002.
row_number = sy-tabix + 1.
PERFORM fill_cell_with_data USING row_number 1 0 it_pa0002-pernr.
PERFORM fill_cell_with_data USING row_number 2 0 it_pa0002-vorna.
PERFORM fill_cell_with_data USING row_number 3 0 it_pa0002-nachn.
PERFORM fill_cell_with_data USING row_number 4 0 it_pa0002-gbdat.
PERFORM fill_cell_with_data USING row_number 5 0 it_pa0002-gbort.
ENDLOOP.
FREE OBJECT excel_object.
*& Form FILL_CELL_WITH_DATA
* text
* -->ROW text
* -->COLUMN text
* -->BOLD text
* -->VAL text
FORM fill_cell_with_data USING row column bold val.
CALL METHOD OF excel_object
'CELLS' = cell
EXPORTING #1 = row
#2 = column.
SET PROPERTY OF cell 'VALUE' = val.
GET PROPERTY OF cell 'FONT' = font.
SET PROPERTY OF font 'BOLD' = bold.
ENDFORM. "FILL_CELL_WITH_DATA
According to this code , i am populating the same set of values in two tabs
but instead of opening the second tab after filling the first tab
it is opening a new book
please correct me.
with regards
s.janagarhi santhosh,
the RSOLETT1 is a module pool program
and the program RSDEMO01 is calling once the workbook and filling one tab
and that requirement is been satisfied in my progrm itself
the thing is i need to populate the second set of loop into another tab of my excel sheet
please correct my code
dont provide me the sample code
because my code is almost correct i guess
a small piece of code needs to be added or changed
cheers
s.janagar
Edited by: Janagar Sundaramoorthy Nadar on May 5, 2009 10:35 AM
Edited by: Janagar Sundaramoorthy Nadar on May 5, 2009 10:35 AM -
Save own styles in workbook theme
Hi experts,
I have created own styles in my workbook which I want to use as global standard template for the whole company reporting. How can I save these styles in the theme? Even if I name my style SAPBEX* it is not shown in the list ob avalaible styles which can be used to update the theme in the workbook settings.
How can I update already created workbooks with new style created in the global standard template? Do I have to create the new style manually again in these workbooks?
Thanks in advance for your advise.
AnjaUnfortunately, you still have not clarified. Since this forum is a 'Design' forum - and not software specific, there is no way I can know what software you are talking about to give you an answer.
Are you talking about Photoshop CS3 Extended? Or are you talking about InDesign, Dreamweaver - or another application?
elaine -
We have upgraded to BI7 and When I am trying to save a query as workbook
Hi,
we have upgraded to BI7 and When I am trying to save a query as workbook and open it is opening but a junk data is getting displayed in the excel workbook.The excel version is 2007.
But when I tried the same with excel version 03 it is opening fine with valid data.
Pl help.
Thanks in adavance,Thanks Bernd: I am using Adobe Acrobat 10 Pro. I did get a response from Dave Marchant which directed me how to find the layers icon and I found the options icon as suggested in Adobe Help. However, the options do not allow me to choose an option of either merging layers or flattening layers. I am a novice at this and am trying to get this 1-page pdf graphic to convert to a Word document. Is it possible that I already have a single layer pdf and that Word is doing something weird during the conversion? I tried to convert the document yesterday and I ended up with two pages in Word. One page had the text boxes and one had the river channels on which the text boxes had been inserted. This is not a document I created. We have been struggling for 5 years at various times to get this one page document into Word so that it can be used in multiple reports. Even the graphics departments at a couple of companies have not been able to get this document resized from the original 11 x 17 format into 8.5 x 11. I managed to get that done yesterday. But now can't get a useable version into Word. Suggestions?
-
Disable new workbook in Favorites ?
Hello, in the ROL we setting not accept modify for the workbooks, but accept save as new workbook inside favorites, is posible disable that option the favorites in BI7 ?
Thank you.Using New Auth Objects in BI7.
-
Creating a new workbook in Oracle Discoverer
I am not very familiar with Oracle Discoverer but have had to be involved in it recently. What i am trying to do is create a new business area. I logged on to the Oracle Discoverer administrator and followed these steps
- Create a new business area from online dictionary
- Selected the schema user
- Selected the tables/views i wanted to include in the business area
- Click finish
Now i have included the tables in the business area. When the user logs on to Oracle Discoverer he can see the 3 tables/views i selected. If they try to create a new workbook they can only include one of the tables in the workbook but not all 3 at the same time. If i include one table, the other two tables become 'disabled' and cannot be included in the workbook.
Any ideas why this is happening?Hi ziggy
It sounds like you did not create any joins between the 3 folders. Those have to be in place in order for a user to be able to create reports from more than one folder.
If you are new to Discoverer administration I would suggest you get some training. Oracle offer great training at numerous locations around the country and there are numerous self-help locations that you can find if you plus Discoverer Training into any Google search box.
My company also has e-learning for Discoverer and you can find out more by visiting this website: http://ascbi.com
Best wishes
Michael -
Embedding excel workbook in another workbook
Embedding excel workbook in another workbook
GSKRHi,
We can Embbed a Excel file to aworkbook.
In the Excel tab->Click Insert->The Object window will open->Select Create from File tab-> Select the check box Display as Icon->Click Browse and select the file you want to attach->The file will be shown on the worksheet as an icon.
However, I don't think we can embed an Excel workbook into a workbook. Could you please re-upload the picture? Thank you.
Wind Zhang
TechNet Community Support
Maybe you are looking for
-
ABAP Rpt to PDF using CONVERT_ABAPSPOOLJOB_2_PDF issues in Batch
Hi, We just upgraded to 731 level 09. Our program using CONVERT_ABAPSPOOLJOB_2_PDF works in the foreground. The PDF contains the report, It does not work in the background. The program does capture the spool number, but the PDF created is empty. The
-
Authorisation Issue SRM 7.0
Dear Experts, We are configuring Extended Classic Scenario in SRM 7.0. I have 2 Purchasing groups and each having one Purchaser. Each Purchasing group is responsible for 1 Product category. When I create and approve shoping cart I need to restrict th
-
Fretboard view options for bass and guitar on ipad 2
Is there a way to view more of the fretboard on the guitar and bass? By default, you can only view the first 8 frets. How do you change the view, so that you can see and play the higher registers? In the piano, you can do that by switching between "g
-
If I dont' have my credit number signed in my Apple ID, is that meen that I can't redeem giftcard? I got some cards from my friend for birthday, but i don't want to waste them, because i don't have a credit number. Does my Apple ID have to have a cre
-
Xcode 4.0.2 on Mac OS X 10.6.8: when I open Instruments 4.0, it always quit unexpectedly with this message: I don't figure out why, and I reipaired disk permissions with Disk Utility, and deleted .plist files, but the problem still remains. Please ca