Thursday, April 10, 2008

Updating the absence infotype

I need to update the absence infotype record with the attachment after the employee's leave request is approved by the manager.

I have the attachment in my workflow work item. I can extract the attachment from workflow using Function Module (FM) "SAP_WAPI_GET_ATTACHMENTS". However, this is returning the attachment as "SOFM Object".

I am using the following FMs to create the archive and add a link to PREL Object with proper key:

  1. ARCHIVE_CREATE_FILE
  2. ARCHIVE_CREATE_TABLE

How can I convert the SOFM Object either into a file or to a binary object format so that we can use the above FMs?

Use Function Module "SO_DOCUMENT_READ_API2" to read the contents of the SOFM and then pass it on to the appropriate archiving Function Module.

No comments:

Blog Archive