Hello,
I have a workflow that allows for individuals to both add and delete attachments using standard SAP class /IWWRK/CL_MGW_RT_WORKFLOW.
Function module SAP_WAPI_GET_ATTACHMENTS returns all the attachments currently in the workflow container, but this doesn't tell me what attachments were deleted.
How can I produce a log of the attachments added as well as deleted on the workflow?
My first idea was to:
1) put a background activity step before a dialog step to snapshot the attachments currently on the workflow.
2) Once the user completes the dialog step, have another step that compares the workflow container attachment contents before and after the dialog step, writing to a custom table the changes to attachments that have taken place.
My second idea was to:
1) Extend the /IWWRK/CL_MGW_RT_WORKFLOW class and override the CREATE and DELETE methods, adding my logging of what is actually happening, again using a custom table.
My third idea was to:
1) figure out how the SOOD table could be queried to see what attachments belong to the workflow, but I'm not sure how to tell whether the attachment is deleted. There must be a flag somewhere, because the record is retained in SOOD for an attachment even after the attachment is deleted.
If anyone has any ideas or dealt with this situation before, please share.
Thanks,
Mike