on 2009 May 21 10:08 AM
Hi,
We are implementing the leave request application in EP 7.0.We are using two workflows for two types of leave, for the first type of the leave the approver is the line manager, for the second one the approver should be a holder of a certain position. We created the two workflows (using the standard WS12300111), made the adjustments in the task Approval process and in the type of leave processing, but in the leave request screen appears only the name of one approver, no matter what the type of leave is selected.
Please advise!
Regards,
Alice Modoran
Do this
You may need to use BAdi for these changes.
Inside the function module PT_ARQ_SEARCH_NEXT_PROCESSOR we have provided
the BADI where the customer can have their coding. There are methods
provided FILTER_NEXT_PROCESSOR and CHECK_SELECTED_NEXT_PROCESSOR etc.
Please check the BADI PT_GEN_REQ for more information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you having Different Rule groups for the absence type? Please check this
Under Rule group you determine how the approver should be identified
Also if you want to determine Approver for the different absence type, Your WF is correct method
but apart from this you can use the BADI PT_GEN_REQ, WHich is fairly easy to implement
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alice,
In the leave request screen appears only the name of one approver
It is SAP standart fucntionality ..
if you dont want to display that ....
by configuration U can achive that
Personnel Management -> Personnel Administration -> Personnel Data -> Employee self service -> Service Specific settings -> Working Times -> Leave Request -> Processing Process -> specify processing process of leaves types
In User Interface Elements
you need to unchcek "Display Field for Next Agent"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please confirm following.
1. Have you copied ws12300111 and made any changes to the rule of the workflow.
2. The reason that only one approver views the requets is because the actor table (PTREQ_ACTOR) is not getting field with appropriate vaule.
can you please check with se16 the PTREQ_ACTOR table entries and confirm if you find the position that is unable to view the entires.
also I assume that workflow is going to the right user but the issue is the approve unable to view actual leave requests.
Kindly confirm
Hi,
To be precise: we are using 12300111 for annual leave and it works, actually it worked until I've created this second WF for the sick leave, now the proposed approver for both types of leave is the one which is suppose to approve the sick leave. The second WF is a copy of 12300111 which I modified as follows: on the task approval process (a copy of the standard task) I've selected the position that the person who approves the request should have.
ok the issue here is that the workflow would go to the value of field &Agent_0001.Agents&.
this field is determined from the leave application. My suggestion is use the badi that siddharth suggests and determine the alternate approver. Make sure the actor table that I was refering to is filled with the position that is the approver of the sick leave.
There is an issue with the way you have approched the change.
Use badi instead of modifying the workflow. you can use same workflow for both leaves by using badi.
Personnel Management -> Personnel Administration -> Personnel Data -> Employee self service -> Service Specific settings -> Working Times -> Leave Request -> Business Add-Ins (BAdIs) -> click up on BAdI: Control Processing Processes for Time Management Web Applications .
and then you need to implement BADI PT_GEN_REQ .
Hi,
I have implemented BADI PT_GEN_REQ, but now there is no approver proposed in the portal.
The two types of leave are now in the same rule goup and I have attached a custom workflow to each type of absence. I can see both types of leave in the portal, but I don't have an approver for neither of them.
Sugestions?
Regards,
Alice Modoran
Hi Vivek,
Maybe this will sound a little bit more logical....our client wants that the annual leave to be approved by the line manager, whereas the sick leave to be approved by the person holding the position of medical coordinator...it has some sort of logic, the problem is that I dont know if this can be implemented in SAP without doing some ABAP coding (I don't write ABAP code). If you have any ideas I will be very glad to hear them because at the moment I am stuck.
Best regards,
Alice Modoran
Hey you requirement is big shot to head .
I will give you process logic to you ,,,, while implementing this take you ABAP help .
See once you implemented PT_GEN_REQ BADI in that..
You need give following logic for coding.
You need to select the data from PA0105 to get the pernr of userid
Select PERNR from PA0105 into P_PERNR
where SUBTY = u20180001u2019
and USRID = sy-userid.
You need to select the data from PTREQ_ATTABSDATA .
Select * from PTREQ_ATTABSDATA into table ( itab )
where PERNR = P_PERNR
And INFOTYPE = u20182001u2019 .
Once you get the data in the i_ PTREQ_ATTABSDATA .
Loop at I_PTREQ_ATTABSDATA .
If SUBTY = u201Cannual leaveu201D
****Then for finding the line manager code****
Select * form pa0001 into table i_pa0001
Where PERNR = P_PERNR
Loop at I_PA0001 .
Select * from HRP1001 into i_HRP1001
Where OBJID = I_PA0001-ORGEH ( Org unit )
For line manager.
Loop at i_HRP1001 where RSIGN = u20182u2019
And RELAT = u2018002u2019.
Select * from PTREQ_ACTOR into table I_ PTREQ_ACTOR
Where ACTOR_ID = PTREQ_ATTABSDATA- ITEM_ID
Loop at I_ PTREQ_ACTOR .
Move ( line manager penr[ which you will get from i_HRP1001 ] ) to
PTREQ_ACTOR-OBJID .
Modify table i_PTREQ_ACTOR
Endloop.
Update PTREQ_ACTOR from i_ PTREQ_ACTOR.
End loop.
End loop.
End loop.
****Then for Chief code code****
Select * form pa0001 into table i_pa0001
Where PERNR = P_PERNR
Loop at I_PA0001 .
Select * from HRP1001 into i_HRP1001
Where OBJID = I_PA0001-ORGEH ( Org unit )
For Chief code.
Loop at i_HRP1001 where RSIGN = u2018Au2019
And RELAT = u2018003u2019.
Select * from PTREQ_ACTOR into table I_ PTREQ_ACTOR
Where ACTOR_ID = PTREQ_ATTABSDATA- ITEM_ID
Loop at I_ PTREQ_ACTOR .
Move ( line manager penr[ which you will get from i_HRP1001 ] ) to
PTREQ_ACTOR-OBJID .
Modify table i_PTREQ_ACTOR
Endloop.
Update PTREQ_ACTOR from I_ PTREQ_ACTOR.
End loop.
End loop.
End loop.
Endloop.
User | Count |
---|---|
104 | |
10 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.