cancel
Showing results for 
Search instead for 
Did you mean: 

sending attachment to WF using FM SAP_WAPI_START_WORKFLOW

kasithunuguntla
Participant
0 Kudos

Hi,

I have a custom cost maintenance program which will trigger the WF using FM SAP_WAPI_START_WORKFLOW whenever a user changes costs for a particular plant/material combination. These chages run into multiple lines of data. I would like to send this information to workflow as attachment in any readable format that is easy to code. (either word or notepad or any standard option that WF uses)

This will help the agents or receivers of WF to check the details of changes made prior to approval or reject. I have checked forum but could not find this specific requirement.

I was thinking of a approach given below. Please help me if my approach is wrong.

1. Create a new BO or use existing standard BO?? with method that will enable to attach objects. Here I am not really sure if there is any standard that I can use. Please advise.

2. Add this BO as mandatory container in Workflow builder so it expects attachment as input.

3. Fill the attachment??? or BO Container in my custom program before calling SAP_WAPI_START_WORKFLOW. - Not sure how exactly I need to do here. how do I convert to word or notepad. can I actually send lines of information to the standard attachment option of WF?

Request your inputs in this regard. appreciate your comments.

Regards

Kasi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think you can create a method that will display the report and may be use it in the Secondary method option of Method tab in an activity step.

Thanks

Arghadip

kasithunuguntla
Participant
0 Kudos

Hi Arghadip,

Thanks very much for your response. I resolved it myself. See details below.

I was thinking about the solution suggested by you but it would add another custom object. By the time I call SAP_WAPI_START_WORKFLOW, I have all the information about the changes made to the costs.

I resolved this situation by calling FM SWL_WI_NOTE_CREATE_WITH_TABLE after SAP_WAPI_START_WORKFLOW.

I used Workitem ID returned by SAP_WAPI_START_WORKFLOW and passed my internal table which contains all the cost changes to this FM SWL_WI_NOTE_CREATE_WITH_TABLE . It worked like wonder.

Thanks very much once again for looking into my problem.

Regards

Kasi

Answers (0)