Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Workflow - Attachments.

Former Member
0 Kudos

My requirement is to pass an excel sheet to my workflow.

I am actually triggering my start event thru a function module. Now is it possible to pass my excel sheet to the workflow via event container .ie. passing the excel sheet to an event parameter by function module and then to the workflow.

If yes how actually to do it? If no is there any workarounfd solution to this? Please suggest.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

All that you need to do is instantiate the SOFM object, create an instance forit by giving the document type as 'EXT' (pc document), if u dont want user to manually load the document, i.e, if it is in a fixed location in the presntatn server just get the path into the documentheader table as a parameter, and set No_dialog flag to X this way user wouldnt be promted for the path. Now put this into the event raising function modules tables parameter (of type swcont), it is automatically bound into the WF container, it is all yours to use now.

Hope that helps.

Cheers,

Arun

91 9443167531

4 REPLIES 4

ramki_maley
Active Contributor
0 Kudos

Sudipto,

How is the excel sheet made available to the FM that triggers the start event?

Thanks,

Ramki Maley.

0 Kudos

That is exactly what I want to know. How to attach an attachment to a function module so that it can be passed to my event parameter thru 'SAP_WAPI_CREATE_EVENT'.

0 Kudos

Hypothetically the following should work. No guaranties though, I have not heard of someone doing this before.

1) Since the excel file is available on a front end, you must have a user supply the file name & location.

2) Read the file into memory and insert it into a SAP Office folder (See FM SO_DOCUMENT_INSERT_API1).

3) Instantiate an SOFM object with the keys of the inserted document.

4) Supply the object reference as an event parameter.

Please bear in mind if the above solution works, it will only let the user/agent display the excel file. If your need is to let the user edit the file, you will have to come up with the mechanism to update the SAP Office folder document with the changes.

I also recommend that you post this query on the SAP-WUG forum. Follow the link below for FAQ on WUG.

/people/mike.pokraka/blog/2005/07/17/sap-business-workflow-faq

Cheers,

Ramki Maley.

Former Member
0 Kudos

Hi,

All that you need to do is instantiate the SOFM object, create an instance forit by giving the document type as 'EXT' (pc document), if u dont want user to manually load the document, i.e, if it is in a fixed location in the presntatn server just get the path into the documentheader table as a parameter, and set No_dialog flag to X this way user wouldnt be promted for the path. Now put this into the event raising function modules tables parameter (of type swcont), it is automatically bound into the WF container, it is all yours to use now.

Hope that helps.

Cheers,

Arun

91 9443167531