Application Development and Automation 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 only

Pipe delimited File format

Former Member
0 Likes
1,629

Hi ,

How to write a pipe delimited file format in Appliacation Server.

Help me out to solve this.

Thanks.

Hi ,

How to write a pipe delimited file format in Appliacation Server.

Help me out to solve this.

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
976

HI,

check these links...

or do you mean application server?

then use open dataset. transfer and close dataset.

example:

DATA: e_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.

open dataset e_file for output in text mode.

lOOP AT it_datatab......

transfer it_datatab to e_file.

ENDLOOP.

close dataset e_file.

Regards

Sudheer

Read only

0 Likes
976

Hi sudheer,

Yes it is for appliaction server.

but my requirement is to have pipe delimited file in appliaction server.

at the end of each field i should have pipe symbol.

can you explain about the pipe delimited file.

eg : 1000|test the a|78989.090|hi sudheer|

Read only

0 Likes
976

The code is:

data: wa(100).

concatenate '1000' 'test material' '345' into wa separated by '|'.

This will write the three fields above into the work area with a pipe symbol between each field.

Please reward with points if helpful.

Read only

Former Member
0 Likes
976

Hi Raj,

Assume that you have an internal table ready to be written to the application server.

then do this

open dataset dsn for output in text mode.

loop at itab.

concatenate itab-field1 itab-field2 itab-field3...into v_str separated by '|'.

transfer v_str to dsn.

endloop.

close datset dsn.

  • dsn is the spplication server file name.

Regards,

Ravi