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: 

Open dataset/separated field by | in the file.

0 Kudos
181

Hello,

I use open dataset to create a file in the application server. I write in the file without problem. I would like to separate column in the file by pipe '|' and I would like also to fixe column.

Someone can help me ?

Regards

5 REPLIES 5

Jelena
Active Contributor
88

Please make some effort to find an answer before posting a question on SCN. I literally copy-pasted the keywords from the question into Google and found many posts with the same question:

https://www.google.com/search?q=create+file+separated+by+pipe+site%3Asap.com

0 Kudos
88

Thank you for your answer.

The question is not about the separation of the columns by the pipes. but it is rather on the fixing of the columns.

I would like to keep the spaces as in the example below :

0 Kudos
88

it seems that you want a fixed length file. you should write using specific offsets. For example,

field(1) = '|'.

field+1(9) = '1000x0002'.

field+10(1)= '|'. and so on...

Jelena
Active Contributor
0 Kudos
88

dchipinda - have you tried anything so far to achieve that? Have you checked in ABAP Hep if a suitable command exists? There is a whole section on working with strings.

My note still stands. Please make some effort and then mention in the question what have you tried so far, what was the result and what is not working. Otherwise it reads as if you're asking others to write a program for you and I doubt anyone is interested in that.

Please see this blog on how to ask better questions.

Thank you.

Sandra_Rossi
Active Contributor
88

There are lots of ways to generate file contents. What solution did you use that does not satisfy you and why?