cancel
Showing results for 
Search instead for 
Did you mean: 

Leave request not approved but posted

Former Member
0 Kudos

Hi,

There is a pending work item in user's task list but when user click the request for processing, it returns blank screen.

When checked container of work item REQ-Status is POSTED,  while _Workitem-WorkitemStatus is STARTED. I also checked table PTREQ_HEADER for Document ID and it has 3 entries and Version 3 has Status POSTED.

User (Approver) said that he has not processed the request so how the leave has been posted? I am trying to find the reason but do not understand how is it happening. There are few such issue have reported earlier but frequency is very less and random for this issue. Not able to simulate the error in Quality environment.

Regards,

Amitesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member443899
Participant
0 Kudos

It does sound like the request has been approved and that the UWL wasn't refreshed, and then when the user tries to open it there is no request present.  Just in case you are still looking into this.

I would check the following:

- SWI1/SWIA -> Did the user or another user approve the request?  What status is it in?

- SE16 table SWWUSERWI will you see what requests are in the user's UWL list.  It shows active requests.

- in SA38 or SE38 there are many *PTARQ* programs related to leave request.  If you look at the posting program.  It can only post approved requests or ones that aren't attached to a workflow.

- SE16 check table V_T554S_WEB. This table will show you what workflows are being called for each type of leave for each grouping.  This may help if the workflow is not being called, if you want to try using the standard workflow, etc..

Hope this helps,
Doug

Former Member
0 Kudos

- SWI1/SWIA -> Did the user or another user approve the request?  What status is it in?

Yes. Request was approved by one user but he is not final level approver.


- SE16 table SWWUSERWI will you see what requests are in the user's UWL list.  It shows active requests.

In workflow task TS12300097 update container element REQ as REQ<-_WI_OBJECT_ID .

I don't understand how _WI_OBJECT_ID - STATUS is get updated as task calls ABAP class object CL_PT_REQ_WF_ATTRIBS ~ DUMMY which does nothing except raising one message.

former_member443899
Participant
0 Kudos

I've only used 1 level approval with Leave Request, but sounds like once the 1st level is approved than RPTARQPOST is sending the request through to HR.  In a 1 level situation as soon as the request is approved and the scheduled background job runs the request is posted / transferred to HR.

In your case the question is why is it using only the 1st level approval.  I assume its due to the statuses being used and maybe doesn't know how to deal with a 2nd level.

I'd check the following with an ABAP resource that knows workflows

- are the 2 statuses set properly.  maybe its set to completed too soon.

- does RPTARQPOST smart enough to know to wait for other levels to be done.  Think it just looks for completed status and the posts.  May want to see what options you have there.  It really shouldn't be completed until the 2nd level.

Sorry I haven't done two level with this specific application, but think a bit of debugging and searching you should figure it out.  I would though look closely at the statuses and how they are used to trigger the transfer to HR.

This post may have some links that could be helpful.  https://scn.sap.com/thread/3571681 -> Sid linked to some docs that may or may not be helpful.  There are a bunch of posts on SCN about multiple approvals.  So I would also double check the config to make sure it is setup as needed by this application.

Also try running the standard workflow in test and compare how they are different.  Does it post after the 1st level approval?  WS21500001 you can update the processing processes for a single group and single leave to use this workflow just to compare.

Good luck,

Doug

Message was edited by: Doug Robbins

Former Member
0 Kudos

Thanks Doug,

TS12300097 set the status to APPROVED. As link https://wiki.scn.sap.com/wiki/display/ERPHCM/Customizing+the+ESS+Leave+Approval+using+Business+Workf... shared by Mr Shamsudheen, every time after TS12300097 status must be changed to SENT except at final level. Since workflow is working correct in almost every case so I guess PTARQPOST ran and set POSTED before status was changed to SENT.

I will be looking for the customization to reset the STATUS to SENT, once gone through the code then only we can have exact reason for the issue. I will share details once I will have it.

Regards,

Amitesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Is it happening for any particular user i.e. either requestor or approver ? There are cahnces of having authorization issue. Please tell user to check t-code SU53 just after the incident.

Thanks,

Prakash

Former Member
0 Kudos

Dear Prakash,

Since status of Doc Id in PTREQ_HEADER is Approved/Posted so blank screen is coming as there is no data available for the request. The real issue is how the workitem status is changing to POSTED without workflow completion.

Regards,

Amitesh Prashar

former_member201570
Active Participant
0 Kudos

Hi ,

As the standard functionality only one level of approver is there , so first level is approved the status will be POSTED . in your case three level approver is there so after each level ( up to last level ) the status has to change POSTED to START . So enhancement has to do for the same. The below link will help you .

Customizing the ESS Leave Approval using Business Workflow - ERP Human Capital Management - SCN Wiki

regards,

shamsu

Former Member
0 Kudos

Thank you Former Member

I check workflow template and we have a custom task to reset the status from APPROVED to SENT.

The problem with the instance having error is that TS12300097 is setting value of status (_Wi_Object_ID - STATUS)  to POSTED instead of APPROVED. Since in custom code check is in place to reset the value from Approved to Sent but as status is not Approved but Posted so check fails and status does not change to Sent.

Can you please help me to understand how status is changing to POSTED instead of approved by task TS12300097? My initial thought was that may be PTARQPOST was run so that status was changed to Posted before it was reset to Sent. But same user is having few task assigned with same error at different time, so I am not sure if there is no issue with the standard task.

Thank you

KK07
Contributor
0 Kudos

Check the workflow log, it will have details about the approval time. you can also check if there is any background job for auto approval or something?

Former Member
0 Kudos

Hi Amitesh,

Are you using Standard workflow template for leave approval ? Please share more information.

Leave can be posted even though executing Program RPTARQPOST.

Regards,

Shailesh

Former Member
0 Kudos

Hi,

We are using custom workflow template as there are multiple approval level for some of the Absence type.

Leaves are being posted using RPTARQPOST but it will post only when Request status in table PTREQ_ATTABSDATA is Approved. The issue in the reported case is that 2nd level approver which is final approver has not approved the rquest (_Workitem-WorkitemStatus = STARTED) but REQ-STATUS is changed to POSTED.

Regards,

Amitesh