Hello experts,
I am trying to send the PDF attachment (output of a smartform)to the workflow inbox using the FM "SAP_WAPI_CREATE_EVENT"
.When i try opening the attachment i get an error message as "There was an error opening the document.The file is damaged and could not be repaired".
In the module pool program i am converting OTF data to binary using FM CALL FUNCTION'SX_OBJECT_CONVERT_OTF_PDF' and in the method of business object i am converting BINARY to XSTRING using FM CALL FUNCTION 'SCMS_BINARY_TO_XSTRING' and finally using the FM CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD' to attach the PDF to workitem.
Whereas if i try the same above steps and use CALL FUNCTION'SWW_WI_START_SIMPLE' instead of SAP_WAPI_CREATE_EVENT i am getting the desired results.
I wanted to use SAP_WAPI_CREATE_EVENT instead.Please tell me what changes i have to do to get my issue resolved.
Regards
Akmal