cancel
Showing results for 
Search instead for 
Did you mean: 

Leave Request Task TS12300097: Status is not changed

Former Member
0 Kudos

Hi All

For the ESS version Leave Request, we are using a copy of standard workflow WS12300111.

When applying leave, the workflow template is triggered and processed to task TS12300097. In this task, we use customized rule to find agent.

In Universal Worklist, we can do the approval process and after approved, the leave request’s status is changed. But the problem is the approval task is still in the UWL, status is still “new” and the workflow template gets stuck at this step.

The description of TS12300097 said: Once you have processed the request, the work item will automatically be set to "completed." automatically be set to "completed."

And we can not find out why our leave request is not behave like that. Please kindly advise the possible reason.

Thanks a lot!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Jia Huang,

After you approve the leave, you will have to do 2 things in order for the workitem to complete. I assume you are running ECC.

1) Run posting program RPTARQPOST. This will post the approved leave into the Infotype 2001 as an absence. The request status will become "POSTED".

2) Run program RSWWCOND. This is a report that checks for pre and post conditions. The workflow WS12300111 has a "Wait for Status Change" event. After running, check the workflow/workitem via SWI2_FREQ and you should see that the workitem is set to completed. There's actually a configuation somewhere, which i can't remember, that sets this program as a batch job. Please correct me if I'm wrong, this should be set by the Workflow Admin, usually run as WF-BATCH.

Also, don't forget to run the report RPTARQEMAIL to send email to those relevant parties (AO, RO and etc). You should read the documentations to these 3 programs before running.

Hope I've been of some help.

Cheers,

Damien

Former Member
0 Kudos

Hi Damien,

You answer is very helpful. Thanks a lot! This 2 points is important when set the leave request WF.

But my problem is still there, after i post to IT2001, i still even not able to complete the Leave Approve task, that means, WF haven't come to 'Wait for Status Change' point, because it's after the TS12300097 completed.

I have a temp solution, Run program RSWWCOND in background, and manually set the complete condition to TS12300097, when status changed.

But i still don't understand when in ESS, manager approve the task, why the work item is not set to "Completed" antomatically.

Former Member
0 Kudos

Hi Jia Hong,

Thanks for the points given. The same problem occurred to me and therefore, I was able to share it with you.

For my understanding of leave requests, it comprises of 2 or more major parts.

i) The leave request

- This request's status will be set to 'APPROVED' after the approving officer approves the request.

- This request's status will be set to 'POSTED' after the posting program has been run.

ii) The workflow & workitem for the particular leave request.

- The status of the workitem can be 'STARTED', 'COMPLETED' etc.

Can I just check with you on a couple of things?

1) Before approving the leave request: Can you check in the next processor structure, is the data of the manager, who approved the leave, populated in it? You can see it in the containers tab in tcode SWI2_FREQ.

2) If the data isn't in, that means that manager wasn't defined as one of the agents to the workitem and therefore, even it it approves the request, the workitem won't be set to complete.

Suggestion:

If that's the case, maybe I can suggest that in your customized TS12300097 rule after finding the correct agent for approval, add the agent to the work item before the agent approves the request. You might have corrected the leave request aspect with the posting program I mentioned to you. Next, you will probably need to zoom into the workitem itself.

There are 2 function modules I used which worked for me:

Step 1: 'SAP_WAPI_GET_DEPENDENTS_WIS' - Find all the dependent workitems related to this request.

Step 2: Loop at the dependent workitems found from step 1 with the workitem-wi_type EQ 'W' ('W' denotes dialog step i think). Call the function module 'SWW_WI_AGENTS_CHANGE' to add the agent, that you found in your customized task ts12300097, to this workitem so that the agent becomes one of the possible agents to carry out this dialog step.

Step 3: Let the agent approve the leave request. If nothing goes wrong, the workitem will flow to the 'Wait for status change' step.

Step 4: Run posting program to post to IT2001.

Step 5: Run the RSWWCOND program to carry out the 'Wait for status change'.

Hope that this will solve your problem.

Regards,

Damien

Former Member
0 Kudos

Problem Solved!!

Apply note: 1501377. For the same issue, I raised OSS and SAP suggested me this note.

After applying this note and setting background job for RPTARQPOST.

Regards,

Ritesh

mraffel
Participant
0 Kudos

Ritesh,

thank you so very much for posting your solution here. This just saved our day and solved our problem as well.

Thanks again and best regards,

Mathias

P.S. Any tips how to clean up the work items that did not get changed? The SAP note addresses newly created absence requests after it is applied but how to clean up the mess?

SandySingh
Active Contributor
0 Kudos

Hi Mithias,

You can use Transaction SWIA  in production to manually complete the in-flight work items.

Refer to screenshot below

Regards

Sandy

mraffel
Participant
0 Kudos

Hi Sandy!

Thank you very much. That's what we used. First I went to PTARQ to list all the posted documents with WF status 'STARTED' and copied the list of WI ID's into SWIA.

Then I had to process one record at a time (complete manually).

And we applied the fix from SAP note 1501377. All is well again!

Thanks and best regards,


Mathias

SandySingh
Active Contributor
0 Kudos

Hi Mathias

SAP has introduced a mass operation option in SWIA transaction. You can complete or logically delete multiple workitem.. look  at the EDIT or GOTO options in transaction SWIA.

Thanks

Regards

Sandy

Former Member
0 Kudos

Thanks for help. But if i don't have any terminating event, the work item will not set to completed? if my must have terminating event, which object and event i should use? anybody done these leave request WF before?

Thank a lot

Former Member
0 Kudos

Hi Jia

I think the task launches a java application that will gather all the open leave requests for an employee and display all ofthem at once to the 'approver'. Does this happen? What does the workflow log say? Are you looking at the correct request? This task is not asynchronous so there no terminating events, so if not anything it should be in status 'STARTED'. i would get you to double-check the request and the workflow log.

Regards

Ravi

former_member184112
Active Contributor
0 Kudos

Hi,

An event that is used to stop a workflow or task, or change the behavior of an already started workflow is called Terminating Event.

If the event linkage is active and the linkage rules are satisfied, the status of the work item is set to COMPLETED.

Defining Event Linkage Terminating event linkage consists of 2 parts.

Type linkage which specifies business object type, event name, generic name for event receiver (WORKITEM for terminating events of tasks or EVENTITEM for wait for event steps)

Instance linkage which identifies the particular receivers (I.e. work item Ids) per object instance.

Terminating event linkages can be seen in SWE3.

Thanks and Regards,

Prabhakar Dharmala

Former Member
0 Kudos

Check whether there is any terminating event that is associated with this task. Unless this event gets triggered the task will not get completed.

Thanks

Arghadip