Skip to Content
author's profile photo Former Member
Former Member

Template text on dynpro to be sent by mail

Hi,

this is my first question in SCN so don't hesitate to tell me if it's placed in the wrong place.

We have following scenario which isn't working fine because it causes wrong formatting:

We have a dynpro where we want to display a long text (the goal is to send an e-mail at the end). The long text is a template text on entering the screen and this template we get by using a text module by SAP smart forms. We put this text module in a custom control using the method set_text_as_stream from class cl_gui_textedit. When the user is done with editing the text we want to send this text by e-mail. So we read the text with method get_text_as_stream from class cl_gui_textedit. And here we have the problem with the wrong formatting of the text module after the user changed it. We use the function module CONVERT_STREAM_TO_ITF_TEXT to convert the text to ITF to get more information about the formatting which was made in the custom control. After that we try to interprete this ITF-text to get a clean formated e-mail text. But our experience shows that the e-mail text isn't always right formated. For example when have a carriage return in the template text we lose this when we interprete the ITF-text and two words which were initial separated by the carriage return stick together.

As a conclusion: Do you know a way to avoid this formatting problems? If you know a better way to solve our scenario (template text on a dynpro which is sent by e-mail) please tell me and I'll try to adapt it.

Thanks.

Manuel

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Dec 07, 2015 at 11:25 AM

    Hi,

    I think it would be best to post your question here

    Web Dynpro ABAP

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 07, 2015 at 01:50 PM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Fred,

      thanks for your examples. But they don't fit for my scenario. Sending mails is not my problem and I know how to attach files to an e-mail. None of the examples combines all of my scenario (smartform in screen and sending text from screen).

      Regards,

      Manuel