generate HTML output from SMARTFORM and send it as email body

There was a standard process in our system which sends a text as the body of a mail, after a certain operation is completed. For this program a change had been done so that the program could send a custom SMARTFORM as a PDF attachment beside to the text body. This change had been done as a repair in a program. So far so good, everything was working fine.
After then a requirement from the client was arisen. They wanted to see the attached PDF document inside the body of the mail. First we tried to populate the body text from the RAW format of SMARTFORM. Unfortunately the formats in the PDF, like tables, fonts, headings etc was not reflected in HTML body of the mail. With a bit detailed search on Google we found out that there are different Output Format options for SMARTFORM. And one of them is XSF Output+HTML which we should use in order to get a proper HTML output besides XSF(SMARTFORMS standard output). You can do this either changing the default output format of from the SMARTFORMS->Global Settings->Form Attributes->Output->Output Format to XSF Output + HTML or changing it from the code that triggers the smartform as we did in the below code. Using the second method we could get the HTML data in XMLOUTPUT of the returning structure.

You may also like

  • get PI business system of an SAP system (0)
    For certain SAP/XI integrations , other system may need to know SAP/XI business system name of the SAP system.You can use the following function module for this cases.
  • device management transaction codes (0)
    SAP IS-U is SAP's Industry specific solution for Utilities Industry.And Device Management is one of core modules of ISU package. Here you can find a list of all Device Management […]
  • mass cancel EO error messages from inbound queue (0)
    While getting PI messages into SAP system we got many erroneus message queues in . All these messages are type messages.¬†( For case¬†refer delete eoio messages from queue). In that cases […]