08-10-2007 5:35 AM
I have a file on Application server in binary.
While getting this file into internal tables, program is generating an extra line at the end with space in Char types and '0' in int types.
This is an extra blank line generated and not modification of last line. I am guessing since the file on Application server is binary, this problem exists.
Any idea to solve this?
Message was edited by:
Prasad Reddy
08-10-2007 6:37 AM
Hi,
While upload the file into Application server, there may be an extra line, let say if you are uploading the .txt file then if you press just a enter at the last line then this will upload a blank line, so in that same way this is happenging, here, the Int type fields will take the value 0 because the default value is 0.
if you want to delete this row, then use the DELETE statment after getting the line into an internal table
Regards
Sudheer
08-10-2007 5:39 AM
Hi Reddy
Do one thing
if u have internal table itab with extra line.
find the number of lines in itab.
DESCRIBE TABLE itab LINES lines.
loop at itab.
if sy-tabix = lines.
delete itab.
endif.
modify itab.
endloop.
or
delete table itab index lines.
reward points to all helpful answers
kiran.M
Message was edited by:
KIRAN KUMAR
08-10-2007 5:43 AM
shift v_char left deleting leading ' '.
Refer
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/shift.htm
08-10-2007 6:30 AM
08-10-2007 6:37 AM
Hi,
While upload the file into Application server, there may be an extra line, let say if you are uploading the .txt file then if you press just a enter at the last line then this will upload a blank line, so in that same way this is happenging, here, the Int type fields will take the value 0 because the default value is 0.
if you want to delete this row, then use the DELETE statment after getting the line into an internal table
Regards
Sudheer
08-10-2007 6:56 AM
Hi prasad,
This happens when you have an extra blank line in your file,
Assuming that you are using a text file, i suggest you this.
Open your text file that your using to upload data.
Place your cursor on the last line, last character and keep pressing delete button
till you notice that, there are no more blank spaces existing after the last character.
Eg: The text file u r using now will be somewat like this.
___________________
field1 field2 field3 field4
field1 field2 field3 field4
field1 field2 field3 field4
field1 field2 field3 field4
field1 field2 field3 field4
___________________
Here you can see a blank line after the data, so please delete this n chek again.
I am sure this will help you...
Regards,
SJ