cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments problems with DIAPI

Former Member
0 Kudos

Hi all,

I want to add one or more attachments to an activity (contacts object in sap).

I have successfully added an attachment to sap using the attachments2 object.

I try to add an attachment to the activity with the following code:


    oContact.AttachmentEntry = 123 // where 123 is the code of the attachment given by attachments2 object
    oContact.Attachments.Add                                            
    oReturn = oContact.Update() 

When I get the list of the attachments associated with the activity, no attachments is returned by the function

Attachments of the contacts object.

Is there also a way to attach more than one file?

Executing more than once the above code don't have the expected result, it only overwrites the attachment entry.

regards gabriele

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

.Attachments.Add()

.Attachments.Item(0).FileName = "x.x"

.Attachments.Add()

.Attachments.Item(1).FileName = "y.y"

Former Member
0 Kudos

I have tried to do that but no result.

Moreover if I add an attachment with the diapi I can see on sap that the activity has the attachment but when I try to retrieve it with the diapi no result is found.

Instead if I add attachments in sap and try to retrieve them with the diapi using activity.attachments I can print out all the attachments inserted in the activity.

Edited by: gabriele on May 11, 2009 1:04 PM