<span style='font-family:Verdana'><span style='font-size:12px'>Hi fellow Workflow Experts,<br />
<br />
I am trying to attach a smartform document as a PDF to a workflow User Decision task.<br />
<br />
As such in the binding I have the _ATTACH_OBJECT which is of type SOFM.<br />
<br />
The process for converting the SmartForm to PDF is pretty well layed out online.<br />
<br />
In a BOR object Method I am performing the following steps<br />
<br />
1) Get the function for the SmartForm using function SSF_FUNCTION_MODULE_NAME<br />
2) Call the SmartForm function retrieving the OTF Data<br />
3) Convert the OTF Data to PDF using function SX_OBJECT_CONVERT_OTF_PDF<br />
4) Attaching the PDF Hex data to a SOFM object<br />
<br />
What I am having difficulty with is attaching the PDF HEX data to SOFM.<br />
<br />
When I go to display the attached object it is corrupted. But if I do steps 1 to 3 in a program and download the PDF hex data the file is displayable.<br />
<br />
I have attempted to use the following functions<br />
SO_DOCUMENT_INSERT<br />
SO_OBJECT_INSERT<br />
SAP_WAPI_ATTACHMENT_ADD<br />
<br />
Hoping some kind sole has a working version of the above. Not just sending the PDF as a email attachment!!<br />
<br />
<span id="editor_signature"><span style="font-family:Verdana; font-size:12px">Regards<br />
<br />
David Cooper</span></span></span></span>