ESS-Leave Request hold in background
Hi.
We have implemented the workflow for leave requests in ESS. But this workflow is customized, because we use more than 2 levels for aprobation.
We created a method for change the records state in table PTREQ_HEADER (according a workkaround suggested in a SDN forum thread)
But the problem is the workflow takes so long time for process this method; and hold in it for hours.
In debugging mode, this method works OK, but in background, hold it.
Would you help us?
Thanks in advance.
Method code:
begin_method zbuscaestado changing container.
DATA: zestado TYPE datatype-char0001,
zfinal TYPE datatype-char0001,
zregid TYPE ptreq_header-request_id,
l_request TYPE ptarq_uia_request,
request TYPE REF TO if_pt_req_request,
status TYPE tim_req_status,
event TYPE tim_req_xfer_event,
salir TYPE c.
swc_get_element container 'ZEstado' zestado.
swc_get_element container 'ZRegID' zregid.
swc_get_element container 'ZFinal' zfinal.
MOVE space TO zestado.
SELECT SINGLE *
FROM ptreq_header
WHERE request_id EQ zregid
AND status EQ 'APPROVED'.
IF sy-subrc EQ 0.
MOVE 'A' TO zestado.
* MOVE 'X' TO salir.
IF zfinal NE 'S'.
MOVE cl_pt_req_const=>c_reqtrans_send TO event.
CALL FUNCTION 'ENQUEUE_EPTREQ'
EXPORTING
mode_ptreq_header = 'E'
request_id = zregid
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CALL METHOD ca_pt_req_header=>agent->get_request
EXPORTING
im_request_id = zregid
IMPORTING
ex_request = request.
CALL METHOD request->initiate_state_transition
EXPORTING
im_transfer_event = event
* im_event = event
im_external_call = space
* im_ret_value = 0
IMPORTING
ex_new_status = status.
CALL FUNCTION 'DEQUEUE_EPTREQ'
EXPORTING
request_id = zregid.
ENDIF.
ELSE.
SELECT SINGLE *
FROM ptreq_header
WHERE request_id EQ zregid
AND status EQ 'REJECTED'.
IF sy-subrc EQ 0.
MOVE 'R' TO zestado.
* MOVE 'X' TO salir.
MOVE cl_pt_req_const=>c_reqtrans_delete TO event.
CALL FUNCTION 'ENQUEUE_EPTREQ'
EXPORTING
mode_ptreq_header = 'E'
request_id = zregid
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CALL METHOD ca_pt_req_header=>agent->get_request
EXPORTING
im_request_id = zregid
IMPORTING
ex_request = request.
CALL METHOD request->initiate_state_transition
EXPORTING
im_transfer_event = event
* im_event = event
im_external_call = space
* im_ret_value = 0
IMPORTING
ex_new_status = status.
CALL FUNCTION 'DEQUEUE_EPTREQ'
EXPORTING
request_id = zregid.
* ELSE.
* CLEAR salir.
ENDIF.
ENDIF.
COMMIT WORK AND WAIT.
swc_set_element container 'ZEstado' zestado.
end_method.
Edited by: Gerardo Perez on Apr 24, 2009 2:29 PM
Hello,
Please use:
programming
but without the spaces before and after } and {
Testing:
programming
regards
Rick Bakker
Hanabi Technology
Similar Messages
-
ESS Leave Request - Error while creating a leave record
Hi Friends,
Some of the ESS leave request(not workflow) has gone into error when the system tryies to create a leave record in background. I can view these error request using the report RPTARQDBVIEW. This happens when the background program(PTARQPOST) tries to create a leave record. In some cases the status of the leave request is set to error(the status attribute of the container element(Req) has the value Error),but we are not able to find what is actual error.Is there any log where we can check what is the problem? Please advice.May be
Internally the pernr might not be locked or some one may be maintaing the pernr for whom you are trying to post. -
ESS Leave Request - Set Workflow status to Completed
Hi,
We are on ECC 5.0 and we are using ESS to process Leave Requests. We have a custom Workflow based on the standard Workflow template WS12300111 for approval of Leave Requests.
Whenever an employee creates a Leave Request via ESS the Workflow is started. When the employee deletes the request the Workflow has to be stopped/completed. For this we have put a Wait for Event step in a parallel branch to the Approval Process. In the Wait for Event step we wait till a condition ( Request.status = DELETED ) is met.
But when an employee deletes a Leave Request the request is deleted from the list but it gives a message as "Specify a class name".
Can anybody please help us on this( how to complete the workflow whenever the Request is deleted ) and let us know what is the procedure to do this.
Thanks in advance.
Regards
ImmanuelHi Prashanth
Thanks for your quick reply. But that would not solve my problem. My Workflow looks something like this
WF-started by entries in configuration tables
Some activity in background
A fork with 2 parallel processes
Approval Wait for an exception condition using Wait for event step
process (wait till an attribute of a object has a specific value)
Workflow completed
The wait step waits for the status of the object to change to DELETED. The Workflow should get completed either if the Approval process is over or the condition specified in the Wait step is satisfied.
But in the case of ESS Leave Request this doesn't work. Is there anything that we need to do to set the status of the Workflow to Completed if the Leave Request is deleted.
Thanks
Immanuel -
How to add new fields for ESS leave request
Hi friends,
Can u please help me with my issue.......
My issue is to add new fields in ess/leave request i.e...
The component needs to be Checked-out through Net Weaver Development Infrastructure, make the necessary enhancements, and finally Check-it-in back to NWDI.
Custom Function Modules are to be invoked apart from the standard ones that are already available in the Leave Request component ess~lea inorder to accommodate the extra absence-type logic.
can u please sujjest me where should i make changes in the given 14 components
means in which view i have to add these fields.................
Regards
RajeshHi Rajesh ,
Check whether u are able to find the ess dc's under inactive dc's in webdynpro
If ur not able to find it then Check the landscape configurator in CMS and also the transport studio and confirm that ess packages are imported fine
Ganesh ,
for creating a DTR client u need to open the DTR perspective right click and "create clients" before that go to windows ->preferences of the NWDS and check the development infrastructure URL is gven correctly ...try pinging it once...
Do check ur SLD is up or not!!!
Regards
Krishna
Message was edited by:
krishnagopal Mukundan -
Add a custom button in Ess Leave Request
Hi Gurus,
I have requirement, add a custom button in a Standard ESS leave request (Webdynpro Java). When i click the the button it has to call popview(custom view). I am new to webdynpro Java, If possible explain me with step by step preocedures(if possible with screen shots).
Thanks,
Mohammed.
Moderator message: this is the wrong forum, please have a look in the "Web Dynpro Java" forum, but always search for available information before posting.
Edited by: Thomas Zloch on Jun 17, 2011 9:54 AMHi Gurus,
I have requirement, add a custom button in a Standard ESS leave request (Webdynpro Java). When i click the the button it has to call popview(custom view). I am new to webdynpro Java, If possible explain me with step by step preocedures(if possible with screen shots).
Thanks,
Mohammed.
Moderator message: this is the wrong forum, please have a look in the "Web Dynpro Java" forum, but always search for available information before posting.
Edited by: Thomas Zloch on Jun 17, 2011 9:54 AM -
Problem with ESS Leave Request Workflow
We had configured ESS Leave request, which is working fine with Leave request approval.
1) Cancellation of Leave Request using the workflow WS12400005.
Workflow is not getting triggered when we try to delete the leave request.
2) Quota Overview
While displaying the Casual Leaves (CL) I need to deduct the Paternity leaves (PL) also.
Remaining CLu2019s = quota CLu2019s u2013 ( used CLu2019s + used PLu2019s).hi kishore. how did you resolve the issue of workflow not being triggered?
-
ESS leave request, additional field
I need to add three additional fields in ESS leave request (HR). I was told i can do that using web dynpro. I like to know how can I do it.
Thankshi Jeroen,
Can u please help me with my issue.......
My issue is to add new fields in ess/leave request i.e...
The component needs to be Checked-out through Net Weaver Development Infrastructure, make the necessary enhancements, and finally Check-it-in back to NWDI.
Custom Function Modules are to be invoked apart from the standard ones that are already available in the Leave Request component ess~lea inorder to accommodate the extra absence-type logic.
can u please sujjest me where should i make changes in the given 14 components
means in which view i have to add these fields................. -
How to craete a 'annual leave 1/2day-AM' in ESS leave request
Hi ,
I have created 2001- subtype 670 : "annual leave 1/2day-AM".
I wanted to see "annual leave 1/2day-AM" in the ESS leave request list down box ( already we have few ) ... please let me know what are the steps i need to follow ...
thanks,
sunitha
Edited by: Sunitha Reddy on Sep 19, 2008 9:27 AMHi,
Your ABAPer will be the best person to let you know the table name or some experts here who have come across this situation will guide you. Also check where other types of leaves are populated in SAP and your new value is there or not.
Thanks,
Preetham -
Enhancement in ESS Leave Request
Hi Gurus,
I am new to webdynpro Java. I have a requirement to add a custom button in a Standard ESS leave request (Webdynpro Java) view. When i click the the button it has to call popview(not sure is it possible to call a webdynpro abap view). If possible explain me with step by step preocedures(with screen shots).
Thanks,
MohammedHi,
Good, you are now able to do modification in Standard ESS package. If you want to navigate to another WDABAP iView from your WDJAVA application, you can use the below code on some button or link action to navigate to another iView.
Check this link:-
http://help.sap.com/javadocs/NW04/current/wd/com/sap/tc/webdynpro/clientserver/navigation/api/WDPortalNavigation.html
public void onActionnavigateToToAbapiView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionnavigateToAbapiView(ServerEvent)
try
WDPortalNavigation.navigateAbsolute(
"ROLES://portal_content/com.demo.DEMO_PCD/com.demo.ESS_SAP/com.demo.iview_ESS/demo.com.java_demo_com_demodc_demo_com_DemoApp",
WDPortalNavigationMode.SHOW_INPLACE,
"Window Title", WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
"Title",
"",//ContextURL
"param1=10¶m2=portalID");
catch (Exception e)
e.printStackTrace();
You will find your WDAbap PCD location in Content Admin, copy it and repace PCD: with ROLES at start.
also you can pass parameters between 2-iViews, in the above code snippet you can find that.
the above code needs to be written in your source iView so as to navigate to destination iView which is mentioned using its PCD location.
to retrieve the parameters you need to check ABAP syntax to retrieve URL parameters.
In java we retreive using below syntax:-
String param1 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param1");
String loginID = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param2");
to show it as a Pop-Up you need to find some work-around to achieve it, If i get time will do it and let you know, but if you find something for that do share.
Regards
Tushar Shinde. -
Error after second level approval in ESS leave request
Hi Experts
I am using custom workflow for Ess Leave request process which is copied from WS21500001.
I have added custom class methods to change status from approved to sent.
Then another method i have set next appovaer.
The problem i m facing is that I am getting an error on portal after second approval approves the request.
i.e Field syomol has not been assigned yet.
from st22 i found its generating from
Include LPT_ARQ_REQUEST_UIAF06 - Form execute_approver_update
By debugging i found that Its not getting next approval with status T as there is only first approval with status 'A'
This results in unassigned field symbol. and then error.
Please help me resolve this issue.
Please confirm why next approver is not found in method.Hi All
Thanks for your reply.
I checked why it was giving a dump.
This execute_approver_update subroutine takes approval data from table ptreq_approver .
I filled this with resp actor id after request is approved and status is changed to sent.
For every emp its unique actor id is saved in ptreq_actor table agaist his pernr.
SELECT SINGLE actor_id FROM PTREQ_ACTOR INTO actor_id WHERE objid = nextApprover_pernr.
wa_appr-mandt = sy-mandt.
wa_appr-request_id = Request_ID. "Req.requestID ( from Workflow )
wa_appr-version_no = version_no. "Req.Version ( from Workflow )
wa_appr-seqnr = seqnr. "Same as version no but in char
wa_appr-approver_ins = actor_id. "Employee actor id from ptreq_actor
wa_appr-status = 'T'. "Manual
append wa_appr to it_appr.
INSERT PTREQ_APPROVER FROM TABLE it_appr .
commit work and wait.
This resolved my issue.
Thanks -
Ess Leave Request -Change in Time calculation without changing work schedu
Hi All,
We are implementing a ESS Leave Request in EP6 with backend HR ECC5.0.
The time calculation is taken from the Work schedule rule in
HR backend which is 24*7.
For example if the leave taken is for 2 days-systems calculates as 24*2=48 hrs
but in actual the requirement is to calculate 2*8 =16 hrs without changing
the Work Schedule in 2001 infotype in HR Backend.
Can we do this change through
1.Validation in portal itself
2.Changing the RFC PT_ARQ_REQUEST_CHECK
3.Changing the Absence Types
Regards
Anand.Hello,
Please use:
programming
but without the spaces before and after } and {
Testing:
programming
regards
Rick Bakker
Hanabi Technology -
FMLA relevant absence Message in ESS Leave Request
Hi Experts,
I am on ERP2004, EP6.0SP20.
I have configured the ESS Leave Request and activated the workflow. When an employee submits a leave request, he sees a message "the requested absence type is an FMLA relevant absence". However, the requested absence type is not a FMLA relevant absence.
I would like to stop this message coming on to portal. I am not sure whether it is related to Time Management configuration on absence quotas etc. Has any body seen this message?
your help will be greatly appreciated!Messages can be hided in Leave Request through configuration on R/3 side. NWDI customization is not necessary.
-
Dear friends
in ESS leave request workflow , in approval process task i am maintaining 10 days deadline , after that by using process control i am making the workitem to be obselete , then same leave request is going to supervisor's supervisor . this is properly working, my problems are
when the first supervisor opens some other leave request still the escalated leave request is showning in the table , still system is allow him approve . and also in the supervisor's supervisor inbox then workitem remains if he opens the workitem there is no any leave for approval in that table , so deadline mointerting is not working propely for ess leave request , and also in supervisor's supervisor inbox workitem is not going out from uwl .
how to do deadline mointering for ESS leave request workflow ,
can any one help on this
reason which i could identify is details are picking from the document database based on the approver .You should check the forum, I think I saw a thread in the last two days which stated that deadline monitoring is not working for the leave request. (it could be the HCM forum). So this would be why the handling is not working as expected.
The problem of no leave to be approved for the manager could be prevented if you set a terminating event on the task which will be triggered when the leave is approved.
Regards,
Martin -
How to use EP-ESS Leave Request using Custom Workflow
Hi Experts,
Can I use the EP-ESS Leave Request (ESS 1.0 for ERP05) with a custom workflow which is NOT a copy of the standard workflow 12300111?
Regards,
ShobhitPlease post this question on Business process forum.
U will have to follow the architecture of 12300111 template for ESS leave.
Even though it says u can use ur own wf!!
Cheers!!
Ashutosh -
ESS Leave Request - Customer fields default function not working
Hi,
a. SAP version being discussed
SAP ECC6.0
EP7.0
ESS/MSS
b. Here is the scenario
1. We are using ESS Leave Request application for employees to request leave. We are using the standard web dynpro java leave request application delivered by SAP.
2. Lately there has been a need to provide a customer field on the request form which will have a calculated value showing up when the employee opens the request
3.We used one customer field called customer01 as per configuration steps.
4. This field appears on the request form when it is opened.
5. Our need is to display a value in that field when the form is opened.
6. SAP/s documentation states that we can use BADI PT_ABS_ARQ to default a value to this field on the form. This value is calculated during runtime dynamically.
7. We have used the method IF_EX_PT_ABS_REQ~SIMULATE_VIA_BLOP for this purpose
8. After activating and coding this implementation, the system does not default anything on the request form when it is opened up.
9. Once the employee hits the review button, this field gets its defaulted value but this is not what we want. We want the system to display this when the form is OPENED, that means at the prepare stage. For this field to appear after hitting the review button is meaningless as the employee needs to make a decision based on the value in this field before hitting the review button.
It almost seems like this BADI is called when the review button is hit and not when the form is opened up. We may be wrong and missing something obvious which one of you can immediately point out, Hence this post.
10. I did go thru the forum at great length and seen that there has been discusion surrounding the need to populate R3 from a value entered into this field. My problem is different wherein, I wish to populate this upfront as display information when the form is opened and then send it back to R3, once the employee submits the request.
Would be grateful if anybody on this forum could point me in the right direction.
Thank you,
RajeshPlease, can I take this question a little further.
Is it possible to add more fields to the leave request form on the ESS portal. For example, our customer wants additional fields like reason for leave, contact residential and telephone number during leave, Require leave entitlements (Yes/No).
Would appreciate if a reply can be given on if it is possible or not and what to be done if it is possible.
Cheers
Maybe you are looking for
-
Can you help me out in letting me know what this means and how I can fix this? I found it in my tools menu under error console. It was listed as a warning, but then there was a option to highlight and evaluate the original warning message that was li
-
Internet Explorer 11 bookmarks not syncing with Ipad/Iphone
Hello. I have an Iphone 5 along with an Ipad Mini. Both are updated to the current IOS 7.1.1. I am using Internet Explorer 11 on my Toshiba Laptop for syncing booksmarks and such through Icloud to my devices. I am having an issue with the bookmarks o
-
Hi, I have requirement to create delivery from salesorder. I need to use BAPI for this. BAPI_DELIVERYPROCESSING_EXEC is not working in 4.7 version. Please let me know any alternate BAPI for this. Thanks in Advance
-
Hello I would be very grateful for any help with this problem. It is really annoying as I think the email has gone only finding it after days in the outbox. It sends fine from the outbox when I open mail and resend. It also works fine if I initiate e
-
Hello. I have an object model where one A object contains a collection of B objects and an association to a "current" B object, which is also in the collection. The B class references other persistent objects and collections. class A { Collection b;