How programmatically to end date employee element?

I have requirement to create a new element that has to expire in three month.
Can anybody point me in the right direction on how to do it?
Thank you,

To clarify, do you require the element type to end after 3 months of the effective start date, or do you require the element entries to end 3 months after the entry start date? If it's the latter, and you are running payroll, you could easily do it using a formula (or a change to the existing formula if there is one already against that element)
If you really want to do it programatically like through pl/sql, then use pay_element_entry_api.delete_element_entry (with a date-track mode of 'DELETE') - the entry will then be end-dated as at the supplied p_effective_date value.
Clive

Similar Messages

  • How to Disable/End Date an Element Link/Element in HR 11.5.7(Fam.Pack G)

    We want to disable some element links that are no longer valid. These element links are assigned (element entries) to certain employees based on the eligibility criteria set (e.g. Organization/Job/Grade/etc). However we want to disable these elements from a specific date onward as they are no longer valid. I tried to end date either the element entry or the element link but I got the message "Field is protected against update".
    From help the only thing I found regarding deleting an element is to delete all element entries linked to that element link and then delete all element links linked to that element to be able to delete or end date the element.
    But what we need to do is only to disable the element links and not to delete them all together and lose any historical records related to these element entries.
    If anyone has any idea on how to deal with this issue will be highly appreciated.
    Thanking you in advance.
    Elena

    Hi again,
    I made a search regarding elements/links and managed to find an old document (2002) regarding links and following the suggestion there I managed to end date the element links in request.
    In order to end date the Element Link since it does not allow
    you to make any updates you have to try to DELETE it and then select END DATE instead of PURGE.
    Thank you!
    Best regards,
    Elena

  • Getting error when trying to end date the element links

    When i am trying to end date the element link and i am getting a error message as ORA-01403: no data found if i click on the details button the following message is displayed:
    ORA-01403: no data found
    FRM-40735: ON-DELETE trigger raised unhandled exception ORA-01403.
    If i click on Ok button it bringgs another popup message that reads as follows:
    An Unexpected Error- 1403 has occured.An alert has been sent to the system administrator.
    ORA-01403: no data found
    I am really not getting why my link is not end dating.
    Could anyone advice me on how i can end date my element links.
    NB:the date track i am using is 01-DEC-2009 and no prayroll or quick pay has been processed as of this date

    Pl see if enabling an Forms Runtime Diagnostics (FRD) trace can help identify the cause
    MOS Doc 373548.1 - How To Collect And Use Forms Trace (FRD) in Oracle Applications Release 12
    MOS Doc 167635.1 - How To Perform Forms Runtime Diagnostics (FRD) Tracing in Applications 11i
    HTH
    Srini

  • Cannot end date the element

    There was an element defined wrongly in the system as follows:
    the element is defined as final close while it was suppose to have been defined as Last Standard process. I have managed to end date its links as of 01-JAN-2010 now when i am trying to end date the element as of 01-jan-2010 it is giving me the follwoing error"
    APP-PAY-06213: Formula result rule use this input value
    Check you formula result rules for indirect results that feed this input value.
    I have checked the formula result rule there is no formula attached to this element.
    Kindly help me!

    Please run this query to find out which elements are using the element you want to end date as indirect results.
    Remove the indirect results and try end dating the element.
    SELECT  ET.ELEMENT_NAME,psp.PROCESSING_RULE, ff.FORMULA_NAME, pfr.RESULT_NAME,
    pfr.RESULT_RULE_TYPE, et1.ELEMENT_NAME et_to_end_date,iv.NAME,iv.UOM, et.REPORTING_NAME
    FROM
    PAY_STATUS_PROCESSING_RULES_F psp,
    PAY_FORMULA_RESULT_RULES_F pfr,
    ff_formulas_f ff,
    PAY_ELEMENT_TYPES_F ET,
    PAY_ELEMENT_TYPES_F ET1,
    PAY_INPUT_VALUES_F IV
    WHERE
    psp.FORMULA_ID=ff.FORMULA_ID
    AND pfr.STATUS_PROCESSING_RULE_ID=psp.STATUS_PROCESSING_RULE_ID
    AND et.ELEMENT_TYPE_ID=psp.ELEMENT_TYPE_ID
    AND et1.ELEMENT_TYPE_ID=pfr.ELEMENT_TYPE_ID
    AND iv.INPUT_VALUE_ID=pfr.INPUT_VALUE_ID
    AND pfr.RESULT_RULE_TYPE = 'I'
    AND ET1.ELEMENT_NAME = :element_to_end_dateHTH

  • How programmatically set size of report element in Java

    In topic
    [How programmaticaly set size of some field?|How programmaticaly set size of some field?]
    someone changing programmatically report element, but I think this part of code
    is in .NET framework
    For example I mean something like following snippet
    BoxObject box = (BoxObject) reportClientDocument
    .getReportDefController().findObjectByName("headerBox");
    BoxObject newBoxObject=new BoxObject(box);
    Border border=new Border();
    border.setBorderColor(new Color(255,255,255));
    newBoxObject.setBorder(border);
    newBoxObject.setFillColor(new Color(255,255,255));
    reportClientDocument
    .getReportDefController().getReportObjectController().modify(box, newBoxObject);
    Why I think this is in .NET framework because java object "ReportClientDocument" don't have "getReportDefController()" method (I donu2019t know .NET).
    What I want to do, I want to take "Details" (part of report) and change size.
    If there is no way to take "Details" how can I take other report element e.g. Text Object

    Ernest,
    What enviroment are you working in? Because my ReportClientDocument object does have the getReportDefController method. How are you declaring your object?
    Try something like:
    private static com.crystaldecisions.sdk.occa.report.application.ReportClientDocument myRCD;
    BoxObject box = (BoxObject) myRCD.getReportDefController().findObjectByName("headerBox");
    Cheers
    Darren

  • How do you end date an objective in table per_objectives_library?

    Hi,
    I would like to find out how to end date an objective in table per_objectives_library.
    I have checked HR_OBJECTIVES_API.update_objective but there is parameters there for Valid_from and Valid_to dates. Is there any other API Package that can be used to do this?
    Thanks
    Shalantha

    Ok, found it....will use HR_OBJECTIVE_LIBRARY_API

  • How to Calculate End-Date for a given Startdate in business hours without holidays

    Hello Experts,
    I need to create a plsql function where we need to determine end date for a task. For this, input will be only start date & number of hours allocated for that task. Based on this input we need to exclude Business hours & need to include only Business hours. and in the end we need to achieve the end date after the hour addition to the start date.
    Example : INPUT: 03-OCT-2013 12:00:00 PM /
                                  Hours Allocated 30 Hrs.
    Business Hours - 11 AM to 9 PM.
    So time starts from or Startdate is Friday 03-OCT-2013 12:00:00 PM. 
    So If I want to calculate the end-date by adding 30 hours to it, it should come WednesDay 09-OCT-2013 12:00:00 PM because I excluded Weekends & considered only business hours that is 11 am to 9 pm.
    I am not able to get any such guidance in Internet as most of the docs are having start & end date as input.
    Please help!
    Thanks in advance !!

    Hi,
    As Christ said, there's no nuilt-in Oracle function to tell whether a given DATE is a holiday or not, partially because there's so much local variation in holidays.  You can write a function like that (see http://forums.oracle.com/forums/message.jspa?messageID=3351081 ), but creating a table will be simpler and more efficient.
    I suggest creating a row for every date, whether it's a work day or not; that way, you can have variations in the schedule (e.g., schedule changes and
    partial holidays).
    CREATE TABLE  work_calendar
    (   dt  DATE       PRIMARY KEY
                       CONSTRAINT  work_calendar_dt
                           CHECK (dt = TRUNC (dt))
    ,   day_type       VARCHAR2 (8)  NOT NULL
                       CONSTRAINT  work_calendar_day_type
                           CHECK ( day_type IN ( 'HOLIDAY'
                                               , 'WEEKEND'
                                               , 'WORK DAY'
    ,   start_time     DATE
    ,   end_time       DATE
    ,   work_hours     NUMBER
    ,   work_hours_since_1970     -- or some point earlier than you'll ever need
                       NUMBER
    ,   CONSTRAINT  work_calendar_start_time
            CHECK ( TRUNC (start_time) = dt)
    ,   CONSTRAINT  work_calendar_end_time
            CHECK ( TRUNC (end_time) = dt)
    This will let you do a lot of the calculations you need without a function.

  • Integration with Outlook - how to increment end date and time from start date/time

    Hi,
    I want to add a variable amount of time to an appointment start date and time in outlook, through vba in access.  Code below shows what I've done:
    ======================================
        Dim olApp As New Outlook.Application
        Dim olAppointment As AppointmentItem
        Dim myRequiredAttendee As Outlook.Recipient
        Set olAppointment = olApp.CreateItem(olAppointmentItem)    
        With olAppointment
            .Start = DateValue(strStartDate) + TimeValue(strStartTime)
            .Duration = intDuration
            .End = DateValue(strStartDate) + ????????
    =======================================
    What do I replace the ????? with so that it increments the start time by any duration I decide in minutes?  Using the duration doesn't seem to work and I also want to be able to have the appointment span a number of days, e.g. could start at 930am on
    Monday and end at 10am on Weds, but want to set the end time relative to the start time.
    Thanks,
    Chris.
    _________________________________________________________ Every day is a school day!

    I've tried that, but it throws out a datatype mismatch error :(
    It would be helpful if you posted the exact code you tried.  In my tests, setting teh .Duration property appears to work.  However, if you want to set the .End property to a specific number of minutes after the date/time of the .Start property,
    this works for me:
    With olAppointment
    .start = DateValue(strStartDate) + TimeValue(strStartTime)
    .End = .start + TimeSerial(0, intDuration, 0)
    End With
    Assuming, that is, that intDuration contains the number of minutes the appointment should last.
    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

  • How to reverse the end date on Oracle Standard Benefits plan for a employee

    Hi,
    We tried to end date a medical benefit plan for an employee but did it wrong. It should show end dated 31-JAN-2010 and then we wanted to add a new plan starting from '01-FEB-2010'. But we wrongly end-dated as on 31-DEC-2010.
    Can anyone help me to identifiy how to remove the wrong end date from the benefit plan for the employee..
    Regards
    Arun Kumar S Rathod

    If you are using life events, just backout the life event and the end-date will go away. then create a fresh life event and make necessary changes.

  • Change infotypes end date when delete leaving action for employee

    Hello,
    I created new infotype and when employee leaves its end date is changed for leaving date.
    When leaving action is deleted ther is some least of infotypes that user can sign so the end date of selected infotypes will be changed to 31.12.9999. How can i add my infotipe to this list?
    Thank you,
    Paulina

    Hi,
    Maintain IT 0041 where in that table maintain employee start date of hiring and leaving date of employee bze in IT 0000 the dates will change as per action lets say if employee hire that date will be in IT 0000 action and if employee gets promotion date or leaving date that will store in IT 0000 by delimiting other actions
    So maintain IT 0041 where you can pull dates from there if you maintain
    End date will always be 31.12.9999 so check action start date you will get in sequence
    Thanks
    Edited by: Vibinsap on Mar 9, 2012 7:12 AM

  • Infotype for Employee begin date and end date

    Hi Friends,
    Could any one tell me the infotype and fields for getting employee joining date and end date.
    Regards,
    Susmita.

    Infotype 41 (Date Specifications) should have all dates.
    Infotype 2...i.e. PA0002 BEGDA & ENDDA may not have actual start and end date depending on how your company maintains it.
    In Infotype 41 (table PA0041)...get either BEGDA & ENDDA or get correct date based on qualifier DAR01-DAR12.
    Thanks,
    Pushpinder Randhawa

  • Employee qualification assignment IT0024 validity end date update

    I Would like to change the validity end date value on one specific qualification assigned to an employee.
    I can't do it using PA30. Is there anybody able to tell me how can I do it?
    Thank you

    You can't change endda because infotype 2 endda has to be '31129999'.
    It's explicit here in this validation in module POST_INPUT_CHECK.
    form check_it0002.   "form aus mppers00 hierher verlegt    "VLDN212840_2
      if psyst-first eq yes and cprel-endda lt high_date.
    *   I105(RP): Gültigkeitsende muß gleich & sein
        p0002-endda = high_date.                               "VLDN212840_2
        cprel-endda = high_date.                               "VLDN212840_2
        message e105(rp) with high_date.
      endif.
      if psyst-ioper eq modify.
        if cprel-endda lt high_date and pskey-endda eq high_date.
          p0002-endda = high_date.                             "VLDN212840_2
          cprel-endda = high_date.                             "VLDN212840_2
          message e105(rp) with high_date.
        endif.
      endif.
    endform.                    " check_it0002
    high_date is a constant with value '99991231'.
    Anyway, why would you want to change the endda on infotype 2 ?

  • How to end date links

    hello gurus,
    I wld like to knw hw i can end date element links for elements that are already attached to the employees. I have already manage to terminate the staff. now i want to end date the links of all the elements that are not in use by our company.
    Note: The links to each element are 3 and there are 100 elements so 300 links are to be end dated.
    Please advice.
    Edited by: user12011641 on Oct 3, 2011 6:56 AM

    You can use the API -
    PAY_ELEMENT_LINK_API.DELETE_ELEMENT_LINK(...)
    For P_DATETRACK_DELETE_MODE, try options other than ZAP -      
    Indicates which DateTrack mode to use when deleting the record. You must set to either ZAP, DELETE, FUTURE_CHANGE or DELETE_NEXT_CHANGE. Modes available for use with a particular record depend on the dates of previous record changes and the effective date of this change

  • How to calculate first date and end date of this year in Query

    Hi Expert
    I want to calculate following dates with inputted date in query.
    I have no knowledge on ABAP and I just can create a query with simple logic.
    Could you teach me how to calculate following date?
    (If inputted date is April 12 2009)
    - First date of this year (Ex January 1 2009)
    - End date  of this year (Ex December 31 2009)
    - First date of last year (Ex January 1 2008)
    - End date of last year  (Ex December 31 2008)
    - First date of this month (Ex April 1 2009)
    Thank you!
    Take

    HR_JP_MONTH_BEGIN_END_DATE   use this FM to get the begin and end date of the Date you are passing. eg when u give input as 04/12/2009, it will return
    04/01/2009 as begin date
    04/30/2009 as end date
    pass the Year in this FM HR_E_GET_FISC_YEAR_DATES, you will get the Fiscal year Begin and End Dates
    Abh

  • How to set a default start and/or end date for New Events based on trigger date.

    I'm using the CalendarActivityListener to get current row when clicking on an existing event. As per previous posts this listener gives you access to event detail including Start Date, End Date, etc.
    However, what I want to do is to default the start (and end) dates for New Events based on the trigger date.
    I've tried the CalendarListener and can grab the Trigger Date from it - however, I can't see a way to pass this directly to the popup/dialog I'm using to create the new event.
    At present I'm putting the TriggerDate into the ADFContext session scope e.g. ADFContext.getCurrent().getSessionScope().put("TriggerDate",calendarEvent.getTriggerDate());
    Then, I've tried multiple approaches to try and "get" the TriggerDate from session scope to drop it into my new Calendar Event basically, I'm trying to default the InputField(s) associated with the Start Date using the value from the session - I've tried
    1. setting the default value for the InputField in the jspx using a binding expression i.e. value="#{sessionScope.TriggerDate}" - this actually sets the value appropriately when the jspx is rendered but, when I go to create I get a NPE and I can't debug. I assumed that it might be a Date type issue - it would appear that CalendarListener provides a date of type java.util.Date and that the StartDate attribute of my VO/EO/table is a DATE and therefore requires oracle.jbo.domain.Date so I tried casting it - to no effect
    2. Using a Groovy expression *(StartDate==null?adf.context.sessionScope.TriggerDate:StartDate)* in my calendar's EventVO to default the Start Date to the same result
    Any thoughts or ideas?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

Maybe you are looking for