Skip to Content
0
Former Member
Mar 07, 2008 at 09:42 AM

Convert smartform to RAW for mailbody

271 Views

Hi techies,

I have the following issue. I need to send a mail with attachments but I can't get the mailbody output right.

I'm using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' which works fine but I need to supply the mailtext in RAW format. My original text is a smartform.

I'm converting my Smartform (containing the mailbodytext) to RAW by outputting it to spool and converting it like this.

CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_RAW'

EXPORTING

format_src = 'OTF'

format_dst = 'RAW'

  • format_dst = 'ASCII'

CHANGING

transfer_bin = v_boolean

content_txt = i_soli_tab

content_bin = it_content_bin

objhead = it_objhead

len = v_length

EXCEPTIONS

err_conv_failed = 1

OTHERS = 2.

The problem is that the output table contains the correct text but the conversion can not handle Tab's, enters etc;

The output table is filled with ##### between the text where tabs and so should be:

any suggestions?

Kind regards,

Frederik Defour