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: 

Read comma delimited file- end of file a special char

Former Member
0 Kudos

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.

5 REPLIES 5

hymavathi_oruganti
Active Contributor
0 Kudos

in GUI_UPLOAD,

There will be a parameter has_field_separator , give value as ','.

0 Kudos

0 Kudos

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.

0 Kudos

'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

0 Kudos

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..