2021 Feb 23 6:46 AM
Hello Folks,
facing some weird issue while triggering standard email.. which means adding my own body content to std. email body.
done enhancement for FM WLF_GET_MAIL_BODY_PDF_C and added below code.
CALL FUNCTION 'READ_TEXT'
EXPORTING client = sy-mandt
id = 'ST'
language = sy-langu
name = 'ZEMAIL_BODY'
object = 'TEXT'
TABLES
lines = lt_lines1.
ET_MAIL_TEXT = VALUE ltt_text( FOR lw IN lt_lines1 ( line = lw-tdline ) ).
how the data shown in Et_mail_text has attached one snap.

but in mail it's showing differently as below

can anyone, help me to solve this issue. ?
warm regards,
Mahesh
2021 Feb 24 7:03 AM
didn't find proper answer so.. there an alternative using offset of line and add them to table.
currently that's solve my problem.
hence closing this..
thanks,
Mahesh
2021 Feb 23 7:27 AM
Please edit your question, select your code and press the "CODE" button to make it correctly colorized/indented, so that it's easier for us to analyze it. Thank you.
Please show the images instead of hyperlinks, it avoids the pain to open and close each of them separately and repeatedly.
2021 Feb 23 7:37 AM
The question has been asked many times, but probably it's not easy to find them. By the way, that would help a lot if you'd tell us how you transfer ET_MAIL_TEXT to the email (there are many technologies, many ways to transfer).
2021 Feb 23 7:38 AM
One example with one technology and one way to do it: https://answers.sap.com/questions/10636114/email-question-txt-emails-are-formatted-fine-but-h.html
2021 Feb 23 7:56 AM
Hello Sandra,
its a standard code/process.
that modified table data can be seen below as std. process.

do let me know if any doubts?
regards,
Mahesh
2021 Feb 23 8:32 AM
Hello mahesh.drlng
What I see here is that you do not put any new line characters. In plain text email you need to take care of it with the \r or \r\n characters. Best if you use the CL_ABAP_CHAR_UTILITIES=>NEWLINE constant whenever you'd like to have a new line in your email.
I think this will solve your issue.
Kind regards,2021 Feb 23 9:16 AM
Hello Mateusz,
myself tried the same way earlier but of no use.
attaching ref.

thanks,
Mahesh
2021 Feb 23 9:43 AM
Keep adding new line characters but skip adding empty lines to the body of the email.
2021 Feb 23 10:39 AM
Hello Mateusz,
done the same thing but not working.
thanks,
Mahesh
2021 Feb 23 10:42 AM
In this case I propose you send the generated email to your email address and after receiving it you inspect the code of the email. There you should see why the text is being incorrectly formatted.
2021 Feb 24 7:03 AM
didn't find proper answer so.. there an alternative using offset of line and add them to table.
currently that's solve my problem.
hence closing this..
thanks,
Mahesh