BADI - PT_GEN_REQ

Hi,
I want to change leave request approver in ESS portal base on our customized relationship in OM. I found that BADI 'PT_GEN_REQ', method 'FIND_RESP_AND_DEFAULT_NEXT_PRC' is the suitable interface to implement this.
But I don't know how to start the coding, should I remove all the remarked standrard code in the original method? Anyone can show me some sample code?
Thank you.
Regards,
Eric

Hi Eric,
Can you please give us your coding as a example? I have the same requirement as you but currently I get a dump due to the export parameter EX_DEF_NEXT_PROC_ACTOR, which does have the type TYPE REF TO IF_PT_REQ_A_WF. Something is wrong with this interface implementation - but what?!
Thank you verym much for your help!!
Regards
Michael

Similar Messages

  • Can we trigger other workflow from BADI- PT_GEN_REQ

    Hi all,
    I would like to know , if we can trigger other ( custom) workflows, using the badi - PT_GEN_REQ - method start_wf, instead of the standard workflow
    ( WS12300111).
    Regards,
    NR

    Hi,
    In the existing custom workflow ( WS20000081) which was modified earlier with some addditional 27 activities in it.
    Now we are implementing EP7 , and in the standard leave request, uses standard WS12300111 worflow.
    Is it possible that we can use old WF get triggered instead of the new one by using this BADI?
    Regards,
    NR.

  • Implement BADI PT_GEN_REQ for program RPTARQEMAIL - ESS

    Hi,
    I was trying to implement this method with the idea to send, always, a mail to the HR responsible.
    For that I've written the following code (example):
    method IF_EX_PT_GEN_REQ~GET_ADMINS.
    data:
    admins_receivers TYPE ptreq_email_receivers_tab,
    p_receivers_temp TYPE somlreci1 .
    p_receivers_temp-receiver = 00000001.
    p_receivers_temp-rec_type = 'P'.
    append p_receivers_temp to admins_receivers.
    endmethod.
    The problem is that it is not being sent any e-mail.
    Any idea what is missing?
    Thanks!
    Any idea where can I find an example?
    Edited by: Pedro Taveira on Nov 29, 2010 6:52 PM

    The problem was with the parameters...
    It is solved

  • PT_GEN_REQ

    I need information regarding this BADI, for our ESS clock in/out application I think that the program RPTREQAPPRCHK is determining the approver, but this program is not checking for position base substitution(A/B 210), I found one method GET_ACTOR_SUBSTITUTE in the BADI PT_GEN_REQ which example implementation almost doing what I want.
    I need to know that is this badi is getting called for inside the program  RPTREQAPPRCHK because I want to determine my own approve which also check for the substitution.
    Do I need to made any configurational changes aswell , because currently in configuration DETERMINE NEXT AGENT is set to Line manager.
    Thanks

    Hi Tabish ,
    Please check the following threads-
    Re: ESS leave request - Change Approver
    Re: ESS- leave request approver other than A002 relation
    also , apart from relationship A210 , you can also maintain substitution through table HRUS_D2.
    by this , you will not have to make any change in badi pt_gen_req.
    when a  substitute created in sap inbox , an entry gets maintained here . However , you can maintain this table centrally .
    This is very straightforward and independent of other tables.
    hope this helps.
    Thanks,
    Sahiba

  • ECC 6.0 leave request attendence overview

    Please can someone help me how to configure the field "status" in my ESS leave request attendence overview in ECC6.0?
    I'm using a leave request scenario without approval and the status of my posted absences in infotype 2001 show the status "informed". From a proces point this status makes no sense.
    Already thanks for reading. Hope for a solution.
    Robbert Bastiaans

    Hello,
    I would definitely say for you to have a look at the BADI PT_GEN_REQ. Also verify the implementation of your PT_ABS_REQ.
    REgards,
    Bentow.

  • Error raising new Leave Request

    Hi guys,
    Some of our users are trying to raise a leave request in ESS and getting an error
    Use the input help to select an approver.
    The only change that has happened is that we recently upgraded from ECC 5.0 to ECC 6.0. Other than that there has been no new development for our ESS/MSS.
    There are only few users that are affected by this problem. The only thing different that I can see about these users is that in our org structure, the position that they're reporting to is not filled (no holder for that position), so they report to the next manager/approver above that position. This has never been a problem in past. ESS was able to get the next approver without any problems before the upgrade but now it seems like SAP only checks one level and since there's no holder of that position it gives this error. For any employees that report to a position that's filled don't have any issues.
    I'm an SAP ABAP developer. Not too familiar with ESS/MSS or SAP config so please help me understand if this is a config issue or there's something else that needs to be done?
    Thanks for your help.
    Edited by: Mohammad Zeeshan on Aug 15, 2011 8:58 PM

    Go to transaction PTARQ and check if you are able to determine the correct approver for these employees.
    Also, from transaction PTARQ - Customizing :
    Employee Self Service - Service Specific Settings - Working time - leave request - Processing Processes - Determine processing processes for each rule group
    There is a configuration for "Determine Next Agent". This should be either "Line Manager" or "Last Agent, then Line Manager" (Refer to the field help for more information)
    Also, you can utilize BADI  PT_GEN_REQ for handling any special cases.
    Thanks,
    Shanti

  • Leave Request two layer approval

    Dear Experts,
    I'm trying to implement two layer approval leave request workflow by copying and modifying standard workflow WS12300111.
    I follow the guide from this link:
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/CustomizingtheESSLeaveApprovalusingBusiness+Workflow
    My workflow step is as follow:
    1. first approver has approve the request
    2. reset req object status to SENT
    3. set next approver using method if_pt_req_request->set_next_processor
    4. send the request to the second approver
    I have implement badi PT_GEN_REQ to set first approver (method IF_EX_PT_GEN_REQ~FIND_RESP_AND_DEFAULT_NEXT_PRC) so that the first approver name shown correctly when requestor create the request.
    Now there are 3 problems I'm facing:
    1. After the FIRST approver approve the request, the note he input is shown twice. I found out this is because the status change create new version of the document. I have tried to clear this note when changing the status using method if_pt_req_request->set_notice. However, the method ignore if the notice is set to blank. Is there anyway to hadle this?
    2. When SECOND approver reject the request, I want the request to be revised by the requestor, and then forwared to FIRST approver after that. For this purpose, before send the workitem to requestor back, I put step to set approver back to FIRST approver again using method if_pt_req_request->set_next_processor. But it seems this doesn't work and the request is sent to SECOND approver after revised. The supervisor name that is shown when requestor revise the request also show the SECOND approver name instead the FIRST approver.
    3. I find difficulties to create email notification if the request is changed by the requestor during approval process, since there are no event triggered. Is there anyway to trigger this event or is there any workaround?
    Thank you.
    Regards,
    Ponty

    Hi Ponty,
    I am trying to implement two layer approval for leave request, too.
    I took a copy of standard WS12300111 as you did.
    I followed the guide, you mentioned. For one level approval this works nearly out of the box.
    But I don't understand the second half of the guide.
    For me it will be the first time to implement a BAdI. I never did this before.
    Can you please explain me, how to do it and how you enhanced the workflow for two layer approval?
    Some screenshots might be useful. Eventually you can enhance the guide you mentioned.
    Regarding the numerous questions on multi level approval, these hints might be useful for a large number of users.
    I would be very happy, If somebody can help me, becaus I didn't know any workflow experts who can help me implementing the BAdI.
    Thank you.

  • Change Date for Order Item Partner Changes

    When I make a change to a partner on an Order Item the Change Date VBAP-EDATU is not populated.  can anyone recommend a way to have this field filled for all changes to any fields on an Order (header and Item)?

    It can be done by WF, Why you need a warning message?
    Anyhow check badi
    PT_GEN_REQ or PT_ABS_REQ,

  • ESS: Leave Request: Additional Input Field in Portal?

    Hi experts,
    we are using ESS/MSS BP 1.0 with ERP6.0. We want to add a custom field for an absence type, because we need a additional approver for this absence type.
    So we added the field through customizing and now see this in the portal.
    But, are we able to change the plain text field to an select field like the standard approver field?
    And much more important: Is it even possible using the badi BAdI PT_GEN_REQ or PT_ABS_REQ to bring the input into the backend and use it in a workflow?
    As i unfortuately didnt find a meaningful documentation, it would be great to get an answer from one of you out there.
    Best Regards,
    Thomas

    Hi Guys,
    has nobody got a a clue for me? Please give me a short answer whether it is possible  - by using the described badi and the customizing  - to add data from the mss to the backend or not.
    Best Regards,
    Thomas

  • Change input attribute for CL_PT_REQ_WF_ATTRIBS

    Hi,
    I would like to change the input attribute value from class CL_PT_REQ_WF_ATTRIBS in BADI PT_GEN_REQ~START_WF for multilevel leave approval.
    May I know how to do this ?
    Regards,
    Eric

    Resolved myself

  • Approver name in Leave Reuqest Screen

    Hi ,
    Hope you all are doing good. I wanted to know if we can change the approver name which appears by default. We are using EP 7 , Webdypnro based ESS/MSS and ECC 6.0.
    Can any standard BAPi help,
    Also can we show more than one superiror there ? like we are having multiple level approvals so want to show all this names.
    Is that possible.
    Regards
    PN

    Hello,
    you can affect the approver selection by implementing BAdI "PT_GEN_REQ". Method: IF_EX_PT_GEN_REQ~FIND_RESP_AND_DEFAULT_NEXT_PRC.
    You cant show more than one approver. The design of the framework does not allow multiple approvers.
    regards,
    Markus

  • How to change the Approver  in ESS development

    Hi All,
        I need to change the Approver in the ESS. Right now its taking the team lead in the organizational hierarchy but now it has to be changed to Project Manager which will be fetched from customal table. I was told to use BADI PT_GEN_REQ. How should I utilize this BADI to change the approver? or is there any other option. Could anyone help me regarding this.
    Thanks & Regards
    Ajo John

    I assume this is occuring because you have your standard approval not set to auto complete. On your Standard Approval process definition, on the approve task, add the tcCompleteTask.
    If that is not the issue then you need to modify your Self Registration to have an approve task assigned to the appropriate user you would like.
    -Kevin

  • Work flow for leave request through email

    Hi guru,
    my issue is, when employee requesting for leave through Net viewer (ESS). it must be trigger to
    out-look email id of authorized person. plz suggest me how i have to do configuration for this.
    Thanks,
    Rajesh

    Either you can make use of the report RPTARQEMAIL or you have a BADI PT_GEN_REQ implement this BADI, in this badi you can find a  method to determine the EMAIL list. IMplement the logic to send mails.
    Before doing this ask the basis guys to make appropriate SCOT settings inorder to send External Mails

  • ESS TM Management WS12300111 doesn't start

    Hello!
    we are facing the following problem regarding the Leave Request approving phase using the work flow above mentioned.
    We had configured the kind of TM request  that have to be manage via portal under back-end customization features (Personnel Management u2192 Employee Self-Service u2192 Service-Specific Settings u2192 Working Time u2192 Leave Request u2192 Processing Processes):
    -> Create Rule Groups
    -> Define Processing Processes for Each Rule Group with Next Agent = last agent, then line manager
    -> Specify Processing Processes for Types of Leave (set work flow WS12300111 as approve method).
    WS12300111 is active and configured as standard task
    TS12300097 is configured as standard task and in transaction SWFVISU is linked with approver leave web dynpro.
    The problem is that after we insert via portal the leave request, into the manager UWL task we didn't have the related approval item and we are not able to establish if the WF has been started. We are not able to understand if is a WF running failure or a approver failure because it's impossible to track the trace for this kind of WF.
    For approver determination we are implemented the badi PT_GEN_REQ and correctly see the approver into the specific leave request dynpro field.
    We also tryed to use our custom wf template linking this one with the customizing but we get the same result.
    Does anybody help us.

    Hi!
    We are not able to launch approval leave request associated with UWL TS12300097 decisional item because we didn't get the task into the manager portal MSS UWL interface.
    We discovered that the decisional item didn't have the actor set even if we set this value during the approver determination process launched by leave request web dynpro.
    Regards.
    Mara

  • Information message to Error Message  -HCM standard Leave Workflow

    Hi ,
    I am configuring leave management for a demo purpose.
    The leave application workflow used is ws20000081.
    There are few scenarios configured in system for  not allowing leave applications for  the employees .
    Example:-paternity leave u2013 maximum days which employee can apply through one application is 3 working days
    This validation is working fine as we directly using IT2001 application through tcode- PA30 .more than 3 days it giving an error message.
    But issue is
    When we are applying the leave through ws20000081, system is allowing more than 3 working days and allows a successful application. Then its allows a successful approval for employer. After approval system fails to update the data in system and forward the application to administrator where as in ideally system should not be allowing the employee for a successful application.
    When we are applying the leave through ws20000081 and clicking on the u201Cchecku201D button system is giving the actual error message as an INFORMATION MESSAGE.
    As it is an information message on ws20000081 application page, system is allowing successful application.
    How can I change this information message as an error message u2013any STANDARD settings apart from  taking the access key and change it     (similar behavior as application as PA30)?
    Regards
    Thomas
    Edited by: Thomas Padiyara on Jun 2, 2011 11:23 AM

    Thomas,
    The validation can be even done prior to the workflow called.  You may have to implement the BADI BADI - PT_GEN_REQ and inside the using the class - method IF_EX_PT_GEN_REQ~CHECK_IF_ACTOR_ABSENT can be used for the validation of this 3 days and generate an error message to portal.
    Hope this helps...
    Cheers,
    Thomas.

