Skip to Content
0
Former Member
May 29, 2007 at 09:20 AM

Reg: .CSV file

30 Views

Hi sapers,

I need to convert the ITAB data to .csv file. Here my problem is:

<b>As the ITAB contains a CURR field</b>

my piece of code is

DATA : i_csv TYPE truxs_t_text_data. " INTERNAL TABLE WITH COMMA.

data com type c value ','.

CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'

EXPORTING

i_field_seperator = COM

  • I_LINE_HEADER =

i_filename = p_file

  • I_APPL_KEEP = ' '

TABLES

i_tab_sap_data = inetbrtot

CHANGING

i_tab_converted_data = i_csv

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = v_pfile

FILETYPE = 'ASC'

  • WRITE_FIELD_SEPARATOR = 'X'

TABLES

data_tab = i_csv

fieldnames = infieldnames.

after executing my result is.

369;9.900 00-

258;1.000 00-

358264;13.161 36

and so on.....

but not the desired one , the correct one is

369;9900.00-

258;1000.00-

358264;13161.36

as the itab contains one CURR field m getting worst result.

plz help me out.

regards,

sri