How to export report output into excel.
Hi all
how to export report output into excel sheet can any on give me answer step by step please as soon as possible
kk
Hi Prashanth,
If you are executing Query from WAD ---> Right click on Table (only on Characteristics Data) --> Enhanced Menu ---> Export as --> CSV file or MS Excel
assign points if this helps,
Thanks,
Sudhakar
Similar Messages
-
How to export report output into excel file
hi friends,
i would like to get the solution from you for how to export the report output into a .xls file. i know how to convert it into .rtf and .txt files but i think it's difficult to do this .xls way, could you help me to comeover this problem?
thankyou very much.The official answer is "delimited", which
generates adequate comma or other delimited
text. No formatting, and without extra
effort no support for non-ASCII characters.
Might be sufficient for you.
Note that Excel can read html files - we
built programs to generate html files with
name of "blah.xls" and some Excel-ish
extensions, so Excel is automatically opened
and the document is all nice and pretty.
(Oracle html output has some odd logic about
choosing number of columns, we didn't use
it.)
-- Allan Plum -
How we export report data into excel in report 10g
hi can any one tell me
how we export report data into excel in report 10g (except spreadsheet)We can use TEXT_IO Package
-
Download the ALV Report output into excel sheet or notepad
Hi,
how to downlaod the alv report out into excel sheet or notepad in a proper manner. program contain large number records....
Thanks in advance!!!!
Regards,
kranthi.Hi
Download a report to excel with format (border, color cell, etc)
Try this program...it may help you to change the font ..etc.
Code:
REPORT ZSIRI NO STANDARD PAGE HEADING.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT. " font
TABLES: SPFLI.
DATA H TYPE I.
table of flights
DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
*& Event START-OF-SELECTION
START-OF-SELECTION.
read flights
SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
display header
ULINE (61).
WRITE: / SY-VLINE NO-GAP,
(3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
ULINE /(61).
display flights
LOOP AT IT_SPFLI.
WRITE: / SY-VLINE NO-GAP,
IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
ENDLOOP.
ULINE /(61).
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-007
EXCEPTIONS
OTHERS = 1.
start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL USING 1 3 1 'Von'(003).
PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - start
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2.
PERFORM ERR_HDL.
tell user what is going on
SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL USING 1 3 1 'Von'(003).
PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - end
disconnect from Excel
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'C:\SKV.XLS'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL USING I J BOLD VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL.
ENDFORM.
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
Please note that this example maybe slow at filling the excel table
(perhaps four fields per second on a 900 MHz machine - almost 30 seconds
for a short example).
To get the data on properties and methods - there is a bit of smoke and mirrors
going on here; they are EXCEL properties and methods, not sap ones - so you need
to look at excel help to determine how a particular function is structured. then
build the block in sap, as shown in the example.
If you only want to transfer the data to Excel like when you transfer the data from
ALV to Excel simply use the Function Modules:
XXL_SIMPLE_API
If you want more modifications when you transfer it to Excel use:
XXL_FULL_API -
How to download report output to excel file??
Hi all,
I have a problem with downloading a report output to an excel file? May i know is there any functions or methods to do it?
My situation is like this. I used Write function to print out the report. After user click on the execute button. The report output will show to the user in a table format. And there is one button 'Save To Excel' in the report output dipslay screen for user to click to save it into excel format.
Appreciate if you could help.
Thanks.
Regards,
RachelHi Rachel,
You can use FM GUI_DOWNLOAD for transferring the data from your report program into excel sheet.
And while saving give the filename extension as .xls.
Reward if helpful.
With regards,
Syed -
How to break report output into files
Hi,
I need to submit my report output into different files based on the Sales person name.
When I submit my request from SRS window it asks the sales person name 'FROM' and 'To'parameters, if I choose the different sales person names then report output has to divide into files for each sales person. How can I do this? Do I nedd to add any code
in my report.
Could you help me in this?
Thanks in advanceThis maybe helpful:
Report Distribution -
How to caputre report output into an internal table?
Hi,
Is there a way to capture report output into one internal table?
Regards,
AmruthHi Amruth,
Use SUBMIT.. EXPORTING LIST TO MEMORY.
It saves the output of a report into memory. Use the function modules LIST_FROM_MEMORY. WRITE_LIST & DISPLAY_LIST to retrieve the data.
All these function modules belongs to function group 'SLST'.
However the submit does not display hte output list of the called report, but saves it in ABAP memory & leaves the called report immediately. Since the calling program can read the list from memory & process it furthe, you need to use the addition ..AND RETURN.
Regards,
Chandru -
Hi all,
I'm using Planning 11.1.2.1 for entering data and generating reports manually via Workspace. I wanna set up an automation process with a batch scheduler.
I've gone over the documentation. I've read about creating batches first then scheduling batches next.
However, the biggest issue I have is that I want to extract all my reports into EXCEL Spreadsheet (.cvs) format and according to the docs, it only supports output in PDF or HTML for 11.1.2.1.
Is this true? Is there a way to work around this by using Business Rules at command prompt?
Thanks,
NIf you have the Financial Report open there are two options:
- in the bottom right hand corner of the report click the link: "Export In Query ready Mode"
(this opens the report so you can use it as an Excel retrieve)
- from the Hyperion menu, select File>Export>Excel
(this exports the headers as objects and the data grid, so you can manipulate in Excel).
Cheers, Iain -
Convert report output into excel file
hiii,
Can we convert output of report into excel file format?
Plz tell me the.
Thanks in advanceHello,
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_paptoexcel.htm
29 Building a Report for Spreadsheet Output
Regards -
How we save report data into excel
hi
can you tell me how we send oracle report builder report data into excelHi,
Try this code.
PROCEDURE PRINT_REP_WEB IS
RO_Report_ID REPORT_OBJECT;
Str_Report_Server_Job VARCHAR2(100);
Str_Job_ID VARCHAR2(100);
Str_URL VARCHAR2(100);
PL_ID PARAMLIST ;
BEGIN
PL_ID := GET_PARAMETER_LIST('TEMPDATA');
IF NOT ID_NULL(PL_ID) THEN
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
RO_Report_ID := FIND_REPORT_OBJECT('REPORT_OBJ');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, '<report_name>');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'SPREADSHEET');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, '<report_server_name>');
Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH('<report_server_name>') + 2, LENGTH(Str_Report_Server_Job));
Str_URL := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=<report_server_name>';
WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
DESTROY_PARAMETER_LIST(PL_ID);
END;Regards,
Manu.
If my response or the response of another was helpful, please mark it accordingly -
How to write report output into table
Hi,
I want to get data out from report "RSPARAM" which list all system profile parameters my requirement is that i need to write output of this report to table so can anyone please tell me how should achieve this?
is there any FM which read report as parameters and write into table?
thanks in advance.
john.Looks like the program you are calling(rsparam) is just calling another report, RSPFPAR. Let's just call that one directly. Here is an updated version of the program.
This will also put the first 3 columns in a internal table. This should show you what you need to do.
report zrich_0003 .
data: begin of listout occurs 0,
line(1024) type c,
end of listout.
data: begin of itab occurs 0,
column1(100) type c,
column2(100) type c,
column3(100) type c,
therest(100) type c,
end of itab.
* Submit the report and export list to memory
submit rspfpar exporting list to memory
and return.
* Get list from memory and convert to ascii
perform retrieve_list_from_memory tables listout.
loop at listout.
if sy-tabix => 7.
clear itab.
split listout+1(500) at '|' into itab-column1 itab-column2
itab-column3 itab-therest.
append itab.
endif.
endloop.
loop at itab.
write:/ itab-column1, itab-column2, itab-column3.
endloop.
* RETRIEVE_LIST_FROM_MEMORY
form retrieve_list_from_memory tables reportlines.
data: list like abaplist occurs 0 with header line.
data: txtlines(1024) type c occurs 0 with header line.
clear list. refresh list.
clear reportlines. refresh reportlines.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
check sy-subrc = 0.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = txtlines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
check sy-subrc = 0.
reportlines[] = txtlines[].
call function 'LIST_FREE_MEMORY'.
endform.
Regards,
Rich Heilman -
Is it possible to export report filters into Excel?
I allow the users to filter on LOV's at the top of the report. Is it possible to somehow export these to Excel without adding them as columns?
figured it out. Was able to set a presentation variable on the report prompt. I then inserted the syntax @{VARIABLE} into the report subtitle which exports to Excel.
-
Download alv report output to excel format with out header line
Hi experts,
i want to download a alv report output into excel formatt with out the header line but it has to download including field description. as this output will fed into another transaction, the downloaded excel file should be with out header line.
fro eg:
Report : Zabc ABAP Development Page : 1
Run Date : 12/14/06 System: UD400
Run Time : 08:45:37
this header details should not be downloaded into the excel file.
could somebody help me please.
thanks
deepuhi jayanti,
thanks for your response.
i have delclared all the field types as character but still it is not downloading and it 's sy-subrc is 4... the code is as below.
*field names
lt_fieldnames-value = 'Material Number'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Plant'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Group'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Description'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'UOM'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Price Unit'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Type'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'X-Plant Status'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Valuation Class'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avmng.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avntp.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Qty'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'PO Creation Date'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_fcaqt.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Prev. Yr. Std. Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_stcst.
APPEND lt_fieldnames.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'XLSHEET'
CREATE_PIVOT = 0
DATA_SHEET_NAME = ' '
PIVOT_SHEET_NAME = ' '
PASSWORD = ' '
PASSWORD_OPTION = 0
TABLES
PIVOT_FIELD_TAB =
data_tab = t_output1
fieldnames = lt_fieldnames
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 e001 WITH 'Data could not be downloaded'.
ENDIF.
ENDFORM. " z_dwn_xl
thanks
deepu -
Reports 6i into Excel 97 vs 98, 2000 etc
Hi,
Can anyone give the official line on which version of Excel is supported against Reports 6i.
If I create a HTML report and import into Excel 97 the result is exceptionally poor. Nothing is aligned and it is all unusuable. However in Excel 2000 the HTML gets converted in a pretty decent fashion and my data seems to be well aligned despite a few easy to fix blank columns.
Our client only has Excel 97 and I need an answer urgently on the compatibility between the two products. Does the client need to upgrade or is there a better way to get the report data into Excel?
Regards,
JohnDear John,
Can u tell me how to import HTML report output into Excel ?
With brief steps.
U can reply me on [email protected] / [email protected]
Regards
Sudhir -
HOW TO DOWNLOAD SAP OUTPUT TO EXCEL FILE
Hi SAP Gurus,
I would like to ask if you have any Function Module or codes on how to download SAP Output into Excel file. Thanks! Hope you could help me.You can transfer the contents of internal table to excel using this code..
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
end of itab.
select vbeln
posnr
from vbap
up to 20 rows
into table itab.
* EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
* handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_WORK TYPE OLE2_OBJECT,
H_SHEET TYPE OLE2_OBJECT,
H_CELL TYPE OLE2_OBJECT,
V_COL LIKE SY-TABIX. " column number of the cell
DATA:
V_STEP(30),
V_FILE LIKE RLGRAP-FILENAME.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Creating Excel...'
EXCEPTIONS
OTHERS = 1.
* start Excel
V_STEP = 'Starting Excel'.
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
* CALL METHOD OF H_EXCEL 'OPEN' EXPORTING #1 = 'C:DMC_REC.XLS'.
* PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Adding Data to Excel...'
EXCEPTIONS
OTHERS = 1.
* Get the list of workbooks
V_STEP = 'Preaparing Excel'.
CALL METHOD OF H_EXCEL 'WORKBOOKS' = H_WORK.
PERFORM ERR_HDL.
** Add new workbook (create a file)
CALL METHOD OF H_WORK 'ADD'.
PERFORM ERR_HDL.
* Get the created worksheet
************************Sheet Number
CALL METHOD OF H_EXCEL 'WORKSHEETS' = H_SHEET EXPORTING #1 = 3.
************************Sheet Number
PERFORM ERR_HDL.
* Activate (select) the first sheet
CALL METHOD OF H_SHEET 'ACTIVATE'.
PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Adding Data to Excel...'
EXCEPTIONS
OTHERS = 1.
* output column headings to active Excel sheet
V_STEP = 'Adding data to Excel'.
LOOP AT ITAB.
V_COL = SY-TABIX.
PERFORM FILL_CELL USING 1 V_COL ITAB-vbeln.
PERFORM FILL_CELL USING 2 V_COL ITAB-posnr.
ENDLOOP.
V_STEP = 'Releasing Excel'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
H_EXCEL-HANDLE = -1.
*& Form ERR_HDL
* text
* --> p1 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Error in processing Excel File:', V_STEP.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
*& Form FILL_CELL
* text
* -->P_1 text
* -->P_1 text
* -->P_1 text
FORM FILL_CELL USING ROW COL VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_CELL
EXPORTING #1 = ROW #2 = COL.
PERFORM ERR_HDL.
SET PROPERTY OF H_CELL 'Value' = VAL .
PERFORM ERR_HDL.
ENDFORM. " FILL_CELL
Maybe you are looking for
-
How to add a serail no field in components screen in Subcontracting PO
I need to Create Subcontract PO With BAPI_PO_CREATE1.Its working fine (With Batch). My requirement is I need to map one more extra field as Serial No in the Component SCreen. How can i add the Serail no field in the Subcontractiong with Components Sc
-
"Word has insufficient memory"
I have a master document which is made up of 10 individual documents created in Word 2003. admitedly, it's a huge file of about 20MB once loaded and consists of tables, numerous jpeg images, links, etc. When I try to convert the file into PDF format
-
Wireless Card Upgrade Help!
Hello, First post so be gentle with me! I need some help upgrading my wireless card on my Compaq nx6310 laptop. I have the original card in there since new and I now have a much faster fibre connection with a Hauwei HG533 wireless router so
-
Is it possible to add a caption on each photo of my album ? Thank u
Hello, Is it possible to add a caption on each photo of my album Iphoto ? Thank you for your help.
-
greetings, I am developing a web site in which we need to extract the 1st paragraph of the most recent press release and post it as content in a separate page. The press releases are all in their own separate files that get dynamically included into