Alv to excel download
Probelm I'm facing while saving an ALV report to Excel Sheet by clicking
on the 'Save as File Icon' button on the ALV output.=0D
Here data is going into a new Line after 65 columns.I've used Function
Module 'RSAQ_ALV'.This function module is ultimately using
'REUSE_ALV_GRID_DISPLAY' and 'REUSE_ALV_LIST_DISPLAY' function
modules.ALV output I'm getting correctly but when I save this ALV output
to Excel,columns are getting wrapped and going into 2nd row after 65
columns.=0D
Could anybody tell me what could be the reason ?=0D
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Jul 9, 2010 12:37 PM
I do not have the answer but I have experienced the same issue. I believe the issue arrises not as a limit of the number of columns, but based upon the length of the entire data structure, as I recall. As a work around, we use the MS Excel icon versus the Save as Local file icon.
Similar Messages
-
Problem in ALV to Excel Download
Good Morning Experts,
I am facing one issue related ALV to excel Download.
I Developed one custom report the output is correct displaying.
the output is like for example i am taking 3 columns (plant, material, amt).
plant material amt
1001 aaa 1000
1001 bbb 2000
while downloading to excel
it displaying like
plant
material
amt
1001
aaa
1000
1001
bbb
2000
I dont know why its coming like that.
this is my code
DEFINE field_cat.
wa_field-row_pos = &1.
wa_field-fieldname = &2.
wa_field-tabname = &3.
wa_field-seltext_m = &4.
wa_field-outputlen = &5.
wa_field-currency = &6.
wa_field-ref_fieldname = &7.
wa_field-ref_tabname = &8.
APPEND wa_field to it_field.
clear wa_field.
END-OF-DEFINITION.
field_cat '1' 'BUKRS' 'IT_FINAL' 'Company Code' '6' '' '' ''.
field_cat '2' 'BUTXT' 'IT_FINAL' 'Comp Descrip' '25' '' '' ''.
field_cat '3' 'LIFNR' 'IT_FINAL' 'Vendor No' '10' '' '' ''.
field_cat '4' 'NAME1' 'IT_FINAL' 'Vendor Name' '35' '' '' ''.
field_cat '5' 'STRAS' 'IT_FINAL' 'Vendor Addres' '35' '' '' ''.
field_cat '6' 'FDGRV' 'IT_FINAL' 'Nature Of Work' '30' '' '' ''.
field_cat '7' 'DMBTR' 'IT_FINAL' 'Net Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
field_cat '8' 'QBSHB' 'IT_FINAL' 'TDS Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
field_cat '9' 'TOTAL' 'IT_FINAL' 'Total Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
it_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = it_layout
IT_FIELDCAT = it_field
I_SAVE = 'X'
TABLES
t_outtab = it_final
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_ALV
FORM TOP_OF_PAGE.
REFRESH it_head. CLEAR it_head.
wa_head-typ = 'H'.
wa_head-info = 'Vendorwise Expense Details'.
APPEND wa_head to it_head.
wa_head-typ = 'S'.
IF NOT s_MONAT-high is INITIAL.
CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low ' to ' p_gjahr '.' s_MONAT-high INTO wa_head-info.
ELSE.
CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low INTO wa_head-info.
ENDIF.
APPEND wa_head to it_head.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_head.
ENDFORM.
Regards,
Dhina..Hi,
You can also try in this way
in the output screen
click List (in app tool bar) -> Export -> Spreadsheet
and save at your desired location.
(It will be save in .mhtml format , just rightclick on it and you can open it with excel )
Then you will be able to view in your required format.
Regards,
koolspy. -
Hi Experts,
I display around 15 fields(columns) in ALV output. When I download it to Excel, it downloads exactly.
Then dynamically, when I increase the number of fields to be displayed in ALV it is displaying correctly. But when I download
to excel, half of the fields are coming in one line of excel sheet and remaining fields are coming in the second line of excel.
Why am I not getting all the fields in one line itself in the excel sheet?
Is it a problem in standard ALV?
I am using cl_gui_alv_grid class to display ALV output.
Thanks and regards,
Venkat.Hi!
Which function module you are using for downloading? -
Material Number Truncated in ALV to Excel Download
Hi Guru,
I have a ALV program report. It has about 18 columns, but for some strange reason, when we download this report to an ALV the 3rd column which host the material number as the last digit missing/truncated.
For example if we have a material number in SAP ALV Grid as 1234567, when we download this the excel, what we get in excel is 123456. with the last number missing.
What is the best solution to fix this issue.
Thanks for you help in advance.Hi Keshav,
Previously I faced the same situation, like in ALV grid I was displaying the material nos with output length as 15. Since in the Grid display you can readjust the columns, So after displaying we just expanded in the grid and try to download the same in excel. But at that time the ALV was downloading with material number field length as 15 ( What I set in my field catalog). Even when I saw the print priview I saw only the length it is showing as 15. After changing the output length as 18 in field cat I got the correct download.
(Here I am assuming that the question is raised for ALV grid display since no where it is mentioned the type of ALV).
Sorry it was mentioned in the question itself
Regards
Shiba
Edited by: Shiba Prasad Dutta on Feb 22, 2010 2:41 PM -
ALV to excel download problem through standard tool bar
I am downloading data into excel from ALV , When there are 128 column data in execl coming as 2 row for 1 row of data in alv. This problem is not there for 78 columns report.
Kindly suggest some solution.i think there is a limit to the number of columns for ALV and which is i think 92 ..this can be the cause of the issue
amit -
ALv to excel download problems
HI friends,
Probelm I'm facing while saving an ALV report to Excel Sheet by clicking
on the 'Save as File Icon' button on the ALV output.=0D
Here data is going into a new Line after 65 columns.I've used Function
Module 'RSAQ_ALV'.This function module is ultimately using
'REUSE_ALV_GRID_DISPLAY' and 'REUSE_ALV_LIST_DISPLAY' function
modules.ALV output I'm getting correctly but when I save this ALV output
to Excel,columns are getting wrapped and going into 2nd row after 65
columns.=0D
Could anybody tell me what could be the reason ?=0D
Thanks,
Sreekanth.G
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Jul 9, 2010 12:36 PMch_alv_layout-info_fieldname = 'COLOR'. "infofield for listoutput
ch_alv_layout-colwidth_optimize = 'X'.
try commenting the above values.and also check the Fieldcatlog.
Check the issue similar issue was resolve by checking catalog and layout:
[ALV Issue solution|Re: Problem when export ALV.]
Regards,
Gurpreet -
Download data from ALV to excel issue
Hi All,
Could you please tell me if there has any restriction on ALV grid data download to excel? I've a report contains 68 columns and about 500 rows, I want to download the data using the standard menu list->export->save to local file. but after I download them, I found the first 65 columns display in one line and the rest columns display in next line, just like ALV do not allow too many characters in one row and have to switch to new line. I can hide some columns but it's very strange that even after i hide 3 columns to fit the 500 rows download, then if the rows increase, the same problem occurs.
I searched the forum and in the thread Re: Export ALV in EXCEL Issue Mr. Suvajit provided a solution by using menu List->export->spreadsheet, it looks very good. But I still want to know how this happen and is there a standard way to download data with more than 65 columns to local file with extension .xls so that user can open it directly?
PS: I'm using FM REUSE_ALV_GRID_DISPLAY and the SAP version is SAP ECC6 with kernal package SAPKB70103.
Thank you very much.
Best Regards,
Jeff
Edited by: Jeff_liu_2010 on Mar 10, 2011 7:21 AMHi Jeff,
Please check if following analysis is helpful to you.
Analysis/Solution:
When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
(I never faced any issue related to no of columns as it worked fine for columns >90 too)
Issue occured when row size of exported data gets more than 1023 character.
Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
One additional aspect generally missed is that:
When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
Regards,
Parveen -
Avoid splitting of columns ALV report while download output to Excel sheet
Hi friends,
I have 170 columns in my ALV report
while downloading the report to Excel sheet
the column descriptions and values are splitting in two lines.
How can i avoid the problem.
before calling REUSE_ALV_GRID_DISPLAY function module in my code
for the Layout i assigned LS_LAYOUT-MAX_SIZE = 1023.
but still the problem is not solved.
Please help me in this Issue.
Thanks in Advance,
GaneshHi friends,
I dont want to use and Keyboard shiftcntrl....
or dont want to change any code in ALV report
by simply assigning some value to any of the export parameter in ALV function module
can we achieve the functionality
Thanks in Advance,
Ganesh -
Download from ALV to excel sheet.
When i am downloading the Alv to excel sheet. I want to get the field descritption also in the excel sheet.
Refer:
https://forums.sdn.sap.com/click.jspa?searchID=14433981&messageID=3603627 -
Excel download from ALV grid, for characters more than 1020
Hi,
When i am trying to download the report which is having character more than 1020, it is coming in two rows. I want all fields in one row. Please give solutions.
I am using below field catalog.
Car Eligibility
CLEAR lw_fieldcat.
lw_fieldcat-fieldname = text-001.
lw_fieldcat-reptext_ddic = text-011.
lw_fieldcat-tabname = text-021
APPEND lw_fieldcat TO gt_fieldcat.
I am using below FM.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = gt_layout
it_fieldcat = gt_fieldcat[]
it_sort = gt_sort[]
it_events = gt_events[]
TABLES
t_outtab = gt_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
Thanks in Advance,
Ravi Kumarravi,
its not about how you have used your field catalog or how you called ALV FM. its excel download functionality,
what you need to do is:
set pf-status '<<some value>>' -> you can find where to pass in ALV FM call.
then add a application toolbar button though this pf status.
then at use_command event, check sy-ucomm and if its the same as your new icons fcode then use the method to download it in excel. -
ALV Excel Download problem ( Special Character)
Hi,
I am unable to download completely in XLS format from ALV grid. When i tried in couple of ways there is a special character( " ) in one of the filed. Due to the same Excel download has some problem. I tested by removing those and it worked fine,
Please suggest me to solve the issue.
Thanks,
Bhanu Gattu,Data strings with special characters can not be downloaded into XLS format from ALV grid. In my case, I replaced the special character " with space and I could download the data into excel.
-
I HAVE AN ALV REPORT,
<b>1.</b>1 FIELD IS EISBE LIKE MARC-EISBE,WHEN I DOWNLOAD TO EXCEL AND I WANT TO MAKE FUNC LIKE SUM IT IS NOT MAKE NOTHING, IF I HAVE VALUE 10 AND MAKE SUM I GET 0 ZERO <b>why?</b>
<b>2.</b> I WANT TO DOWNLOAD AND GET THE DATE IN THE EXCEL REPRORT
I USE THIS
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = alv_fldcat
TABLES
t_outtab = <dyn_table>.
THANKSHi Liat,
Check this thread out
'REUSE_ALV_GRID_DISPLAY' Excel-download without dialog
Regards,
Santosh -
Display of leading zeroes when downloaded from ALV to excel
Hi All,
I have a problem in ALV grid display.
There is a specific field which has value starting from '001' to '999'. This is a char(3) type of variable.
The problem is that the display shows the value as '001' which is correct. but when the same file is dwnloaded to excel using standard SAP functionality, the value of the field gets changed to '1' instead of '001'.
Is there any option by which this can be controlled. Please let me know, its urgent!!
thankshi Ankur,
the Excel download is done by Z program? IF yes you have to do:
SET PROPERTY OF go_cell 'NumberFormat' = '@'.
this will set the Excel cell to Text type and leading zeros won't be lost.
ec -
Download ICONS from ALV to EXCEL
Dear Friends,
IS there a way of downloading the ICON image exactly
from alv to EXCEL,right now,when the icon is downloaded
from alv to the excel,i can only see ascii characters in
the icon column in the excel.
kind regards
kaushik hegdeHi Jeff,
Please check if following analysis is helpful to you.
Analysis/Solution:
When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
(I never faced any issue related to no of columns as it worked fine for columns >90 too)
Issue occured when row size of exported data gets more than 1023 character.
Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
One additional aspect generally missed is that:
When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
Regards,
Parveen -
The data type DEC while downloading from ALV to EXCEL
The data type DEC while downloading from ALV to EXCEL is giving some invalid data .
Ex : In ALV field is the time difference in hours:minutes
if the value is :23 in Excel it will be 22:59 .
Please Suggest immediatelyHi ....
I have the similar problem. My coumns are not in any sequence when I download it to excel sheet.
How do I fix it.
Neha
Maybe you are looking for
-
Is anyone else having problems downloading this version of iTunes?
-
My click wheel is malfunctioning!
So, my clickwheel is completely NOT responding. A few drops of water got on it the other day, and it worked fine. Now, all of the sudden, it's displaying something about "Firewire" and my clickwheel doesn't work! I've reset, restored, and charged it.
-
Simpletech drive used for Time Machine
Hi, I am using a SimpleTech drive for my Time Machine backup drive and I run into the issue of the drive not reconnecting when I restart my iMac. Actually I have two Simpletech drives connected to my iMac, the other one holds all of my music and it d
-
Firewire to Thunderbolt, Firewire to Thunderbolt
Are there any Firewire 400 to Thunderbolt adaptors out there?
-
SQL> exec DBMS_TTS.TRANSPORT_SET_CHECK('APPS_TS_TX_DATA,APPS_TS_TX_IDX,APPS_TS_SUMMARY,APPS_TS_ARCHIVE,APPS_TS_SEED,APPS_TS_INTERFACE',TRUE) PL/SQL procedure successfully completed. SQL> SELECT * FROM TRANSPORT_SET_VIOLATIONS; VIOLATIONS Extensible I