cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment doesn't appear in receiver's BWP

Former Member
0 Kudos

Hi all.

I am having some problems attaching documents from webdynpro to workflow.

The requirement consists mainly of two objects: webdynpro and workflow. Webdynpro object implements a form with the option to attach files. When the form is accepted, it creates the event that launches the workflow. Next, webdynpro attachs the files with FM SAP_WAPI_ATTACHMENT_ADD. Workflow receives and displays the attachments in a user decision step adressed to the members of a role.

In the decision step the attachments' link appear but it's not possible to open them; the error says "System error in asynchronous method start". However, if I examine the log of the workflow's issuer I can see the attachments without problems.

Thanks in advance.

PD: Sorry for my english...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Once the Workflow has been triggered by Web dynpro application, create a background step in WF and attach file using FM

SAP_WAPI_ATTACHMENT_ADD.

Once this is done, pass this attachment to the decision step and user will be able to see it.

If you need additional data to be passed to workflow, you can pass it using container while triggering the workflow from Webdynpro appliaction.

Regards,

Sangvir Singh

Former Member
0 Kudos

Hi Sangvir.

The problem is not to attach the files, this operation is correctly done by webdynpro application using the FM SAP_WAPI_ATTACHMENT_ADD. In fact, the attachments appear in the workitem. The problem is that clicking on the files they don't open and the system shows the error message "System error in asynchronous method start".

Thanks.

Former Member
0 Kudos

Hi Jose,

Have you checked the Return code of SAP_WAPI_ADD_ATTACHMENT? If it attached properly then it should open in the Business workplace.

What the extension of the attached file?

Thanks.

Former Member
0 Kudos

Viji, the return code is 0, the attachment is properly attached. The strange thing is that the files appear and can be visualized from the sender user's log but not from the receiver's workitem.

I'm just doing tests with a txt file. Really, the workflow must be prepared to receive any kind of file. I don't mind the sending operation because it belongs to webdynpro application developed by another fellow team member. But I would like to ensure that the workflow receives and displays the files correctly.

Thanks,

Regards.

Edited by: Jose Alba on Oct 1, 2010 9:38 AM

Edited by: Jose Alba on Oct 1, 2010 10:11 AM

Former Member
0 Kudos

HI,

I guess the attachment is opening in new SAP window.

Add authorisation of T code SWO_ASYNC to the user and make sure user have atleast one session left to open attachment in new window.

Regards,

Sangvir Singh

Former Member
0 Kudos

Thanks Sangvir.

This was the solution. The strange thing was that in some users the files could be opened but not in others users. I assumed that the question was related to some kind of authorisation or something like this. Right, authorisation of SWO_ASYNC.

Thanks again.

Regards.

Answers (2)

Answers (2)

Former Member
0 Kudos

Go to SWI1 and check the workflow log of your workflow.

In the log for decision step, kindly check if you find any entry under AttachObjects.

It would be something like this :

AttachObjects[1] AttachObjects[1] SOFM:FOL33000000000004EXT35000000002103

Now execute BOR object SOFM in Swo1 and put this key e.g. FOL33000000000004EXT35000000002103 and run display method.

this will clarify whether attachment has been attached properly or not.

Regards,

Sangvir Singh

Former Member
0 Kudos

Sangvir, I've done what you said. The display method works correctly, it shows the file without problems from transaction SWO1, then I guess that the attachment is correctly attached. However, it cannot visualize from workitem.

Thanks,

Regards.

Edited by: Jose Alba on Oct 1, 2010 9:34 AM

Former Member
0 Kudos

Go to SWI1 and check the workflow log of your workflow.

In the log for decision step, kindly check if you find any entry under AttachObjects.

It would be something like this :

AttachObjects[1] AttachObjects[1] SOFM:FOL33000000000004EXT35000000002103

Now execute BOR object SOFM in Swo1 and put this key e.g. FOL33000000000004EXT35000000002103 and run display method.

this will clarify whether attachment has been attached properly or not.

Regards,

Sangvir Singh