2010 Oct 13 12:49 PM
Hi All,
I am downloading a file in the local drive using f.m 'Download' in txt format. A blank line is getting inserted at the end of file .
please suggest how to delete the blank line.
Thanks
2010 Oct 13 1:42 PM
Hi ,
Before downloading it into local server using function module , are you passing the values to an internal table, if so then delete the blank line before passing it through function module. The deletion is poissible by passing the internal table through loop.
Try and let me know.
Thanks,
Vengalrao
2010 Oct 13 1:50 PM
Thanks for the response , but there is no blank line in the internal table
2010 Oct 13 10:06 PM
Hi Neha,
Do you have '#' value at the end of the records in your file or internal table? if yes this inserts a new line. Please check this as well..
Thanks
2010 Oct 14 8:31 AM
Hi Sumit,
I am appending a right arrow sign at the end of the file which is stored as # in my internal table, but even if I remove this right arrow from my file, i still get the blank line in my downloaded text file
2010 Oct 14 8:42 AM
Hi Neha,
Can you try to open the file and do control 'A' (Select all records) and see if you have a blank line at the end of the file.
Thanks
2010 Oct 14 9:03 AM
Hi Sumit,
If I open with word pad , the blank line is also selected. For your reference this is the downloaded file with the end of file indicator
A;N;00000000244800;10;PLSM-C16/1N-DW;Miniature Circuit Breaker;1;0;ST;1500;20;20;00000001;
B;N;00000000244800;PLSMC161NDW;Miniature Circ; ;0;0;0;4015082448004; ;X;0;; ; ;
Thanks
2010 Oct 14 9:32 AM
Hi Neha,
Ensure you dont have a blank line in the file. Either keep the cursor at the end of the last line and save the file again.
Or delete the last line by selecting it. when your uploading ensure you dnt have any blank line at the end of the file.it will be appended as a blank record in ur internal table
Thanks
2010 Oct 14 9:42 AM
Thanks for the responses,
there is no blank line in my internal table. Also, user won't be deleting the blank line manually from the file and then save it. I blank line should not be there in the downloaded file.
2010 Oct 14 4:22 PM
Hi Neha,
Use FM GUI_DOWNLOAD
and try with the following parameters in the import
TRUNC_TRAILING_BLANKS = 'X '
WRITE_LF = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WRITE_LF_AFTER_LAST_LINE = ' '
2010 Oct 14 4:34 PM
Hello Kash,
I am working in 4.6C and need to do it for a particular file type 'IBM' and 'GUI Download' doesn't support this file format.
2010 Oct 15 5:51 AM
2010 Oct 15 7:50 AM
hi ,
Then You can use FM "WS_DOWNLOAD".
Dont use ws_downloan it is OBselete , it will give error during Unicode convwerison from 4.7 to ecc 6.0
Try something different .
Regards
Deepak .
2010 Oct 15 8:04 AM
Sorry Deepak,
you're wrong, WS_DOWNLOAD is not obsolete in 4.6C, I just have looked before posting in our 4.6C system, and it supports the demanded file format!
Regards,
Klaus
2010 Oct 15 8:21 AM
HI ,
TRY USING ,
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\BARCODE\CODE.PRN'
FILETYPE = 'IBM'
TABLES
DATA_TAB = ITAB1.
Regards
Deepak.
2010 Oct 15 8:31 AM
hi ,
Read Documentation .
there are lots of function module which are there in 4.6 , which also works fine but sap
has not recomended to use as they are goin to remove it from further version ..
so it is always better to use GUI_download ....
we are now into ECC 6.0 ffrom 4.7 where testing is going on .
i have just replaced all ws_download , ws_upload by gui_upload and gui_download due to unicode conversion .
i AM Not proving you right or wrong , giving just information which might help you further .
Regards
Deepak.
Edited by: Deepak Dhamat on Oct 15, 2010 9:33 AM
2010 Oct 15 10:28 AM
Dear Deepak,
In 4.6 C GUI_Download gives a dump if u use any othe file type then 'BIN' and 'ASC'.
For your reference
Filetype parameter valid ?
CASE filetype.
WHEN 'BIN' OR 'ASC'.
WHEN OTHERS.
RAISE INVALID_TYPE.
ENDCASE.
Thanks and Regards
2010 Oct 15 10:45 AM
2010 Oct 15 10:57 AM
Thanks for your responses,
WS_Download doesn't solve the problem of eliminating blank line
2010 Oct 15 11:52 AM
Hi Neha ,
In 4.6 C GUI_Download gives a dump if u use any othe file type then 'BIN' and 'ASC'.
Actually it should not , because
go to se37 -> give -> GUI_Download ->
Press F7 or display you will find this code in it .
Filetype parameter valid ?
CASE prc_filetype.
WHEN 'BIN' OR 'ASC' OR 'DAT' OR 'DBF' OR 'WK1' OR 'VSS'. "--- New: VSS Format (JB/07-2006)
WHEN 'IBM'.
prc_filetype = 'ASC'.
prc_codepage = '1103'.
WHEN OTHERS.
MESSAGE ID 'FES' TYPE 'E' NUMBER '004' RAISING INVALID_TYPE.
ENDCASE.
this may be due to 4.6 otherwise in 4.7 i.e patch no 31 it should be there .
if it is not there then you need to try something different .
CHECK THIS CLASS "CL_GUI_FRONTEND_SERVICES" .
regards
Deepak.
Edited by: Deepak Dhamat on Oct 15, 2010 12:58 PM
2010 Oct 19 9:43 AM
2010 Oct 20 9:26 AM
Hello Deepak,
Thanks for your quick responses. are you aware of any other function module which resolves the problem of blank line apart from GUI_DOWNLOAD which I can use in 4.6C
2010 Oct 20 9:59 AM
Hi neha ,
If gui_download does not solve your problem , then there is only one option
try saving data in another format which will not have blank line at the end .
Otherwise you have to Fight all alone ....
because i have seen efforts of all experts you have replied you with there solution .
Still wait if any one might have experienced this kind of problem .
Regards
Deepak.
2010 Oct 14 8:41 AM
Hi,
FM DOWNLOAD is out of date, can You use FM GUI_DOWNLOAD for this? Is the problem still remaining?
Regards,
Klaus
2010 Oct 14 9:25 AM
keep the cursor right next to lastline in the file.if you keeping the cursor below the lastline it might taking it as new line and appending empty line.
2010 Oct 15 9:59 AM
Hi Neha ,
you can read Documentation for GUI_download ,
when you want IBM File type , then Gui_download function module
then changes it internally Codepage ='1103 ' and filetype='ASC'
WHEN 'IBM'.
prc_filetype = 'ASC'.
prc_codepage = '1103'.
Regards
Deepak.
2010 Oct 19 8:47 AM
Hi All,
I've tried WS_DOWNLOAD also and am still getting the blank line. I need to suppress this blank line in the txt file downloaded. Kindly suggest any other function module or method to suppress the blank line.
Thanks
2010 Oct 20 11:09 AM
Hi Madam,
you should use OO concept, pls use CL_GUI_Frontend Service method....
Your prob will get resolved...
if you want the code then provide me the email.
Thanks,
Prarthan.
2011 Jul 13 10:44 AM