Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

GUI_DOWNLOAD export cyrillic characters wrong.

Former Member
0 Likes
1,958

Hi,

I am using GUI_DOWNLOAD to export a table with two lines. One contains the column descriptions and the other contains values. The problem is with the header(the column descriptions). It contains cyrillic characters(in bulgarian language), and they are exported with other strange characters. I am using this code:

call function 'GUI_DOWNLOAD'

exporting

filename = a

filetype = 'ASC'

tables

data_tab =b

.

Can you help me?

Thanks,

Efren

14 REPLIES 14
Read only

Former Member
0 Likes
1,649

Hi,

     change the file type as 'BIN' if you are downloading the contents to a text file other wise you have to use 'ASC'. check with the file type properly.....

Regards,

SUDHEER KUMAR CH S M.

Read only

Former Member
0 Likes
1,649

Hi,

     change the file type as 'BIN' if you are downloading the contents to a text file other wise you have to use 'ASC'. check with the file type properly.....

Regards,

SUDHEER KUMAR CH S M.

Read only

Former Member
0 Likes
1,649

Hi,

     change the file type as 'BIN' if you are downloading the contents to a text file other wise you have to use 'ASC'. check with the file type properly.....

Regards,

SUDHEER KUMAR CH S M.

Read only

Former Member
0 Likes
1,649

Hi,

     change the file type as 'BIN' if you are downloading the contents to a text file other wise you have to use 'ASC'. check with the file type properly.....

Regards,

SUDHEER KUMAR CH S M.

Read only

Former Member
0 Likes
1,649

Hi,

     change the file type as 'BIN' if you are downloading the contents to a text file other wise you have to use 'ASC'. check with the file type properly.....

Regards,

SUDHEER KUMAR CH S M.

Read only

0 Likes
1,649

Hi,

I am exporting to CSV.

Thanks,

Efren

Read only

Former Member
0 Likes
1,649

Hi,

Try passing the valid code page value in the FM.

Read only

0 Likes
1,649

Hi,

How to determine the valid code page?

Thanks,

Efren

Read only

0 Likes
1,649

If you want to download the internal table in CSV file with the headings, first use SAP_CONVERT_TO_TEX_FORMAT to convert the itab to CSV formatted then use GUI_DOWNLOAD, mentioning the columns headings in a separate internal table and assign it to FIELDNAMES parameter in GUI_DOWNLOAD

TYPE-POOLS: truxs.

DATA: i_data TYPE truxs_t_text_data. 

CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'  

EXPORTING

     i_field_seperator          = ','

*   I_LINE_HEADER              =

*   I_FILENAME                 =

*   I_APPL_KEEP                = ' '

   TABLES

     i_tab_sap_data             = itab

CHANGING

    i_tab_converted_data       = i_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. 

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

* BIN_FILESIZE = FILENAME = 'c:\test.csv'

FILETYPE = 'ASC'

  IMPORTING

*FILELENGTH =

  TABLES

DATA_TAB = i_data      " internal table containing data

FIELDNAMES = i_column   " internal table containing headers

EXCEPTIONS

FILE_WRITE_ERROR = 1

NO_BATCH = 2

GUI_REFUSE_FILETRANSFER = 3

INVALID_TYPE = 4

NO_AUTHORITY = 5

UNKNOWN_ERROR = 6

Read only

0 Likes
1,649

Hi,

Thanks for your answer but my problem is not that the file is not exported in CSV. The problem appears only with the cyrillic characters. If I export in german or english, there are no problems.

However I tried your code I am getting the same results.

Efren

Read only

0 Likes
1,649

May be you have to install that language in your systemfor your Operating system...

Read only

0 Likes
1,649

If your MS office is not having the patch update for language related to bulgarian, then the language characters will not be displayed in correct manner. check with that...

Read only

0 Likes
1,649

Hi,

I am using OFFICE 2007. I can see the language(bulgarian) in the available languages.

Thanks,

Efren

Read only

Former Member
0 Likes
1,649

Hi,

Does anyone has other suggestions?

Thanks,

Efren