on 09-16-2014 2:22 PM
Hi all,
we are in ehp7.
in our scenario, when employee applies leaves for less than 10 days, the approvers should be persons A and B.
when employee applies leaves for 10 or more days, the approvers should be persons X and Y.
for this we tried to use the method IF_EX_PT_ABS_REQ~GET_MULTIPLE_APPROVERS of Leave Badi ZCL_PT_ARQ_REQ_EXIT, using the blog http://scn.sap.com/docs/DOC-41537
in the leave approval screen, when we select a leave type, the method IF_EX_PT_ABS_REQ~GET_MULTIPLE_APPROVERS is getting called.
but we want to call this method after the employee puts the leave dates, so that we can take the decision based on leave days count.
is there any way to change/add/remove approvers, via SIMULATE_VIA_BLOP method or any other place, because SIMULATE_VIA_BLOP is getting called, when the employee clicks on send leave request.
is there any other way to incorporate approvers based on leave count.
thanks,
Madhu_1980
You can copy the standard workflow WS21500001 and do customization.
In your custom workflow, before approval step, you validate the no.of leaves and get the ACTOR details and pass the ACTOR in approver task.
This will be good way and you can have track of approvers in each level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
There is an attribute ACTOR_AGENT in the class ZCL_PT_ARQ_REQ_EXIT. In that we have OBJECT_INFO which will have employee record and the approver record. try changing the approver details based on the number of days in the method SIMULATE_VIA_BLOP.
Else you can change the rule to find the approver based on the number of days in the workflow approval task.
Regards,
Jyothi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jyothi,
we are trying to add one more level of approver, when the no. of leaves are more than 10.
There is an attribute ACTOR_AGENT in the class ZCL_PT_ARQ_REQ_EXIT. In that we have OBJECT_INFO which will have employee record and the approver record. try changing the approver details based on the number of days in the method SIMULATE_VIA_BLOP.
in ZCL_PT_ARQ_REQ_EXIT-ACTOR_AGENT-OBJECT_INFO, while adding new actor/approver, it expects IDs which are internally used.
also, when i removed a row from ZCL_PT_ARQ_REQ_EXIT-ACTOR_AGENT-OBJECT_INFO, in simulate_via_blop via debugging, it gave error:
Exception 'CX_OS_OBJECT_STATE' was raised, but it was not caught anywhere
along the
call hierarchy.
Since exceptions represent error situations, and this error was not
adequately responded to, ABAP program 'CB_PT_REQ_ACTOR===============CP' had
to be terminated.
Else you can change the rule to find the approver based on the number of days in the workflow approval task.
That's a very good point and probably the cleanest way, though it's only usable if he uses a workflow and not the dedicated POWL scenario.
currently, in MSS, Managers are using POWL to approve leaves. (we dont have EP, so not using UWL). If we modify the workflow, does it mean that Managers cannot approve/reject via POWL.
Hi Madhu,
we don't use the multi level approver functionality and I don't entirely understand whether you are using the OVS Searchhelps or whether the approvers are polled entirely automatic in your business scenario, but just to make sure you don't miss anything, you might want to check BADI PT_GEN_REQ Methods IF_EX_PT_GEN_REQ~SEARCH_FOR_NEXT_PROCESSOR and IF_EX_PT_GEN_REQ~FILTER_NEXT_PROCESSOR as an alternative to SIMULATE_VIA_BLOP in PT_ABS_REQ.
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.