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: 

DATA TRANSFER - How to get a SINGLE SPACE in the downloaded file from UNIX?

Former Member
0 Kudos

Hi Experts,

Am sending data from SAP to UNIX/ Application server and text file on desk top as well.

So, I am keeping a single character just SPACE at the END of each record.

Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.

Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.

But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!

Am doing every thing same in both cases.

So,

1 - Why its happening in case of UNIX file?

2 - How to get a SINGLE SPACE at the END in the downloaded file from UNIX?

thanq

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos

concatenate with a space at the end.. in unix I doubt if you would be able to see the space..

generally ppl use page breaker or line feed at the end of each row.

data: vl_feed type X value '/OD'.

7 REPLIES 7

former_member156446
Active Contributor
0 Kudos

concatenate with a space at the end.. in unix I doubt if you would be able to see the space..

generally ppl use page breaker or line feed at the end of each row.

data: vl_feed type X value '/OD'.

0 Kudos

thanq

I tried already, by CONCATENAting SPACE at the end of each record, NO USE!!

but, pls. eloborate,

generally ppl use page breaker or line feed at the end of each row.

data: vl_feed type X value '/OD'.

thanq

0 Kudos

data: co_line_feed TYPE x VALUE '0D'.
;;;;

CONCATENATE lf_line co_line_feed INTO lf_line.
APPEND lf_line TO p_output_file.
CLEAR lf_line.

0 Kudos

Which format did you use for the transfer in CG3Y. IF you did not use ASCII. try using it next time and see if that solved the problem.

0 Kudos

thanq

i was used the same ASCII from the beginning, but, NO USE

thanq

0 Kudos

thanq

I tried with suggestion of another expert in another thread, but, am getting syntax errorr saying that,

IF I USE CONCATENATE, the LF SHULD BE A CHARACTER TYPE, not " X " type

so, pls. let me know alterative, it bcom urgent for me

thanq

0 Kudos

Hi,

I don't know if this works:

perform SET_TRAIL_BLANKS(saplgrap) using 'X'.

perform SET_FIXLEN(saplgrap) using '0' '060'. "put length of your line from-to

... download ...

It will put space at the end of your line, according to the length.

Hope it works,

Chang