QUERY SQ01 - Download to Excel
Hi Experts,
I am following the steps to download data to excel from SAP Query. My SAP version is 4.7 and Excel on my PC is MS OFFICE EXCEL 2007.
Steps after getting report output on screen-
1. List -> Spreadsheet
2. Choose Table for Radio button
3. Choose Microsoft Excel
This gives me all data correctly except the date formatting and columns starting with zero.
->Date format column is automatically taken as General and the dates shown are garbage values.
->the column in which data starts with zero comes without leading zeros and data integrity is lost.
Please give any suggestions that you may have to resolve this problem.
In recent SAP releases, there is an additional button with "Excel" logo that allows to keep the right format. Do you have it in your 6.20 release? Otherwise I don't see any solution, except maybe by using inplace excel and adapting it: add a button to export correctly (see how to customize here: Note 548409 - ALV view: Consulting note about Excel Inplace/Templates).
Similar Messages
-
SAP Query output download to Excel
Hi All,
Once I export/download Query Output to Excel the fields are not in the order of Actul Query output
<u><i><b>Char fields are treated as Key fields and displayed Left side.</b></i></u>
As it is a SAP Query where to keep this kind of setting(key columns = 0).?
Thanks in advance and useful answer will be awarded.
cheers!!
Komatsuwhen u download data to excel sheet, u can't handle the data from SAP....The data in excel takes excel properties and accordingly data gets adjusted to the formats of excel.
If u need formatting u need to use OLE concepts in SAP from which u can set the formats of Excel Sheet. -
SAP Query output download to excel fields order is different
Hi All,
while download Query Output to Excel the fields are not in the order of actual Query output
Char fields are treated as Key fields and displayed Left side.
As it is a SAP Query where to keep this kind of setting(key columns = 0).?
Thanks
Komatsuwhen u download data to excel sheet, u can't handle the data from SAP....The data in excel takes excel properties and accordingly data gets adjusted to the formats of excel.
If u need formatting u need to use OLE concepts in SAP from which u can set the formats of Excel Sheet. -
How to avoid the "filter cells" during download to Excel from WAD
How can we avoid seeing the "filter cells" in the link:
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a54dbe09411d2acb90000e829fbfe/content.htm
which we have every time a Bex query is downloaded to Excel from Web application designer?
The objective is to find a way to avoid the filter cell rows from happening period.... and not asking the users to manually delete the excel rows.
Edited by: Sharon West on Nov 26, 2008 12:12 PMWhy is your topicstart all in bold?
-
Download to excel from web report generated through ITS
We were on SAP 4.6B. We have several abap reports for which we have a web interface using ITS. On the broweser output we have provided a URL which reads 'Download to CSV file' . This has been achieved by modifying the function www_get_report. The mod first generates a unique filename and exports the name to the memory and generates the hyperlink. The abap report program ftp'ies a the csv file to the ITS server path as in the URL.
Now we have upgraded to ECC 5.0 and we want to achieve the download to CSV option without the modification. What would be the best way to achieve this in the netweaver platform.Sofia,
The same report query runs for downloading the data into excel, I don't think you can limit the number of records in download.
You can achieve it using custom code, like on click of download excel redirect to another page and then restrict the data as per your need, or you can use the custom procedure to download the limited data.
Denes' utility to download into excel.
http://htmldb.oracle.com/pls/otn/f?p=31517:108:1476564836494581:::RP,::
Regards,
Manish -
Download to excel from alv grid
I developed a alv report and I have one percentage field(say PER) in the grid.When I sum on that field PER then it comes in my formula basis.Suppose If I have 5 line items and all PER field have a value 2 then when I sum in PER column then it come 7 inseted of 10 becoze of my formula basis and it comes perfect.But my query is when I download to excel then it comes real value 10 insted of 7. here my formula basis sum which is 7 for all 5 line items is not comming. Can any body help me how will it come?
Thanks,
RakeshHi
try this code----
*& Form DOWNLOAD_EXCEL_TEMPLATE
text
--> p1 text
<-- p2 text
FORM download_excel_template .
TYPES: BEGIN OF lt_data,
field1(20),
field2(30),
field3(20),
field4(20),
field5(20),
field6(30),
field7(15),
field8(10),
field9(10),
field10(20),
field11(20),
field12(10),
field13(20),
field14(20),
END OF lt_data.
DATA: lv_file TYPE rlgrap-filename,
li_data TYPE STANDARD TABLE OF lt_data,
wa_data TYPE lt_data,
lv_pathcheck type c,
lv_file1 type string.
wa_data-field1 = ''.
APPEND wa_data TO li_data.
REFRESH gi_header.
wa_header-name = 'Company Code'.
APPEND wa_header TO gi_header.
wa_header-name = 'Main Asset Number'.
APPEND wa_header TO gi_header.
wa_header-name = 'Asset Sub Number'.
APPEND wa_header TO gi_header.
wa_header-name = 'Document Date'.
APPEND wa_header TO gi_header.
wa_header-name = 'Posting Date'.
APPEND wa_header TO gi_header.
wa_header-name = 'Asset Value Date'.
APPEND wa_header TO gi_header.
wa_header-name = 'Item Text'.
APPEND wa_header TO gi_header.
wa_header-name = 'Reference'.
APPEND wa_header TO gi_header.
wa_header-name = 'Allocation'.
APPEND wa_header TO gi_header.
wa_header-name = 'Amount Posted'.
APPEND wa_header TO gi_header.
wa_header-name = 'Percentage Rate'.
APPEND wa_header TO gi_header.
wa_header-name = 'Quantity'.
APPEND wa_header TO gi_header.
wa_header-name = 'Prior-Yr Quantity'.
APPEND wa_header TO gi_header.
wa_header-name = 'Curr-Yr Quantity'.
APPEND wa_header TO gi_header.
lv_file = gv_file.
lv_file1 = gv_file.
CALL METHOD cl_gui_frontend_services=>directory_exist
EXPORTING
directory = lv_file1
RECEIVING
result = lv_pathcheck
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
FIND '.xls' IN lv_file IGNORING CASE.
IF sy-subrc = 0.
REPLACE '.XLS' IN lv_file WITH ' ' IGNORING CASE.
ENDIF.
FIND '.TXT' IN lv_file IGNORING CASE.
IF sy-subrc = 0.
REPLACE '.TXT' IN lv_file WITH ' ' IGNORING CASE.
ENDIF.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = lv_file
data_sheet_name = 'DATA'
TABLES
data_tab = li_data
fieldnames = gi_header
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_pivot_fields = 6
download_problem = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID gv_msgid TYPE 'E' NUMBER 002.
ENDIF.
ENDFORM. " DOWNLOAD_EXCEL_TEMPLATE
regards,
Prashant -
Grid Download to Excel truncates leading zeros
We are on tools 8.51. The download feature for a Grid now removes the leading zeros when the grid is downloaded to excel. Has anyone found a way to fix this issue ? Thanks in advance
When you download from PS query, the output is created as a true binary xls file, but when you download from a grid in PT 8.51 the output file is html, even though the filename is ps.xls. You can open this file in a text editor.
If you have all numeric data in a column, it will be stored as <td>nnnnnn</td> in the html file. if the column has mixed numeric and text data, it will be stored as <td>=&quot;nnnnnn&quot;</td>. The leading zeroes are still there in both cases, but when excel imports the first form it will convert the result to numeric, the second it will treat as text.
Other than logging a case with Oracle, the only workaround I could think of would be to save the file to disk and run the macro directly against the html. Of course, this would likely be a major redesign.
Regards,
Bob -
Limit the number of record to download to excel from a report
I am just wondering if there is a way to limit the number of rows that I want to download to excel from a report in apex, right now when I click download to excel it downloads all records. If I am displaying 15 records on report page I want the ability to download only those records.
Any help with that would be appreciated.
Kind Regards,
Sofia.Sofia,
The same report query runs for downloading the data into excel, I don't think you can limit the number of records in download.
You can achieve it using custom code, like on click of download excel redirect to another page and then restrict the data as per your need, or you can use the custom procedure to download the limited data.
Denes' utility to download into excel.
http://htmldb.oracle.com/pls/otn/f?p=31517:108:1476564836494581:::RP,::
Regards,
Manish -
Only Current Date showing when downloading to excel
<b>Hi,
I have a query is attached to a template, when I download to excel it only downloads the current date. I have dates ranging from 2001-2006, and it downloads to excel it only downloads the current year of 2006. When I run this query on the SAP template it downloads fine. We are currently using a different excel download the "white paper SAP print strategy approach" that the SAP template does not use. Does anyone experience this same problem? I appreciate your feedback! thanks so much!
</b><b>Hi,
I have a query is attached to a template, when I download to excel it only downloads the current date. I have dates ranging from 2001-2006, and it downloads to excel it only downloads the current year of 2006. When I run this query on the SAP template it downloads fine. We are currently using a different excel download the "white paper SAP print strategy approach" that the SAP template does not use. Does anyone experience this same problem? I appreciate your feedback! thanks so much!
</b> -
Export & import of query (SQ01/SQ02/SQ03)
Hi,
How to export/import SAP Query (SQ01/SQ02/SQ03) without any transport request.
waiting for ur reply.
Thanks in Advance,
PranabHi,
If you dont want to create any transport request number then you need to download/upload the query instead of import/export.
Please follow the below steps for downloading/uploading the query
(Go to the system from where you wnat to export the query)
1. Goto transaction SQ02.
2. Click on ' Transports' icon (CTRL+F3).
3. In 'Transport action' select 'Download'.
4. Select 4th radio button 'Transport Queris'.
5. Enter the name your user group and query and click on execute.
6. Give the file name and location where you want to save the query backup and click on save.
(Now goto the system where you want to import your query)
1. Goto SQ02 and click on 'Transports' .
2. In 'Transport action' select 'Upload' and click on execute.
3. Enter/select the name of the file which you have downloaded before and click open.
Please let me know if this is helpful.
Regards,
Priya Bhat -
Report data download to excel file
Hi experts,
My requirement is report data download to excel file and that file should be an attachment to send email to specified people.
first i want to to download data to excel file and that file should be an attachment.
Regards
V.VenuHi venu,
Before posting the question, just search for the related query, more number of post has been posted related to your query,
any ways check this below links, it will solve your problem.
<<linkfarm removed>>
Cheers
NZAB
Edited by: kishan P on Jan 10, 2012 4:51 PM -
NO header detail appears when downloading to excel from web template
When we run our queries via a web template and through the portal we get the results which shows the query title and report details. When we try to download this to excel the header(report title etc. )information doesn't come down but all the rest of the report does. If we go in again and change the variable values for characteristics (query is being changed and run the web template (via portal)again and download to excel the header (report title etc.)the whole report title and report detail now appear. Looking for someone who has resolved this problem.
For anyone who is interested, this was caused by our email client, not BIP.
-
Warning while downloading an Excel file from WD ABAP
Hi folks,
In one of requirements, Client wants to download all the data that is appearing on the screen ( WD ABAP Application ) to an Excel with a layout in different manner.
We achieved this with Simple Transformations.
Now the question is while downloading the excel file, the framework/other is throwing an Warning like
" The file you are trying to open, 'info.xls', is in a different format than specified by the extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now? "
Note: All the users of my client are using MS Office 2002 / 2003.
I am using the following code........!
*------ Call Transformation for Excel OUTPUT
CALL TRANSFORMATION ZEXCEL_OUTPUT
SOURCE
t_dates = t_dates
t_info = t_info
RESULT XML l_xml_string.
REPLACE ALL OCCURRENCES OF '<?xml version="1.0" encoding="utf-16"?>' l_xml_string WITH '<?xml version="1.0"?><?mso-application progid="Excel.Sheet"?>'.
**-- Call Function Module for converting string data to XSTRING
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = l_xml_string
mimetype = 'application/xml'
IMPORTING
buffer = l_xml_xstring
EXCEPTIONS
failed = 1
OTHERS = 2.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'info.xml'
i_content = l_xml_xstring
i_mime_type = 'application/vnd.ms-excel'.
With this code I am generating a file of type XML SPREADSHEET 2003. While opening this file I am getting the above message which the user unwanted......
Can any one help me on this -
> How to avoid this warning?
Thanks and Regards,
Aneel Danda
Edited by: danda aneel on Jul 13, 2010 1:43 PMFirstly, Thanks for Your quick Response, Thomas.
Even though what ever may be the file name I am passing either info.xml or Info.xls , In error info.xls is coming.
Kindly provide me an alternative on this XML doesn't seem like it would match the 'application/vnd.ms-excel'.
what is the supported format.?
Similarly, It is not considering the UTF-8 / UTF-16 for xml.........same result is appearing in the output.
Edited by: danda aneel on Jul 14, 2010 7:52 AM -
Doubt on ALV report download to EXCEL
Hi All,
i have written a report with ALV_GRID FM, by default we get the option to download the output to excel. But when we click on the download to excel, it displays the output
in the frist page, but it also opens so many pages like
format, header, pivot,sub1,sub1....etc.
Pls. check the SAP standard report BCALV_TEST_FULLSCREEN, does the same thing when we do download to excel.
How can i avoid opening so many pages in excel?
Thanks for the help.
SekarHi ,
prabhu here , i think check the FM wheather u r passing all these to FM. for Excel keep export.param: --> i_save only and check.
regards
prabhu -
Help needed: Download to excel without pop-up
Hi All,
In a particular scenario, I require to trigger an action once a file have been successfully downloaded to EXCEL from Webdynpro UI. But in case of download functionilty, once the MS window pop-up for download comes up, the control is lost from Webdynpro and its impossible to track whether user have saved, opened or canceled the file.
Is there any functionality to directly download internal table content to EXCEL, without facing the download popup. Please let me know any function module or functionality for this.
Thanks in advance to all.
Regards,
Mainakyes there are many tutorials on SDN regarding this
u may procced like this :
get the contents in internal table and then use the FM 'SCMS_STRING_TO_XSTRING'
DATA text TYPE string.
DATA xtext TYPE xstring.
* get all declared attributes
lo_nd_sbook->get_static_attributes_table(
IMPORTING
table = lt_sbook ).
LOOP AT lt_sbook INTO ls_sbook.
CONCATENATE text ls_sbook-carrid
ls_sbook-connid
ls_sbook-fldate
ls_sbook-bookid
ls_sbook-order_date
ls_sbook-counter
ls_sbook-passname
cl_abap_char_utilities=>newline INTO text SEPARATED BY
cl_abap_char_utilities=>horizontal_tab.
ENDLOOP.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = text
IMPORTING
buffer = xtext.
wdr_task=>client_window->client->attach_file_to_response(
**path to the word file
i_filename = 'WDP.xls'
* String Variable
i_content = xtext
* File Type
i_mime_type = 'EXCEL' ).
here it_sbook is the inernal table and ls_sbook is the structure type of the attributes declared in the context node sbook
DATA ls_sbook TYPE wd_this->element_sbook.
* data LT_SFLIGHT type WD_THIS->ELEMENTS_SFLIGHT.
DATA lt_sbook TYPE wd_this->elements_sbook.
Edited by: amit saini on Oct 14, 2009 1:30 PM
Maybe you are looking for
-
Unable to delete file from desktop
I'm trying to delete a .mp4 file from my desktop. On doing so I'm first prompted to enter the password in a window 'Finder wants to make changes. Type you password to allow this'. After doing so I get the msg 'the operation can't be completed because
-
Firefox crashes on start up & only on my user and not other users on same computer
i have used firefox for many years thn all of a sudden i keep getting the crash reporter, so i can never try safe mode or other things because it crashes on strt up. Th strange thing is whn i log on to my wife user it works fine.
-
Dear experts, I am having an issue when I try to create a WEBI document using Bex query through OLAP connection (Bics). Due to variables exit, it is not possible to open query pannel in webi to choose wich dimensions to add to the webi document. The
-
Errors in Using OLS Function API sample
Using the code found at http://www.oracle.com/technology/sample_code/deploy/security/files/OLSFn/readme.html When trying to do the Make step (step 4 under "Running the application using JDeveloper 3.2 Environment), I get compilation errors for for th
-
Phatfusion's Image Menu, how to get it to work?
I have found several code changes on the internet, which are all different, but still cannot get it to work. Can anyone please give a thorough description, step by step, on what changes to make and where to make them? I get the part where you have to