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: 

Problem in downloading file from application server

vaibhav_gorde
Explorer
0 Kudos

Hello ,

I am trying to download file from Application server to local drive using menu

System>List>Save>Local File in AL11 transaction. But I get data in a file which is visible on a screen and not the full string which is TRANSFER using another program on AL11.

Is there any way so that I can download whole file by changing some setting?

Vaibhav

4 REPLIES 4

Former Member
0 Kudos

hi,

look at this program ,this is used to download files from app, server to local system.

DATA:BEGIN OF WA,

NAME(20) ,

END OF WA.

DATA: IT_TAB LIKE TABLE OF WA WITH HEADER LINE.

DATA F2 TYPE STRING VALUE 'C:\SIVA\FILE1.TXT'.

DATA FNAME TYPE STRING VALUE 'd:\usr\sap\trans\HI.txt'.

BREAK-POINT.

break-point.

OPEN DATASET FNAME IN TEXT MODE FOR INPUT ENCODING DEFAULT.

DO.

READ DATASET FNAME INTO IT_TAB.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

APPEND IT_TAB.

ENDDO.

CLOSE DATASET FNAME.

break-point.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

FILENAME = F2

FILETYPE = 'ASC'

  • APPEND = ' '

WRITE_FIELD_SEPARATOR = '#'

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

DATA_TAB = IT_TAB.

  • FIELDNAMES =

  • EXCEPTIONS

  • FILE_WRITE_ERROR = 1

  • NO_BATCH = 2

  • GUI_REFUSE_FILETRANSFER = 3

  • INVALID_TYPE = 4

  • NO_AUTHORITY = 5

  • UNKNOWN_ERROR = 6

  • HEADER_NOT_ALLOWED = 7

  • SEPARATOR_NOT_ALLOWED = 8

  • FILESIZE_NOT_ALLOWED = 9

  • HEADER_TOO_LONG = 10

  • DP_ERROR_CREATE = 11

  • DP_ERROR_SEND = 12

  • DP_ERROR_WRITE = 13

  • UNKNOWN_DP_ERROR = 14

  • ACCESS_DENIED = 15

  • DP_OUT_OF_MEMORY = 16

  • DISK_FULL = 17

  • DP_TIMEOUT = 18

  • FILE_NOT_FOUND = 19

  • DATAPROVIDER_EXCEPTION = 20

  • CONTROL_FLUSH_ERROR = 21

  • OTHERS = 22

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

<b><REMOVED BY MODERATOR></b>

Siva

Message was edited by:

Alvaro Tejada Galindo

0 Kudos

Hello Siva,

Thanks for the prompt reply. I am aware of the programmatic approach to this problem. But Is there anyway we can make SOME setting to download full file from transaction AL11 using menu options?

--Vaibhav

andreas_mann3
Active Contributor
0 Kudos

use transaction CG3Y

and watch fm's from function group C13Z

A.

Message was edited by:

Andreas Mann

0 Kudos

Hello Andreas,

My file name is too long and exceding the limit of 'Source File Name' . Please help!

-- Vaibhav