Blank line exists at the end of the download file

Question:
Dear gurus,
Anyone experienced this issue:
while I use 'DOWNLOAD' function, one blank line exists at the end of download file. We don't need this blank line.
Please throw your valuable points on this issue, thanks a lot!
Answer:
WS_DOWNLOAD does not add blank lines just by itself. If you don't need the blank line, don't put it in the file in the first place.
_________________
Oscar.
Answer:
Hi there,
Thanks for the response!
Please see the attached simple code, the new created file has a blank line at the end. ( Or maybe I should say the cursor is located at the new line)... I don't want to let that happen... Thanks a lot!
-------------------------------------------------------------------------
REPORT Z11 .
DATA: DATAFILE LIKE RLGRAP-FILENAME VALUE 'c:\temp\1.txt'.
DATA: BEGIN OF I_INFO OCCURS 0,
FAR_RECORD(254) TYPE C,
END OF I_INFO.
MOVE 'hfjsks' TO I_INFO-FAR_RECORD. APPEND I_INFO.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
* BIN_FILESIZE = ' '
* CODEPAGE = ' '
FILENAME = DATAFILE
FILETYPE = 'DAT'
* ITEM = ' '
* MODE = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* FILEMASK_MASK = ' '
* FILEMASK_TEXT = ' '
* FILETYPE_NO_CHANGE = ' '
* FILEMASK_ALL = ' '
* FILETYPE_NO_SHOW = ' '
* SILENT = 'S'
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
* IMPORTING
* ACT_FILENAME =
* ACT_FILETYPE =
* FILESIZE =
* CANCEL =
TABLES
DATA_TAB = I_INFO
* FIELDNAMES =
* EXCEPTIONS
* INVALID_FILESIZE = 1
* INVALID_TABLE_WIDTH = 2
* INVALID_TYPE = 3
* NO_BATCH = 4
* UNKNOWN_ERROR = 5
* GUI_REFUSE_FILETRANSFER = 6
* OTHERS = 7
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Answer:
WS_DOWNLOAD does not add blank lines just by itself. If you don't need the blank line, don't put it in the file in the first place.
Again, your 'problem' is in the file, not in the ABAP!
_________________
Oscar.

More Articles:

Error log in Batch input session?
How to avoid the ? making an input field on a dynpro mandat.?
Uploading an Excel file using ABAP?
Authorization Group Creation?
Standard Alv F4 function module?
Print Automatically?