2013 Jan 14 4:16 AM
Dear All,
I develop one report in SAP by using ABAP code, but i wonder, when i export as a excel file, it doesn't show the column header.
So, i do i do?
Please help....
Thank,
Ratana, Cambodia
Dear All,
I develop one report in SAP by using ABAP code, but i wonder, when i export as a excel file, it doesn't show the column header.
So, i do i do?
Please help....
Thank,
Ratana, Cambodia
2013 Jan 14 4:39 AM
Hi,
R u using TOP OF PAGE? For header purpose.
check for related code &
Then check this thread for ur explanation.
http://scn.sap.com/thread/3160322
This is the link that will help u for Overview of EXCEL download.
Check sap notes 1517329 also.
Hope it helps.
Thanks
Gourav.
2013 Jan 14 6:49 AM
Hi,
Recently I wrote this program.
It is for sending mail using cl_bcs.
In "FORM mail_1_prep_3" I am sending csv file (compatible with excel) that is based on internal table.
The heading in this csv file is based on the resut of cl_salv_ddic=>get_by_data .
I hope it will help.
Regards.
2013 Jan 14 8:45 AM
Hi Ratana,
Are you downloading the excel from an ALV output or directly by using FM?
2013 Jan 15 1:39 AM
Hi Aniket Zanzan,
I am downloading the excel from an ALV output.
What's wrong with this?
2013 Jan 15 7:06 AM
Hi Ratana,
There is nothing wrong in it. If the file has to be downloaded everytime the report executes, then maybe you could directly download it using an FM as you have the required data in an internal table.
2013 Jan 15 4:11 AM
Hi Ratana,
Please Check dis Demo Program which is given by SAP .
BCALV_GRID_08
BCALV_GRID_DEMO
BCALV_GRID_01
========================
Using OLE automation (download data in Excel with header)
RSDEMO01
Regard's
Smruti
2013 Jan 15 8:32 AM
2013 Jan 17 10:18 AM
Hi Ratana ,
As you said u are using the ALV output for exporting the excel file.
Please use the below snippet.
I was having the same problem like you, when user export to excel. I fixed it by using :-
w_layo-colwidth_optimize = 'X'. <<<<<<<<<<<<This
perform generate_fcat_reftab
using 'PRUEFLOS' 'T_INPUT' '' '' 'Inspection Lot' 0.
form generate_fcat_reftab using p_fieldname
p_tabname
p_ref_tabname
p_ref_fieldname
p_output_text
p_output_lenght.
clear w_fcat.
w_fcat-fieldname = p_fieldname.
w_fcat-tabname = p_tabname.
w_fcat-ref_fieldname = p_ref_fieldname.
w_fcat-ref_tabname = p_ref_tabname.
w_fcat-seltext_s = p_output_text.
w_fcat-seltext_m = p_output_text.
w_fcat-seltext_l = p_output_text.
w_fcat-outputlen = p_output_lenght.
w_fcat-ddictxt = 'L'. <<<<<<<<<<<<<<<<<<This
append w_fcat to t_fcat.
endform.
Hope : This will resolve your issue.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |