Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Email sending error

Hi Gurus,

I am sending an email with HTM attachement.

I am reading the spool number and converting it into HTM format and sending this as attachement.

But attachment contains only half of the data. Rest it is deleting it and format is also miss matching. Each line is added with extra line space.

My code goes like this.

  • Submit report to convert the spool to HTML format

SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN

WITH rqident = p_spoolno. <spool number>

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = gt_listobj

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Convert the spool to HTML format

CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'

EXPORTING

REPORT_NAME = sy-repid

  • template_name = text-t01

TABLES

html = p_html_tab

listobject = gt_listobj.

Former Member
Not what you were looking for? View more on this topic or Ask a question