on 05-20-2009 12:45 PM
Hi,
We are using ESS portal version.
I have configured Leave encashment. I have implemented the BADI - HRPBSIN_GET_LE_APPRV to determine the approver of the leave encashment.
Now when an employee creates a leave encashment request, it is getting created. Values can be found in T7INLEAVE_EN_TR table. The approver is getting populated from the BADI. But still the workflow is not getting triggered. In IMG they have mentioned that the workflow will begin automatically if we maintain the approver using the BADI - HRPBSIN_GET_LE_APPRV.
Am I missing any setting related to this workflow?
regards,
suresh
Hi Suresh,
If you have followed all the steps mentioned above by our friends, then have a look at the below code in the include
LHRPBSINLEAVE_ENCASH_RFCF01.
*Get the next first level approver.
If the ev_is_self_appr is set then do not trigger workflow. dirctly approves the request.
CALL FUNCTION 'HR_IN_LEAVE_ENCASH_GET_APPR'
EXPORTING
is_p0001 = gs_p0001
iv_appr_lvl = '1'
iv_reference = ps_leave_en_overview-reference
iv_reimb_typ = ps_leave_en_overview-reimb_typ
iv_req_begda = ps_leave_en_overview-request_begda
IMPORTING
ev_appr_id = p_approver_id
ev_is_self_appr = lv_is_self_appr.
IF lv_is_self_appr IS NOT INITIAL.
*TODO: write code for self approval case.
ELSE.
IF p_approver_id IS NOT INITIAL.
refresh lt_agents.
ls_agent-objid = p_approver_id.
ls_agent-otype = 'US'.
APPEND ls_agent TO lt_agents.
ls_input_cont-element = 'USER'.
ls_input_cont-value = p_approver_id.
APPEND ls_input_cont TO lt_input_cont.
ls_input_cont-element = 'Agent'.
CONCATENATE 'US' p_approver_id into lv_agent.
ls_input_cont-value = lv_agent.
APPEND ls_input_cont TO lt_input_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS18900044'
language = sy-langu
do_commit = 'X'
USER = SY-UNAME
IMPORTING
return_code = lv_return_code
workitem_id = l_workitemid
new_status = l_status
TABLES
input_container = lt_input_cont
agents = lt_agents.
-
Save workitem id of workflow template.
workit_id = l_workitemid.
The above code triggers the workflow for leave encashment , as you are saying you have implemented the approver BADI
then p_approver_id will not be initial and the workflow should get triggered. But even if it is not triggereing then there might be an issue like the workflow task is not made as general task clicking on the header data of workflow template 'WS18900044'.
In any case you can keep a break point at this code in the include and exactly check where you are going wrong. Let me know what you get once in debug mode.
Regards,
Santosh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
If you have followed all the steps mentioned above by our friends, then have a look at the below code in the include
LHRPBSINLEAVE_ENCASH_RFCF01.
CALL FUNCTION 'HR_IN_LEAVE_ENCASH_GET_APPR'
EXPORTING
is_p0001 = gs_p0001
iv_appr_lvl = '1'
iv_reference = ps_leave_en_overview-reference
iv_reimb_typ = ps_leave_en_overview-reimb_typ
iv_req_begda = ps_leave_en_overview-request_begda
IMPORTING
ev_appr_id = p_approver_id
ev_is_self_appr = lv_is_self_appr.
IF lv_is_self_appr IS NOT INITIAL.
*TODO: write code for self approval case.
ELSE.
IF p_approver_id IS NOT INITIAL.
refresh lt_agents.
ls_agent-objid = p_approver_id.
ls_agent-otype = 'US'.
APPEND ls_agent TO lt_agents.
ls_input_cont-element = 'USER'.
ls_input_cont-value = p_approver_id.
APPEND ls_input_cont TO lt_input_cont.
ls_input_cont-element = 'Agent'.
CONCATENATE 'US' p_approver_id into lv_agent.
ls_input_cont-value = lv_agent.
APPEND ls_input_cont TO lt_input_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS18900044'
language = sy-langu
do_commit = 'X'
USER = SY-UNAME
IMPORTING
return_code = lv_return_code
workitem_id = l_workitemid
new_status = l_status
TABLES
input_container = lt_input_cont
agents = lt_agents.
*-----Save workitem id of workflow template.
workit_id = l_workitemid.
The above code triggers the workflow for leave encashment , as you are saying you have implemented the approver BADI
then p_approver_id will not be initial and the workflow should get triggered. But even if it is not triggereing then there might be an issue like the workflow task is not made as general task clicking on the header data of workflow template 'WS18900044'.
In any case you can keep a break point at this code in the include and exactly check where you are going wrong. Let me know what you get once in debug mode.
Regards,
Santosh.
Edited by: santosh naidu on Jun 29, 2009 3:29 PM
Edited by: santosh naidu on Jun 29, 2009 3:45 PM
Edited by: santosh naidu on Jun 29, 2009 3:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
guys,
its working for me.. let me know if u want any additional information..
regards,
suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Try searching something related to this issue in SAP service market place.
Refer to SAP note no: 1313761 for this issue. Let me know if it works.
regards,
suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh & All,
We are implementing the same leave compensation workflow here. Fortunately, when I was searching the SDN, I saw this SDN posting from Suresh.
I don't know whether your problem got resolved. However, I thought of sharing my issues, I might be able to get some input from you or other possible solutions.
As all they say, I have also implemented the BADI for retreiving the approver.
However, when I create a leave compensation request from ESS, the table T7INLEAVE_EN_TR does not have any entry.
I have maintained the number range as well after seeing the previous posts.
In the case of CLAIMS, there is a program which we have to run to in R/3 to push the request to the approver from the backend. I don't know whether there is any such program to push the request to the approver.
Please do write to me, any possible ideas that might work and hence it can be shared to others as well.
Thanks
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
Here the process is different.
workflow will not be initiated immediately. First of all you will have to change the status of the request to To Be approved then only the workflow will be triggered.
The condition of status to be approved is hard coded before triggering the workflow.
so we will have to find the mechanism to change the status from New to To BE Approved
Regards,
Umesh Chaudhari
Try to use standard method and see which gets called! you ll see it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
actually by default, the system will not retrieve any approver. Before implementing this BADI, just the leave encashment request gets raised without any approver. The system gets to know the approver only after the BADI implementation. I have tested this. Now I need to know why the workflow is not getting triggered even after getting to know who the approver is? I have searched in all the places but I am not able to find which workflow is associated with this leave encashment process.
regards,
suresh
Hi Suresh,
I am also trying to implement the Leave Encashment.
I am able to see the template in the ESS but when I apply for Leave Encashment from the ESS i do not get any entry in the R/3.
I am Trying to see the leave encashement using the standard reports but nothing is coming there.
also in table T7INLEAVE_EN_TR there is no entry into that.
Pls tell me is there any other settings I will have do for teh flow to happen.
-
Maintained the Number range and the above Problem is solved -
Regards,
Umesh Chaudhari.
Edited by: Umesh Chaudhari on May 26, 2009 5:57 PM
When you implemented the BADi, have you also copied the standard WF methods in it?
Also make the WF and task as general
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siddharth,
While implementing the BADI - HRPBSIN_GET_LE_APPRV, I have just done some coding in the GET_LE_APPROVER method and exported the parameter - APPRVR.
Do I need to include some more in this? Also there is one more export parameter - IS_SELF_APPR. But I didnt pass any value to this.
Also, I am not able to find which workflow is associated with this. Can you let me know the WF template for this process?
Thanks & Regards,
Suresh
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.