Little problem ALV - Download to Excel
Hi Friends !
I have a little problem, when the user download the data which are in ALV, the positions of columns change .
Example:
In ALV.
1 - Column A
2 - Column B
3 - Column C
In Excel
1 - Column B
2 - Column A
3 - Column C
Regards !!!
This sounds pretty weird. Are they just running ALV and then they do a download on the ALV screen using the Excel icon? Are they running it with some type of Excel template? Is it using a special layout - if so are they sure they saved the layout before they download? Never heard of or saw this one before. Also are you the Cesar I worked with a few years ago in Memphis? Just wondering - don't think this will help much but let me know.
Similar Messages
-
ALV - problem in downloading to excel - HIGH
In our ALV report , we are facing problem with downloading to excel. It is intact downloading but in an irregular manner.
LIST-> EXPORT-> Local File(excel)
How to overcome this..try to load like this
spreadsheet>press enter>pivot table-->microsoft excel -
Hi,
I have a problem with regards to the ALV download to excel. I have an ALV grid with 40 columns and i need to download the output to an excel file. But after downloading the ALV output, i noticed that some columns are already on the next line. i need to have all columns to be in the same line. Does anyone have an idea how to prevent columns to be printed in the next line?
Thanks in advance!
Kind regards,
MerriamLooks like Note 855314 has a workaround ... my be more.
Of course (yuk!), write you own download.
Best!
Jim -
How can I disenable the EXCEL field format when use ALV download to excel ?
Dear friends,
I have a problem with the ALV download to EXCEL. One field Value in ALV is like u2018-abcdeu2026u2019.the character u201C-u201Cis the first position in field value.when I download the value to EXCEL,the field value u2018-abcdeu2026u2019 changed u2018=-abcdeu2026u2019 in EXCEL.how can I remove u2018=u2019 in EXCEL when I down to excel used ALV.
I add a space in u2018 -abcdeu2026u2019,So this value can be download to Excel .
Have you any solve method?
User does not use excel logo button to download.
User use Local fileu2026 button to download
Thanks
Sunadd a single quote to the beginning of the field.
like: '-abcde
in excel it will be shown as : -abcde -
ALV Download to Excel Column Colors Problem
Hi Experts,
I've encountered a problem in downloading records from ALV display to excel file.
The file is downloaded SUCESSFULLY however. When I opened the downloaded file, some columns were filled up with color(yellow) and other fields are not.
Do anyone have an idea why?I have 21 Columns columns. The first 16 columns are filled with yellow colors...
-
Dear Gurus a problem in alv report downloading to excel:
on executing the report works fine but when downloading to excel there last digit of bpvno is getting truncated.
ex: actual bpvno:'4000010' but excel o/p shows as '400001'
I have declared a field in final internal table as:
data: bpvno as bseg-belnr,
(in field catalog)
fieldcatalog-fieldname = 'BPVNO'.
fieldcatalog-seltext_m = 'BPV No.'.
fieldcatalog-seltext_L = 'BPV No.'.
fieldcatalog-col_pos = I1.
fieldcatalog-emphasize = 'X'.
append fieldcatalog .
clear fieldcatalog.
I1 = I1 + 1.
but after specifying the REF_TABLENAME & REF_FIELDNAME the downloaded excel o/p is correct.
My questions is:
1) i want to know what all are mandatory fields to be specified in fieldcatalog & is it compulsory to specify REF_TABLENAME & REF_FIELDNAME .
if not complusory why the downloaded excel value is being truncated ???
plz dont send materilas on alv and answer specific to the question....Hi,
I wrote a small program, and for me it worked. My assumption about the seltext was wrong. And I also didn't use output lenght.
Here is the code.
REPORT ZALVTOEXCEL .
type-pools slis.
data : gt_fcat type slis_t_fieldcat_alv.
data fieldcatalog like line of gt_fcat.
types : begin of t_belnr,
bpvno like bseg-belnr.
types end of t_belnr.
data gt_belnr type table of t_belnr.
data gwa_belnr type t_belnr.
gwa_belnr-bpvno = '4000010'.
append gwa_belnr to gt_belnr.
fieldcatalog-fieldname = 'BPVNO'.
fieldcatalog-seltext_m = 'BPV No.'.
fieldcatalog-seltext_L = 'BPV No.'.
fieldcatalog-col_pos = 1.
fieldcatalog-emphasize = 'X'.
append fieldcatalog to gt_fcat.
clear fieldcatalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IT_FIELDCAT = gt_fcat
I_SAVE = 'A'
TABLES
t_outtab = gt_belnr
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.
regards,
Advait. -
ALV download to EXCEL -- probs with SAPGUI 6.40 and EXCEL 2007
I have a method in an ALV grid which performs a dowload to excel
Here's the method
method download_to_excel.
field-symbols:
<fs0> type standard table,
<fs1> type standard table.
assign g_outtab1->* to <fs0>.
assign g_fldcat1->* to <fs1>.
call function 'LVC_TRANSFER_TO_KKBLO'
exporting
it_fieldcat_lvc = <fs1>
is_layout_lvc = m_cl_variant->ms_layout
is_tech_complete = ' '
importing
es_layout_kkblo = ls_layout
et_fieldcat_kkblo = lt_fieldcat.
loop at lt_fieldcat into lt_fieldcat_wa.
clear lt_fieldcat_wa-tech_complete.
if lt_fieldcat_wa-tabname is initial.
lt_fieldcat_wa-tabname = '1'.
modify lt_fieldcat from lt_fieldcat_wa.
endif.
l_tabname = lt_fieldcat_wa-tabname.
endloop.
call function 'ALV_XXL_CALL'
exporting
i_tabname = l_tabname
is_layout = ls_layout
it_fieldcat = lt_fieldcat
i_title = sy-title
tables
it_outtab = <fs0>
exceptions
fatal_error = 1
no_display_possible = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type 'S' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endmethod.
Basically the method converts the GRID table I'm displaying into the format requred for FMOD ALV_XXL_CALL' -- the field catalog is slightly different but no big deal here.
This works fine when downloading to EXCEL 2003 but short dumps when trying to do the same thing for EXCEL 2007.
Workstation is running Windows XP / SP2 build 2600 in both cases.
Any fixes etc or should I stick with EXCEL 2003 until forced to upgrade.
Cheers
jimboHi all
Seems the problem disappeared after applying the latest patch to SAP_GUI 6.40.
I haven't tried SAP_GUI 7.0 yet.
Thanks anyway
Cheers
jimbo -
ALV downloaded to EXCEL -using standard button-how to modify the EXCEL ???
hey guys,
i have developed an ALV (with dynamic itnernal table,with HTML top of page,using FMs)
Now ,i ahd problems with downlaod to excel(which i partly overcame by using &XXL fcode button instead of other 'donwload to excel button' )..
now the data is downloading to excel fne..
but i need to customise the EXCEL with HEADING (with bold letters in colour).. and also adding a line in ALV COLOUMN HEADINGS part of EXCEL...Hi,
Kindly go through the below link to download a file in Excel format from ALV,
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
Note: In the function module ->GUI_DOWNLOAD
You have to give Field Separator as 'X'.
Hope it helps You.
Regards
Mansi -
Hi Experts,
Currently in my custom program I have an issue regarding downloading ALV to excel file where one of the fields in the report will output more than 400 characters which is in Chinese characters and this field already type to string. The problem is when i download it to excel only the 301 characters is only downloaded to the file.
Addtnl information:
The data in the output internal table is complete before going through the FM REUSE_ALV_GRID but when i tried to debug when downloading before it reaches to the GUI_DOWNLOAD it already has incomplete data so this means that this is not a problem for GUI_DOWNLOAD.
Question:
Is the problem a SAP ALV download limitation?
Is there an available solution for this?
Edited by: Ekitzv on Apr 8, 2011 6:21 AMFirst try to scroll down till the last page, then select all the column manually by putting curser and copy.
This will solve your issue. i usually do in ths way
Shayam -
ALV / Download to Excel - columns transposed
A developer on my team has this problem:
We have a ALV report that gives the user the option to download to excel.
The report has columns.
A,B,C,D (for example)
but when the user exports to excel ("List > Export > Spreadsheet > Table")
they get
A, <b>C, B</b>, D
Dose anyone know why this happens? We have checked various sites and found OSS note 358644.
Are we on the right track? Or is there an easy answer to this.
Thanks in advance.Hi Kyle,
I too faced the same problem lon back. But what we
found is for currency, date and amount fields it is
moving to last.
You also checl the standard program BCALV_GRID_01.
If you download you can see the same thing happens
here also.
Check in your case whether B is date, amout or numeric field.
Thanks & Regards,
Siri.
Kindly award points if the answer is useful. -
ALV download to EXCEL with column headings etc.
Getting data from a grid to EXCEL can be done in "List" mode vis system==>save etc but it's not particularly user friendly and in any case if you are displaying a nice ALV why should the user have to switch into LIST mode anyway.
Anyway here's a decent way to do it and it gives great formatted column headings etc etc.
1) in the ON_TOOLBAR method add this code
method ON_TOOLBAR.
type-pools icon.
CLEAR ls_toolbar.
MOVE 0 TO ls_toolbar-butn_type.
MOVE 'EXCEL' TO ls_toolbar-function.
MOVE space TO ls_toolbar-disabled.
MOVE icon_xxl TO ls_toolbar-icon.
MOVE 'Excel' TO ls_toolbar-quickinfo.
MOVE 'EXCEL' TO ls_toolbar-text.
APPEND ls_toolbar TO e_object->mt_toolbar.
2) In the ON_USER_COMMAND method add the following
(if you have a class defined with SE24 you don't need the commented code).
method ON_USER_COMMAND.
FOR EVENT before_user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm
sender.
CASE e_ucomm.
....... other toolbar funcs if you have any
WHEN 'EXCEL'.
CALL METHOD me->download_to_excel.
ENDCASE.
endmethod.
3) code this method to download to EXCEL
method DOWNLOAD_TO_EXCEL.
FIELD-SYMBOLS:
<fs0> TYPE STANDARD TABLE,
<fs1> TYPE STANDARD TABLE.
ASSIGN g_outtab1->* TO <fs0>.
ASSIGN g_fldcat1->* TO <fs1>.
CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO'
EXPORTING
it_fieldcat_lvc = <fs1>
is_layout_lvc = m_cl_variant->ms_layout
is_tech_complete = ' '
IMPORTING
es_layout_kkblo = ls_layout
et_fieldcat_kkblo = lt_fieldcat.
LOOP AT lt_fieldcat INTO lt_fieldcat_wa.
CLEAR lt_fieldcat_wa-tech_complete.
IF lt_fieldcat_wa-tabname IS INITIAL.
lt_fieldcat_wa-tabname = '1'.
MODIFY lt_fieldcat FROM lt_fieldcat_wa.
ENDIF.
l_tabname = lt_fieldcat_wa-tabname.
ENDLOOP.
CALL FUNCTION 'ALV_XXL_CALL'
EXPORTING
i_tabname = l_tabname
is_layout = ls_layout
it_fieldcat = lt_fieldcat
i_title = sy-title
TABLES
it_outtab = <fs0>
EXCEPTIONS
fatal_error = 1
no_display_possible = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endmethod.
You get nice column headings etc and decently formatted EXCEL spreadsheet.
For Office 2007 I think you need to apply a SAP note but it certainly works with OFFICE 2003 which is what we are still using.
Cheers
jimboGetting data from a grid to EXCEL can be done in "List" mode vis system==>save etc but it's not particularly user friendly and in any case if you are displaying a nice ALV why should the user have to switch into LIST mode anyway.
Anyway here's a decent way to do it and it gives great formatted column headings etc etc.
1) in the ON_TOOLBAR method add this code
method ON_TOOLBAR.
type-pools icon.
CLEAR ls_toolbar.
MOVE 0 TO ls_toolbar-butn_type.
MOVE 'EXCEL' TO ls_toolbar-function.
MOVE space TO ls_toolbar-disabled.
MOVE icon_xxl TO ls_toolbar-icon.
MOVE 'Excel' TO ls_toolbar-quickinfo.
MOVE 'EXCEL' TO ls_toolbar-text.
APPEND ls_toolbar TO e_object->mt_toolbar.
2) In the ON_USER_COMMAND method add the following
(if you have a class defined with SE24 you don't need the commented code).
method ON_USER_COMMAND.
FOR EVENT before_user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm
sender.
CASE e_ucomm.
....... other toolbar funcs if you have any
WHEN 'EXCEL'.
CALL METHOD me->download_to_excel.
ENDCASE.
endmethod.
3) code this method to download to EXCEL
method DOWNLOAD_TO_EXCEL.
FIELD-SYMBOLS:
<fs0> TYPE STANDARD TABLE,
<fs1> TYPE STANDARD TABLE.
ASSIGN g_outtab1->* TO <fs0>.
ASSIGN g_fldcat1->* TO <fs1>.
CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO'
EXPORTING
it_fieldcat_lvc = <fs1>
is_layout_lvc = m_cl_variant->ms_layout
is_tech_complete = ' '
IMPORTING
es_layout_kkblo = ls_layout
et_fieldcat_kkblo = lt_fieldcat.
LOOP AT lt_fieldcat INTO lt_fieldcat_wa.
CLEAR lt_fieldcat_wa-tech_complete.
IF lt_fieldcat_wa-tabname IS INITIAL.
lt_fieldcat_wa-tabname = '1'.
MODIFY lt_fieldcat FROM lt_fieldcat_wa.
ENDIF.
l_tabname = lt_fieldcat_wa-tabname.
ENDLOOP.
CALL FUNCTION 'ALV_XXL_CALL'
EXPORTING
i_tabname = l_tabname
is_layout = ls_layout
it_fieldcat = lt_fieldcat
i_title = sy-title
TABLES
it_outtab = <fs0>
EXCEPTIONS
fatal_error = 1
no_display_possible = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endmethod.
You get nice column headings etc and decently formatted EXCEL spreadsheet.
For Office 2007 I think you need to apply a SAP note but it certainly works with OFFICE 2003 which is what we are still using.
Cheers
jimbo -
ALV Download to excel truncating fields
Hi,
When I use the ALV download button to download to excel, it is truncating the last character of customer number.
ie customer 20011790 is showing as 2001179.
Any ideas how to fix this.
Thanks.Looks like Note 855314 has a workaround ... my be more.
Of course (yuk!), write you own download.
Best!
Jim -
Problem in downloading to excel sheet
hi,
i have a file in the application server which needs to be downloaded into excel sheet and send it via attachment to outlook id's..
file is getting downloaded into excel sheet ( Via custom function module) and the attachment is being sent to the mail box, but the problem is everything appears in the first column..how to set the delimiters in excel sheet, i mean each field should appear in a separate coloumn...
format of the file in the application server
data: begin of dt_string occurs 0,
data(150) type c,
end of dt_string.
ex: dt_string+0(4) = 'name'.
dt_string+4(5) = 'place'. .....
append dt_string
clear dt_string.
same way, each record is inserted into the dt_string and the table was transferred to the app server.
thanksHi Mahesh,
Assuming that you are using 'GUI_DOWNLOAD'.
Add the thing in bold <b>WRITE_FIELD_SEPARATOR</b>.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename =
* FILETYPE = 'ASC'
* APPEND = ' '
<b> WRITE_FIELD_SEPARATOR = '#' "Tab Delimiter between fields</b>
Regards,
AS -
ALV download to Excel--Problem with Column Headers
Hi,
I have created a dynamic internal table and displaying it as ALV using SALV classes. Problem is that when I download this ALV to Excel I'm not getting Column headings same as they are in ALV display.
I mean in Excel it is showing Column headings taken from domain or data element.
While creating dynamic table i'm passing short/ Medium & Long text too. Still it is not working.
Any kinda help is appreciated.
Thanks & Regards,
Vivek Gaur
Edited by: Vivek Gaur on Nov 4, 2009 2:04 PMLook I cant actually post the code as it is divided in some global classes and main program. But i can elaborate the steps little further:
1: I have created a field catalog for Dynamic internal table. In it i have passed every necessary field along with short/medium/Long texts.
2: I fill up this dynamic table with data.
3: I assign a field symbol to this dynamic internal table.
4: I pass this field symbol to the factory method of CL_SALV_TABLE Class.
Thats it buddy..Hope u have understood my problem. -
ALV Downloading to Excel problem
Dear All,
I have a Zreport. When i execute it - i will get the required values in ALV.
I have a header in the report (which is above the ALV)
and a footer below the ALV.
Example
USER : Vishal
Date Executed : 07/07/2008
MATNR MAKTX QTY MEINS PRICE
123 abc 4 pc 400
343 fgh 4 pc 500
567 hje 5 pc 600
754 wer 7 pc 700
367 qsa 2 pc 800
Error Log:
When i try downloading the data in excel - the header and footer is coming opposite.
Example - like this
Error Log:
MATNR MAKTX QTY MEINS PRICE
123 abc 4 pc 400
343 fgh 4 pc 500
567 hje 5 pc 600
754 wer 7 pc 700
367 qsa 2 pc 800
USER : Vishal
Date Executed : 07/07/2008
please give me a solution
Senthildont use that.
there are other functionalities available like local file->spread sheet.
menu item list->export->spread sheet.
hope this works for you
Maybe you are looking for
-
How can I deauthorize Itunes on a computer that can no longer connect to the internet or is no longer working ?
-
Expresscard/34 Compact Flash card reader?
Does anyone know if there is such a thing as a Expresscard/34 Compact Flash card reader? Thanks Mark
-
Memory setting for weblogic startup file in windows xp
Hi, I want to change memory setting parameters for weblogic server 8.1 because I am using 128MB memory only. I found some information edit the startWeblogic.cmd file and change the memory parameters with - x option. but practically I didn't find the
-
I have used the submit command in my program as follows: SUBMIT rbdapp01 WITH SELECTION-TABLE rspar_tab EXPORTING LIST TO MEMORY AND RETURN. This is working fine. But I want the updated values present in the program rbdapp01 populated in my interna
-
When click on purchased I don't see a list of my previous purchased songs, Why?
When I click on purchased on the right hand side of the Itunes Store I don't see a list of my previous purchased songs why?