11-26-2009 9:44 AM
Hi All,
I have an internal table which converts the data into the CSV format and again pass this data table through the FM GUI_DOWNLOAD to display the data with the headings. But am not able to display the headings(I think .CSV file format
doesn't work to display along with the headings). Please suggest me the possible solution.
Thank you.
Regards,
Padmasri.
11-26-2009 9:49 AM
Hello,
Are you passing the column headings to the tables parameter FIELDNAMES in GUI_DOWNLOAD?
Vikranth
11-26-2009 9:55 AM
Hi Vikrant,
tb_final1[] = tb_final[].
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
i_field_seperator = ','
TABLES
i_tab_sap_data = tb_header
CHANGING
i_tab_converted_data = tb_data
EXCEPTIONS
conversion_failed = 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.
IF tb_data[] IS NOT INITIAL.
IF tb_final[] IS NOT INITIAL.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\TEMP.CSV' "c_filename
filetype = 'ASC'
write_field_separator = ','
confirm_overwrite = 'X'
TABLES
data_tab = tb_final
fieldnames = tb_header "Headings
Thank you.
Regards,
Padmasri