Hi Alex,
So I guess you are using method from a class? You can try omitting the SWC_SET_TABLE, just use the SAP_WAPI_ATTACHMENT_ADD to add the PDF in your workflow using the header WI_ID. Test it and check the logs if your attachment appears in the workflow logs (container _Attach_Objects). You might not need to export the SOFM back to your workflow since you already attached it. I really hope this will work.
Cheers,
Dexter