Download dashboard reports to Excel
Dose any body know how to let the user the possibility to Download a pivot table results from the dashboard to Excel
Moshe
Hi Moshe,
Go to 'Edit Dashboard' and select the properties of the report you want to download. Select Report 'Report Links' and select the link you want to add.
Good Luck,
Daan Bakboord
PS: Happy Holidays
Similar Messages
-
Export Dashboard Report to Excel
OUr users want to be able to export some of the dashboard reports to excel. Is this possible? I only see Printer Friendly
David,
You can't modify the Out of the box dashboards but if you have created your own you can set them with the refresh and download options. When you put the report on the dashboard one of the buttons on the right of the dashboard allows you to set these options.
cheers
Alex -
How to export the dashboard reports for Excel in OBIEE 11.1.1.6.0?
Hi Experts,
How to export the dashboard reports for Excel in OBIEE 11.1.1.6.0?
For example:
Dashboard contains more than one report, and add one export button for downloading these reports for Excel.
Is it possible to implement this requirement?Thanks.There is no direct option, you can try the following workaround.
Page Option -> Print -> Printable Html
Then File -> Save Page as
Choos Save as type as -> All files
File name as Report.xls
When you Open the xls file, if you get a pop up saying problem during load just omit it and proceed.
The report will open in excel.
Or save the page as html /mht and open it with Excel, this also will work.
Note: I have tested this in Mozilla
Thanks,
Vino -
Download alv report in excel format in Linux
Hi All,
I am working on SAP GUI for Java in Linux PC. I have installed
Open Office.
After executing an alv report there is no spreadsheet option
to download the report in excel format .
Also, when doing Save as Local File -> Spreadsheet ,
the report is not downloaded in proper format.
So, how to download the alv reports in excel format ?Hi Vinod ,
Save as Local File -> Spreadsheet
It will ask for Directory and file name with .xls format . Give proper name e.g. test.xls and save, and after saving file right click on the file and click on Open with "OpenOffice.org calc".
It will definetly work.
Abhijeet -
Dump in prodcution server while downloading ALV report to excel sheet
HI ALL,
ALV report is working fine in bother DEV and PROD servers....but in production while downloading report to excel sheet it is going to dump.
"dump is below:
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed. "
But in development this problem is not there, iam able to download ALV report to EXCEL sheet.
Any help experts......
Thanks in advance
RamHi,
I had the same problem,
Run a consistency check for your ALV and you will find out. See if you havent passed any unnecessary parameter to FM.
/people/rainer.hbenthal/blog/2009/09/25/sos--my-alv-report-is-not-working
Dump while printing ALV (field symbol not assigned)
Sumit -
Download alv report to excel in linux
Hi All,
I am working on SAP GUI for Java in Linux PC. I have installed
Open Office.
After executing an alv report there is no spreadsheet option
to download the report in excel format .
Also, when doing Save as Local File -> Spreadsheet ,
the report is not downloaded in proper format.
So, how to download the alv reports in excel format ?
Edited by: Vinod Iyer on Jan 8, 2008 11:51 AMThe problem of course is that you can't actually call up EXCEL on a Linux machine so such XXL functions as call function 'ALV_XXL_CALL' will not work.
I don't think SAP has OPEN OFFICE integration -- and even if you use EXCEL via the Linux Cross Over Office it is unlikely to work.
You might need to fiddle around with the internal file format yourself before saving it as a local file.
For EXCEL 2007 you actually have a better chance since if you save in TRUE EXCEL 2007 format the data is saved in a type of XML file.
You can read about the EXCEL 2007 new file formats on the M$ site. Note however that you will need to download the EXCEL 2007 file viwer to read the file with earlier versions of EXCEL.
(You can use EXCEL 2007 in "compatability" mode but using an XML file IMO seems a better option).
If you use a lot of EXCEL functionality probably the best option is to install Windows as a VM on your linux machine (VMWARE/PARALLELS/VMBOX etc) and then run the standard SAPGUI from the Windows VM.
Probably not the answer you want but it's the best I can do.
Cheers
jimbo -
Downloading dashboard report into diff Excels
Hi Gurus,
I have 4 reports in my dashboard when i download to the excel, these 4 reports has to be placed in 4 different excel sheets.
can any one help me how to achieve this requirement.
Thanks,
Rafi
Edited by: Rafi.B on Sep 4, 2012 4:46 AMRafi.B wrote:
Hi Gurus,
I have 4 reports in my dashboard when i download to the excel, these 4 reports has to be placed in 4 different excel sheets.
can any one help me how to achieve this requirement.
Thanks,
Rafi
Edited by: Rafi.B on Sep 4, 2012 4:46 AMHi Rafi,
If I understood correctly..
Enable Download link for all 4 reports using Report links in Edit dashboard..you will get Download option for each report and you can download them to 4 Excel sheets separately.
if this is not you are looking for then try to explain ur Requirement clearly ...what you are trying to do? -
Help me to download my report in excel format.
Here is my code below. On selection screen I am giving three inputs.
And There are two radio buttons present on my selection screen.
first one is for display the report.
second button name is generate(to export the report).
Clicking on the generate radio button will show the report.
There should be a standard button on the toolbar called GENERATE.
Clicking on that button will show a popup window asking to download the report either in .xls format or in .csv format.
==========================================================
My report is being displayed perfectly.But not getting how to downlaod the report in excel and csv format. Would u plz guide me what should I write within the export_report function of my program so that I can download the report. Kindly guide.
REPORT ZMYREPORT.
TYPE-POOLS: SLIS.
TYPES: BEGIN OF t_afko,
aufnr type aufnr,
gamng type gamng,
plnbez type matnr,
END OF t_afko.
TYPES: BEGIN OF t_mara,
matnr TYPE matnr,
mtart type mtart,
pstat type pstat_d,
END OF t_mara.
TYPES: BEGIN OF t_output,
aufnr type aufnr, "Production order
gamng type gamng, "move number
mtart type mtart, "size/fit
pstat type pstat_d, "Variant
quantity type meng8, "Quantity
barcode(35) type c, "barcode
END OF t_output.
INTERNAL TABLES, WORK AREAS AND VARIABLES
*For work area.
DATA:
gwa_afko type t_afko, "work area for t_afko table
gwa_mara type t_mara, "work area for t_mara table
gwa_output type t_output, "work area for t_output table
gwa_output1 type t_output, "second work area for t_output table
gwa_fieldcat type slis_fieldcat_alv, "work area for slis_fieldcat_alv
gwa_top type slis_listheader, "work area for slis_listheader
wa_variant type disvariant, "work area for variant
wa_Variant1 type disvariant, "work area for variant
*For internal tables.
gi_afko TYPE STANDARD TABLE OF t_afko,
gi_mara TYPE STANDARD TABLE OF t_mara,
gi_output TYPE STANDARD TABLE OF t_output,
gi_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv,
gi_top TYPE slis_t_listheader,
gi_download TYPE TABLE OF t_download,
*Variables for screen-input.
v_aufnr like caufvd-aufnr, "for production order
v_txt04 like tj02t-txt04, "for production order status
v_plnbez like afko-plnbez. "for article
*For constants.
CONSTANTS: quantity(1) type c value '1',
lv_save(01) TYPE c VALUE 'A',
c_csv TYPE char1 VALUE '|'.
S E L E C TI O N S C R E E N *
SELECTION-SCREEN:
BEGIN OF block inputpath1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: s_aufnr for v_aufnr,
s_txt04 for v_txt04,
s_plnbez for v_plnbez.
SELECTION-SCREEN: END OF block inputpath1.
SELECTION-SCREEN:
BEGIN OF block inputpath2 WITH FRAME TITLE TEXT-002.
PARAMETERS:
p_disp RADIOBUTTON GROUP rb DEFAULT'X', "Button to display report
p_gen RADIOBUTTON GROUP rb. "button for generate option
SELECTION-SCREEN: END OF block inputpath2.
SELECTION-SCREEN:
BEGIN OF block inputpath3 WITH FRAME TITLE TEXT-003.
PARAMETERS:layout TYPE disvariant.
SELECTION-SCREEN: END OF block inputpath3.
I-N-I-T-I-A-L-I-Z-A-T-I-O-N *
INITIALIZATION.
DATA: g_repid LIKE sy-repid,
g_uname LIKE sy-uname.
g_repid = sy-repid.
AT SELECTION SCREEN *
*Function module for variant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR layout.
wa_variant-username = g_uname.
wa_variant-report = g_repid.
*Display all existing variants
DATA: lv_exit(1) TYPE c.
*Code for variant part.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = wa_variant
i_save = lv_save
IMPORTING
e_exit = lv_exit
es_variant = wa_variant1
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
layout = wa_variant-variant.
ELSE.
IF lv_exit = space.
layout = wa_variant1-variant.
ENDIF.
ENDIF.
MAIN PROGRAM *
AT SELECTION-SCREEN .
*For validating the user inputs on selection screen.
PERFORM validate_input.
START-OF-SELECTION *
START-OF-SELECTION .
SET PF-STATUS 'ZGUI1'.
IF p_disp = 'X'. "If the display radio button is checked.
perform zselection. "Data is fetched from tables.
ENDIF.
END-OF-SELECTION *
END-OF-SELECTION.
IF p_disp = 'X'.
PERFORM buildcat.
PERFORM display_report.
ELSEIF p_gen = 'X'.
PERFORM display_report.
PERFORM export_report.
ENDIF.
*& Form validate_input
Checking input data validation on the display screen. *
form validate_input.
*Local variables for input validation.
DATA: lv_aufnr type aufnr,
lv_txt04 type J_TXT04,
lv_plnbez type matnr.
IF s_aufnr[] is not initial.
SELECT aufnr up to 1 rows
FROM aufk
INTO lv_aufnr
WHERE aufnr IN s_aufnr.
ENDSELECT.
IF lv_aufnr IS INITIAL.
MESSAGE e001(zmssg).
ENDIF.
ENDIF.
IF s_txt04[] is not initial.
SELECT txt04 up to 1 rows
FROM TJ02T
INTO lv_txt04
WHERE txt04 IN s_txt04.
ENDSELECT.
IF lv_txt04 IS INITIAL. "this depicts that if s_txt04 is initial.
Message e002(zmssg).
ENDIF.
ENDIF.
IF s_plnbez[] is not initial.
SELECT plnbez up to 1 rows
FROM afko
INTO lv_plnbez
WHERE plnbez IN s_plnbez.
ENDSELECT.
IF lv_plnbez IS INITIAL. "this depicts that if s_plnbez is initial.
Message e003(zmssg).
ENDIF.
ENDIF.
endform. " validate_input
*& Form zselection
Fetches data *
form zselection .
SELECT aufnr "production order
gamng "move number
plnbez
FROM afko
INTO TABLE gi_afko
WHERE aufnr IN s_aufnr
AND plnbez IN s_plnbez.
SELECT matnr
mtart "size/fit
pstat "variant
FROM mara
INTO TABLE gi_mara
WHERE matnr IN s_plnbez.
Populating final data *
LOOP AT gi_afko INTO gwa_afko.
READ TABLE gi_mara INTO gwa_mara with key matnr = gwa_afko-plnbez.
IF sy-subrc IS INITIAL.
*Moving t_mara and t_afko data from their work area to work area of t_output.
MOVE gwa_mara-mtart TO gwa_output-mtart.
MOVE gwa_mara-pstat TO gwa_output-pstat.
MOVE gwa_afko-aufnr TO gwa_output-aufnr.
MOVE gwa_afko-gamng TO gwa_output-gamng.
APPEND gwa_output TO gi_output.
ENDIF.
ENDLOOP.
*Populating the quantity field
LOOP AT gi_output INTO gwa_output.
gwa_output-quantity = '1'.
MODIFY gi_output FROM gwa_output INDEX sy-tabix TRANSPORTING quantity.
*Concategnating aufnr, pstat into barcode
CONCATENATE gwa_output-aufnr gwa_output-pstat INTO gwa_output-barcode .
MODIFY gi_output FROM gwa_output INDEX sy-tabix TRANSPORTING barcode.
ENDLOOP.
endform. " zselection
*& Form buildcat
text
form buildcat.
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'AUFNR'.
gwa_fieldcat-seltext_l = 'PRODUCTION ORDER'.
gwa_fieldcat-tabname = 'GI_OUTPUT'.
gwa_fieldcat-emphasize = 'C201'.
gwa_fieldcat-col_pos = 1.
APPEND gwa_fieldcat TO gi_fieldcat.
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'GAMNR'.
gwa_fieldcat-seltext_l = 'MOVE NUMBER'.
gwa_fieldcat-tabname = 'GI_OUTPUT'.
gwa_fieldcat-emphasize = 'C201'.
gwa_fieldcat-col_pos = 2.
APPEND gwa_fieldcat TO gi_fieldcat.
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'MTART'.
gwa_fieldcat-seltext_l = 'SIZE/FIT'.
gwa_fieldcat-tabname = 'GI_OUTPUT'.
gwa_fieldcat-emphasize = 'C201'.
gwa_fieldcat-col_pos = 3.
APPEND gwa_fieldcat TO gi_fieldcat.
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'PSTAT'.
gwa_fieldcat-seltext_l = 'VARIANT'.
gwa_fieldcat-tabname = 'GI_OUTPUT'.
gwa_fieldcat-emphasize = 'C201'.
gwa_fieldcat-col_pos = 4.
APPEND gwa_fieldcat TO gi_fieldcat.
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'QUANTITY'.
gwa_fieldcat-seltext_l = 'QUANTITY'.
gwa_fieldcat-tabname = 'GI_OUTPUT'.
gwa_fieldcat-emphasize = 'C201'.
gwa_fieldcat-col_pos = 5.
APPEND gwa_fieldcat TO gi_fieldcat.
CLEAR gwa_fieldcat.
gwa_fieldcat-fieldname = 'BARCODE'.
gwa_fieldcat-seltext_l = 'BARCODE'.
gwa_fieldcat-tabname = 'GI_OUTPUT'.
gwa_fieldcat-emphasize = 'C201'.
gwa_fieldcat-col_pos = 6.
APPEND gwa_fieldcat TO gi_fieldcat.
endform. " buildcat
*& Form top
text
FORM top .
REFRESH gi_top.
gwa_top-typ = 'H'.
gwa_top-info = My alv report'.
APPEND gwa_top TO gi_top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gi_top
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "top
*& Form display_report
form display_report .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = g_repid
I_CALLBACK_PF_STATUS_SET = 'PF-STATUS'
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = gi_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = wa_variant1
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gi_output
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " display_report
*& Form export_report
text
form export_report.
endform.Hi Cinthia,
Check this Link.
How Can we genarate Excel file without GUI_DOWNLOAD
Reward points if useful.
Regards,
Abhishek -
Error message downloading OBIEE Report to Excel "is in a different format"
Dear experts:
We just upgraded to 10.1.3.4.1 in our Dev environment and are seeing a pecuiliar behavior when we try to download a report to either "Excel" or "Excel 2000".
After selecting Excel (or Excel 200) from the Download Link, we get the following message that pops up:
The file you are trying to open 'Period Summary.xls' is in a different format than specified by the file extension. Verify the file is not corrupted and is from trusted source before opening the file. Do you want to open the file now?
We are then given the choice of Yes, No, or Help
When I click Yes, the File does open, but why this message? I can see the users complaining about this message.I found the link to MSDN site which states that this is a "known problem" and MS will provide a fix at a future date.
http://blogs.msdn.com/vsofficedeveloper/pages/Excel-2007-Extension-Warning.aspx
Also, the following metalink documents address this: 780817.1, 759410.1
This is the expected behavior due to security restrictions implemented in MS Office 2007
Solution
The following is the workaround for this issue:
Client desktops can change the default behavior of the security check using a registry key. The following registry key can be set to alter the behavior of the Excel 2007 client in the following ways:
Disclaimer from Microsoft: WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
Key: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security
Value: (DWORD)"ExtensionHardening" = [0 = Disable check; 1 = Enable check and prompt; 2 = Enable check, no prompt deny open]
I have searched through OBIEE Oracle docs, but didn't find any mention of this issue.
Has anyone seen any OBIEE workaround for this? -
Download ALV report to excel sheet
halo fellow SAPiens,
i want to download my alv report into excel sheet...........for tht i used UGI_DOWNLOAD........here if i use the file type as 'ASC' all the leading zeros of numeric values are removed and date format is "yyyy/mm/dd".......
i need the leading zeros and date format in "dd/mmyyy"
when i use file type 'DBF' i get the leading zeros but my date is replaced by '#####.............wht shld i do...........To get the leading zeros to come, append an apostrophe to the start of each field that has the leading zeros as shown
loop at itab.
concatenate '''' itab-field1 into itab-field1.
modify itab.
endloop.
note that
1. This sometimes doesnt show correctly in excel and you may have to double click on the cell to prevent the apostrophe from displaying in the sheet
2. You field needs to have an extra character to add the apostrophe -
Downloading ALV report in excel and csv format
1.I have generated a report in ALV.
Now, I want a button 'generate' on my alv tooldbar.
How to do that?
2.Now clicking on that generate button will show a popup window containing the title 'Save list in file..'
And the window will contain two radio buttons to download the report in either in excel or in csv file format.
i. Spreadsheet(.xls)
ii.Spreadsheet(.csv)
How to get the popup window containing two radio buttons and having the options for downloading the alv report in the above file formats.
Kindly guide.@chandrasekhar:
Thanks for your response. I'll try with the export button but also willing to know how to create button on toolbar.And by clicking on that button a popup box will come having two radio buttons asking to download the report either in .xls or in .csv format. I am looking for the subroutines for that.
Thanks.
Message was edited by:
cinthia nazneen -
Problem in downloading ALV report to Excel
hi All,
i am facing the problem when i am trying to download the ALV report to Excel format i should have the option to save as the Excel file from the dropdown where as instead of it i am getting the option to save as XML file.
is it something related to settings in SAP or is it done through programatically.
thanks,Anyways is this happening for every one in your team or just for one. If the latter, looks like the user has selected the download in XML format & checked the "remember these settings" checkbox
You can refer to this link on how to change the default settings: [http://home4sap.com/Blog/2010/03/ecc5-0-alv-default-file-format-when-extracting-files-to-excel/|http://home4sap.com/Blog/2010/03/ecc5-0-alv-default-file-format-when-extracting-files-to-excel/]
You can also check this SAP offers the possibility to make from transaction FAGLB03 a download
Edited by: Suhas Saha on Apr 13, 2010 4:40 PM -
I want to download a report into Excel sheet with color Heading..Is it Poss
Hi All
I want to download error records into Excel sheet with color Heading..Is it Possible to download into excel with Color Heading?
here i am <b>using the 3 sheets in one</b>
t_error-bkpf -> Sheet1
t_error-bseg-> sheet 2
t-error-bsec -> sheet3.
Rgds
Raghav<b>The following thread has the code which will put data into multiple sheets</b>
Download to multiple sheets in Excel
FOR COLOR LOGIC JUST REFER THIS PROGRAM
*& Report ZNEGI17 *
REPORT ZNEGI17 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_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 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_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 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_CELL1 USING I J BOLD VAL.
data : color(5) type x value 'H80000008'.
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.
SET PROPERTY OF H_F 'ColorIndex' = 3 .
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
*& Form FILL_CELL1
* text
* -->P_H text
* -->P_1 text
* -->P_0 text
* -->P_IT_SPFLI_CARRID text
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.
endform. " FILL_CELL1
kishan negi -
Is it possible to download a report to excel 2007?
Hello,
I'm wondering where I should configure the fact that I want to download a report that has been made in webi (XI 3.0) to an excel using the Excel version 2007 (with less limitation concerning the number of rows available). Right now I only have the option of downloading it to an Excel file of Excel version 2003.
thanks
ThierryHi All,
I'm on XI R2 and i had the same problem but when i intalled excel 2007 on my machine i'm able to export the data to excel even if the number of rows are more then 65krows.
In excel 2003 the row limitation is 65k row and in excel 2007 its around 10 lac rows.
Regards,
Ravichandra K -
Downloading web reports to excel
When down loading a BW web report to excel using the right click enhanced menu - download to MS excel we sometimes get asked to log onto the BW server again, this doesn't happen on all web reports only some. Why is this, is that a setting we can change so we can turn this off??
we are running BW 3.5When down loading a BW web report to excel using the right click enhanced menu - download to MS excel we sometimes get asked to log onto the BW server again, this doesn't happen on all web reports only some. Why is this, is that a setting we can change so we can turn this off??
we are running BW 3.5
Maybe you are looking for
-
What is" LINE-COL2 = SY-INDEX ** 2."
can u explain what is '' ** " FIELD-SYMBOLS <FS> LIKE LINE OF ITAB. DO 4 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2. "what this will do APPEND LINE TO ITAB. ENDDO.
-
Return item (RETPO) as a key field in condition table
Hi, I would like to know how we can utilize return item indicator as one of the key fields in the PO pricing condition table. [Requirement] Condition record Use Retrun item as a key e.g.) Table A999: POrg | Vendor | Return item | condition rate #1: 1
-
Adding a Flash photo gallery on DW
So, I'm trying to add a flash photo gallery on my site. I am very new to this and cant seem to figure out how to do it exactly. I've found free templates online and downloaded the files. But I am unsure where to go from there. Like I said, I very
-
Web services problem on SUN ONE Studio4
Dear All I am developing web services using sun ONE studio4 IDE. I am using examples from sun ONE studio documentation. "StockDemo Stock Service" if you know? Service is deployed successfully and when i execute the client first page is displayed when
-
Compare is not working properly
Hi All, I have 2 results table in my page 1 table1 and other is table2.In the table1 table, compare works as I would expect. I select a couple of records, click on 'Compare' from the Actions list. A popup with the selected records are displayed.