cancel
Showing results for 
Search instead for 
Did you mean: 

need information on workflow for my scenerio

Former Member
0 Kudos

Hi Gurus,

I am using function module SWW_WI_START_SIMPLE to trigger my workflow.

Function module is running fine with subrc = 0 but I couldnt see any workflow triggered in the TCODE --- SWI1. am I looking in the right place. When the above fm runs where to see my result whether workflow triggered or not.

Very urgent. Please help. Struggling from last four days.

Ravi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

It seems that your workflow is not getting triggered. Are you passing the key fields properly as well as the Workflow Template in the FM. I will request you to start workflow using SAP_WAPI_START_Workflow. This FM is very effective.

Pass Workflow Template Number Concatenated with WS

<b>Reward points if useful</b>

Former Member
0 Kudos

when I ran with the fm you suggested it is throughing with an error stating ' Work Item ID Cannot Be Created' as an exception.

actually it is triggering from the sww_fi_create a sub function module in sap_wapi_start_workflow

Former Member
0 Kudos

I think you are not passing the right parameters. You need to pass the key fields in the container element. Please test SAP_WAPI_START_Workflow first and then you put the code. Just do a simple test. Probably you are not passing the key fields properly.

<b>Reward points if useful</b>

Former Member
0 Kudos

Thanks a lot Arghadip. This is my first workflow.Thanks for all your help.

First question is solved. As you suggested I checked while running the fm to trigger workflow, I found one mandatory parameter missing. I added and solved the issue.

one question is solved.

Second question is when it goes to an activity step in workflow which has three options approve , reject and cancel. I gave object type as selfitem and method as sendtaskdescription. I didnt passes any value in the method container

I am getting an error sendtaskdescription method is not executed.

Ravi

Former Member
0 Kudos

If you want user interaction then you should always have decision task. Now if you want to send mail then you can have the method you have described. Please note that you have to pass user ID or container element that contains SAP User Id prefixed with US..

<b>Please provide Points as we resolve issues for imparting knowledge and to encourage us you need to give points</b>

Former Member
0 Kudos

Arghadip,

I am not clear with the answer you provided for second question.

In my workflow, there are three steps ,

first condition step which is working fine

second step I have call a activity step which sends a workitem to the respective hr person based on the condition. This step is giving me an error stating the following error code ' Selfitem 000001591117 method sendtaskdescription cannot be executed'.

Please help me in doing this workflow.

How to test a task. Do I have to use swus for task also.

Ravi

Former Member
0 Kudos

Please check the binding from Workflow to Task

The AddressString Element in the Task should be binded with a SAP User Id Prefixed with US. Do this and it will work.

<b>Reward points if useful</b>

martin_nooteboom
Active Contributor
0 Kudos

Hi Ravi,

Try debugging the FM to see what happens. Maybe you can find out what is missing.

About awarding points, only award answers which are helpfull to you. You decide how helpfull they are. Don't give in to the threads from Arghadip to give him points so he will keep helping. This is not how the users should behave in this forum. This is about sharing knowledge and helping, not about getting points.

Regards,

Martin

Former Member
0 Kudos

Hi Martin

If you check the thread I have already helped in solving his issues. This is a forum of sharing knowledge and to encourage Workflow experts we can expect points but it always depends on the user who raised the question. If there is no concept of points for you, you can ask the users that you do not want points that would be so kind of you ))

Thanks

Arghadip

KKilhavn
Active Contributor
0 Kudos

> If you want user interaction then you should always have decision task.

I would say the decision task is something you use if you don't have time, resources or skills to use something better. You can develop your own wizards, your own approval screens and there are many ways to create a better user interface than a multiple choice selection box.

Former Member
0 Kudos

hai

In order to test whether the event is getting triggered or not, we can make use of Event Trace. Switch on the event trace using the transaction SWELS.

Press ‘Switch On”.

Now execute the program developed earlier. Now switch-off the event trace using the same transaction SWELS.

Now go to transaction SWEL. Here you can list out the events triggered in the particular period of time. Here is the event-trace list:

regards

rose

Former Member
0 Kudos

Hi Rose,

I didnt trigger workflow through event trace. I triggered the workflow with the function module sww_wi_start_simple. So I dont find any trace for that in swel, as swel is only for events

Ravi

Former Member
0 Kudos

whatever you trigger it will show up in SWI2_freq. Please be clear for which workflow you are triggering pass the relevant key fields in the FM and the relevant task or Workflow Templae for which you want to trigger workflow.

<b>Reward points if useful</b>

Former Member
0 Kudos

check in SWI2_freq.

Select Today

Dialog as well as Subworkflow

In the task portion give WS Concatenated with Woorkflow Template name like WS20000075.

<b>Reward points if useful</b>

Former Member
0 Kudos

Arghadip,

When I am executing through swus then only it is visible in the trnasaction you suggested.

When running the function module I dont find there. Please suggest me if I am doing somewhere wrong.