Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Is there a way to delete attachments through script

$
0
0

Hi All,

 

We tried deleting attachments of master agreement through script.

 

1. what we did was get attachmnet through this method.

2. iterate through collection.

3. then delete attachment.

 

But issue its not getting fully deleted. Attachment is not seen in UI but when I log the size of this collection.  it still shows the same value.

 

oAttachmentsColl=doc.getAttachments();

 

m_deleteAttachment(oAttachmentsColl){

iter=oAttachmentsColl.iterator();

com.sap.odp.api.ibean.IBeanIfc [] check = new com.sap.odp.api.ibean.IBeanIfc[oAttachmentsColl.size()];

cnt =0;

while(iter.hasNext()){

    attachmentBean = iter.next();

if (oAttachmentsColl.size() > 0) {

check[cnt]=attachmentBean;

   cnt++;}}

for(i=0;i<cnt;i++) {

     oAttachmentsColl.delete(check[i]);}}

 

Let me know how to resolve this

 

Regards,

Ankur


Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>