Skip to Content
avatar image
Former Member

Requirement to call Function Module in Workflow

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Apr 21, 2010 at 05:26 AM

    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..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2010 at 05:07 AM

    Hi,

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

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 21, 2010 at 05:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 21, 2010 at 04:19 PM

    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

    Add comment
    10|10000 characters needed characters exceeded