cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete some of work flow attachments....

former_member328875
Participant
0 Kudos

Hi Experts,

Please suggest me how can I delete 3 out of 5 work item attachments.

If I use SAP_WAPI_ATTACHMENT_DELETE. This FM ask Workitem_ID and this will delete all the 5 attachments items. Please go through attachments and suggest something.

Thanks,

Saquib

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can write a simple ABAP program , calling FM SAP_WAPI_ATTACHMENT_DELETE in a loop and pass multiple workitems to WI_ID to delete.

Regards,

Murali Krishna.

former_member328875
Participant
0 Kudos

HI Krishna,

Thanks for quick response but my concern is that in a single WI ID there are 5 attachments if I will pass WI ID as input parameter in this FM this will delete all five attachments.

I want to delete 3 specific attachments out of all these five. So suggest me how It can be done.

Thanks,

Saquib

former_member185167
Active Contributor
0 Kudos

Hello,

How about a combination of

SAP_WAPI_GET_ATTACHMENTS

SAP_WAPI_ATTACHMENT_DELETE

SAP_WAPI_ATTACHMENT_ADD


regards

Rick Bakker

former_member328875
Participant
0 Kudos

Hi Rick,

Pl see the below attachment. I received 5 attachments from SAP_WAPI_GET_ATTACHMENTS.


Same WI ID & Att_ID = Object Number from the attachment container; passed into SAP_WAPI_ATTACHMENT_DELETE

then executed the FM and got the messages "Attachment Deleted successfully but when I check in container all the

attachments are still showing none is deleted.


Please suggest the parameters first go through the attachment. This is little urgent. Hope for response.


In SAP_WAPI_ATTACHMENT_DELETE what should Do_Commit & Delete_Document .


Why not deleted if message coming its deleted in FM.


Thanks,

Saquib

former_member185167
Active Contributor
0 Kudos

Hello,

I've never used that FM myself but I would set DELETE_DOCUMENT = X and see if that works.

I hope you are trying this on a Test system first.

regards

Rick Bakker

former_member328875
Participant
0 Kudos

Thanks

it works but not removing from workitem after "successfully removed message" in FM.

Saquib