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

add space

Former Member
0 Likes
567

hi i have created a text file from internal table using open dataset statement. While giving this file to user there is a requirement to add a blank space at the end of each line of the file.

how i can add blank space at the end of each record / line using abap statements ??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
510

To get the one space at end of the each recod in your file,

increase the size of the last field /workarea length of the internal table by 1(to get space at end) and while transfering data from internal table to file using open datasets i.e in transfer stament specify the length of record of the internal table

ex:TRANSFER wa_itab TO g_file LENGTH l_wa_itab_length.

here l_wa_itab_length contains the length of workarea.

with this we can avoid the truncation of spaces at the end.

hope this will be helpful...

reward if needful...

Edited by: RAMESH KUMAR on Apr 28, 2008 8:23 AM

3 REPLIES 3
Read only

Former Member
0 Likes
511

To get the one space at end of the each recod in your file,

increase the size of the last field /workarea length of the internal table by 1(to get space at end) and while transfering data from internal table to file using open datasets i.e in transfer stament specify the length of record of the internal table

ex:TRANSFER wa_itab TO g_file LENGTH l_wa_itab_length.

here l_wa_itab_length contains the length of workarea.

with this we can avoid the truncation of spaces at the end.

hope this will be helpful...

reward if needful...

Edited by: RAMESH KUMAR on Apr 28, 2008 8:23 AM

Read only

Former Member
0 Likes
510

Hi,

You can try downloading it in binary mode.

Regards,

Raj.

Read only

Former Member