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

Fields separated by comma using GUI_DOWNLOAD

Former Member
0 Likes
3,462

Hi All,

I want to download internal table data separated by comma.

I am using GUI_DOWNLOAD function module.

I am using separator as comma,but still the data is getting downloaded as Tab delimited.

Please let me know what needs to be done.

Thanks,

SP

<thread moved, has nothing to do with ABAP Objects. Please choose your forums more carefully in future>

Edited by: Mike Pokraka on Aug 18, 2008 3:09 PM

5 REPLIES 5
Read only

narin_nandivada3
Active Contributor
0 Likes
1,413

Hi,

Please check this solved thread

This would solve your issue.

Good luck

Narin

Read only

Former Member
0 Likes
1,413

Hi,

Check this sample code,

TYPES:
  BEGIN OF type_itab1,
    string TYPE string,
  END OF type_itab1.

DATA:
  BEGIN OF itab OCCURS 0,
    vbeln  LIKE vbap-vbeln,
    posnr  LIKE vbap-posnr,
  END OF itab.

DATA:
   wa_itab TYPE type_itab1,
   itab1   TYPE STANDARD TABLE OF type_itab1.

SELECT vbeln
       posnr
    UP TO 5 ROWS
  FROM vbap
  INTO TABLE itab.

SORT itab.

DELETE ADJACENT DUPLICATES FROM itab COMPARING ALL FIELDS.

LOOP AT itab.
  CONCATENATE itab-vbeln
              itab-posnr
         INTO wa_itab-string
         SEPARATED BY ','.
  APPEND wa_itab TO itab1.
ENDLOOP.

CHECK sy-subrc EQ 0.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = 'D:\temp\test.txt'
WRITE_FIELD_SEPARATOR = ','
FILETYPE = 'ASC'
CHANGING
DATA_TAB = itab1.

Regards

Adil

Read only

Former Member
0 Likes
1,413

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename = p_file_temp

filetype = 'DBF'

append = space

write_field_separator = ','

TABLES

data_tab = i_final_data

Pls try this

Read only

Former Member
0 Likes
1,413

pass the value in

write_field_separator = ','

Read only

Former Member
0 Likes
1,413

ok