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

Fixed record length

Former Member
0 Likes
514

Hi All,

I' am trying to write data into application server using Transfer statement.

Sometimes data would not be present in last fields, so the file length is varying.

How to have fixed file length?

regards,

Aravind

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
486

Use LENGTH option of the TRANSFER statement.

4 REPLIES 4
Read only

Former Member
0 Likes
487

Use LENGTH option of the TRANSFER statement.

Read only

0 Likes
486

Hi Srinivas,

Even if I use 'Length' addition when I download the list, the record ends at the last character in the record. Is it how download works? When I do FTP ing whether it will work fine? If you have more info please pass it on to me.

Regards,

Aravind

Read only

0 Likes
486

I guess thats how the OPEN and CLOSE dataset work. I assume it would be fine if you do a FTP or reuse it in any other prog.

Sri

Read only

0 Likes
486

If you are downloading the file to application server with TRANSFER statement and LENGTH option, your spaces will be there at the end of the record. Just do not try to look at the file from within SAP environment (like using AL11). Try to get the file to your desktop and you can see that it will have those spaces.

If you using GUI_DOWNLOAD, then set the parameter TRUNC_TRAILING_BLANKS_EOL to SPACE (it is defaulted to 'X').