Maybe you are looking for

  • Workflows within the SAP environment

    Hello, for my diploma i'm evaluating the different workflow technologies within the sap environment. Therefor i set up a list with the different technologies and want to know if i'm missing something. 1) ALE 2) MDM Workflow 3) Business Workflow aka A

  • Problem with Date.getYear() !!!!!!!!!!

    I have a Date variable with the following format: yyyy-MM-d HH:mm:ss And I have a method that returns me the year: public int getPtYear(Date d){ int y = d.getYear(); return y; *d is the Date variable. But something is wrong because I keep getting the

  • Trying to switch primary displays without being able to see

    my roommate has an Intel iMac Duo and the built-in monitor is not working. the image is totally obscured by tiny lines. only faint shades can be made out and it's not usable. he bought a miniDVI > DVI adapter and a DVI > HDMI adapter and connected hi

  • Missing hard disk space after sims 3 force quit

    Hi, I failed to notice I had to update to the latest version of Leopard to install the game with the result that the installer got stuck repeatedly half way through and I could only force quit the installer. The downside to this is that I did this tw

  • How read a XML Schema

    Hi, i wish to ask you a question: how i can read a XML Schema? Which library i have to use to visit a XML Schema? There are examples on internet? I haven't found anything about it. Please help me. Thank you, regards Gianni