Application Development 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: 

File Download using GUI_DOWNLOAD to CSV format

Former Member
0 Kudos

Hi all,

I have an requirement that using GUI_DOWNLOAD to CSV format

i need to downloan 18 files at a time, but i am able to download up to 16.

remaining 2 fileds are not getting dowlloaded

Is there any restrictions in downloads ?

What might be the problem?

Please help me in this.

Thank You,

Sahiti

Edited by: Sahiti Reddy on May 9, 2008 12:56 PM

1 REPLY 1

Former Member
0 Kudos

Hi,

Here is a sample code for downloading .CSV file..

report ztest.

type-pools:TRUXS.

data: begin of itab occurs 0,

vbeln like vbap-vbeln,

posnr like vbap-posnr,

end of itab.

data: itab1 type TRUXS_T_TEXT_DATA.

select vbeln

posnr

up to 10 rows

from vbap

into table itab.

CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'

EXPORTING

I_FIELD_SEPERATOR = ','

TABLES

I_TAB_SAP_DATA = itab

CHANGING

I_TAB_CONVERTED_DATA = itab1

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

filename = 'C:\TEMP\test.TXT'

TABLES

data_tab = itab1

EXCEPTIONS

OTHERS = 1.

You can even refer this link...

Regards,

shiva