04-25-2006 5:39 AM
Hi All
We have a requirement to read a comma delimited file, i.e. each field separated by comma.
to complicate, end of line is NOT a carriage return.
Rather it's a special character #.
Now, how do I read this file?
I was using GUI_UPLOAD till now. But it seems to have provision only to read tab delimited files.
Any clues please/
Thanks.
04-25-2006 5:44 AM
in GUI_UPLOAD,
There will be a parameter has_field_separator , give value as ','.
04-25-2006 5:47 AM
04-25-2006 5:57 AM
Thanks.
I know about HAS_FIELD_SEPARATOR. But we cannot give ';' there. We can only say "x" or space. "X" means Tab delimited.
Now other topic which you posted Kishan, firstly thanks for that.
But that doesn't solve the problem if the end of line is not a carriage return.
It's a normal text file. End of line is a special character "#". So if i upload, everything comes under one line. I can use some logic and do it.
But is there any FM which takes the end of line?
thanks again.
04-25-2006 6:04 AM
'X' does not mean tab delimeter, space means tab delimeter.
u can give 'X' for has field separator and replacement = ','.
try like that and check once it may work
04-25-2006 6:23 AM
no... it doesn't work.
Replacement character is only for some conversion formats.
HAS_FIELD_SEPARATOR :
Doc of FM :
Description
Specifies if the fields in the file are separated by a tab. This is necessary if the structure passed contains several components. CR/LF occurs instead of a tab after the last field of a row.
Value range
'X': Fields are separated by tabs.
SPACE: Fields are not separated by tabs. In this cas
=====
REPLACEMENT :
Description
Specifies the replacement character to be used if a character cannot be converted during a character set conversion.
Value range
An individual character.
==========
Any clues now anybody? thanks again..