cancel
Showing results for 
Search instead for 
Did you mean: 

Requirement to call Function Module in Workflow

Former Member
0 Kudos

Hi,

I have been assigned to task wherein i have a requierement like this . I have created a workflow with step user decision with 2 options. Now the thing is that when user select one of option i need to call function module and based on result from

workflow i need to done further processing. Since there is no event to trigger workflow i am using function module

SAP_WAPI_START_WORKFLOW to trigger workflow .

Kindly suggest me how would i call Function module in workflow. i.e. What are the ways( or by which step type facilitate

me to call FM ) by which i should call FM and do further processing based on result.

Thanks

Parag

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos

Follow the below steps inorder to call a fucntion module from the workflow

1. First you have to create either a business class or a Business object.... from SWO1 txn..

2. Create a method in the BOR and while created the system will prompt a message that would you like to create by using any FM here you need to specify the name of the FM that you want to use in the workflow...

3. ONce the method is created and the code will be generated automaticlaly by the system.. and then you have to create a standard task from PFTC txn..

4. Once the task is created then you have to use the same task in the workflow.. by creating a activity step ...

That's all..

Answers (3)

Answers (3)

saumya_govil
Active Contributor
0 Kudos

Hi Parag,

You can create an Activity step in the branch where you need to call the function module.

There in the activity step call a Business Object method inside which you can call your FM.

Make sure that the necessary bindings between the workflow, BO method and the Function modue are done properly.

Hope this helps!

Regards,

Saumya

suresh_subramanian2
Active Contributor
0 Kudos

Hello Parag Gavkar !

As Viji have rightly stated, create a method in your business object and inside the created method, call your your function module.

Once you created the method in this fashion,come to SWDD transaction code and use the step type ACTIVITY wherein you have create a task to call this newly created method.This way, you will be able to accomplish your task.

Regards,

S.Suresh

Former Member
0 Kudos

Hi,

Have you used any business object? If so, custmozied it and call the Function module inside the method.

Thanks.