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

Text file alignment SAP

Former Member
0 Likes
2,757

Hi ,

i have requirement of sending text file attachment to mail . mail is sending properly , but in alignment part i am not getting the correct data under the heading.txt.png

7 REPLIES 7
Read only

SimoneMilesi
Active Contributor
0 Likes
2,324

Hi Priya,

your question is quite vague: we do not know what are you doing to build the email and the attachment: how can we help you without any information?
When you open a question, it's always better providing all the information (which does not mean to just dump here all your code!) you think can help us in helping you.

Identify the area in your development you think it's causing the problem, share the relevant piece of code and tell us what did you already attempt.

In this way you'll not have as answer something you already tried and we can be more specific (and useful)

Read only

Former Member
0 Likes
2,324

Hi Simone Milesi,

I am trying to send a report output to email as a text file. while opening the .TXT attachment , i am not getting the proper alignment like Heading and line item data is not matching (please refer the image &code attached).

Expected output :

txt.pngcode.txt

Read only

0 Likes
2,324

Since it looks to be a TAB separated file, have you tried opening it something else than a text editor, like for example in Excel? Text editors often don't show the correct alignment when using tabs.

Read only

Former Member
0 Likes
2,324

i am having a requirement of converting output to both excel and text file based on company code condition. This is my test program . In Excel i am getting the correct output , while converting output to text file i am facing this issue

Read only

0 Likes
2,324

so what did the output you get? if you copy the data in txt file and paste to excel, would it be in separate tab as expected? if it does then it could be how notepad display that file.

Read only

0 Likes
2,324

As Quynh Doan Manh confirms what I said, there most likely is no issue with your program. The issue is with the text editor. Just try to create the information manually is notepad and you'll see the same time as your getting from your program.

Read only

Former Member
0 Likes
2,324

Thanks for your answers.

As you suggested , I have copied text file data and pasted it in excel , the data is showing correctly with separate tab as expected in excel .May be issue with text editor only .