Doubt in Date tracking update of person records

Dear all,
I have a doubt on the approach to be followed for a particular scenario. The following is the explanation:
Let us say we have a person record as follows:
Employee_No      Effective start Date         Marital status
100                    01-Jan-2000                  Single
Let us say HR user date tracked to  01-Jan-2010 and  updated to Married
So we have the following :
Employee_No      Effective start Date    Effective end date      Marital status
100                    01-Jan-2000                31-Dec-2009            Single                 
100                    01-Jan-2010                31-Dec-4712            Married
Later HR found that the date of updation was not correct it should be 01-Jan-2011, which was wrongly entered as 01-Jan-2010.
Now should the HR
1) Go to the earliest record and delete the next change and then re enter with correct date? or
2)  Go to 01-Jan-2010 , Correct the record to Single, go to 01-Jan-2011 update to Married.
Because Oracle allows both. In the second case, per_all_people_f  will have 2 records with the same set of data but with different start and end dates.
Can any body say which is correct approach and why?
Thanks
Raj

Hi Raj,
In terms of business both the actions will fine as in reports it will show the same result.
From technical (data level) It is your decision on the way you want to go ahead.
In case of a error it is better practice to purge the next changes and update the record with correct details.
Thanks,
Sanjay

Similar Messages

  • Need to display/update last date/time of an accessed record

    Hi All,
    I'm using ADF BC and I have a use case where I need to display the last date/time when a user access a record in a view. I have a user table that I access thru a view object where I can store the date/time of the fetched record. A viewLink from that view object gives me the detail information in that record.
    I generated a ViewRowImpl class and added this to the method that get the time and date (DtHeureDernAcces is a private variable in defined in the class):
    /**Gets the attribute value for the calculated attribute DtHreDernAcces
    public Date getDtHreDernAcces()
    if (DtHeureDernAcc==null)
    DtHeureDernAcc=(Date) getAttributeInternal(DTHREDERNACCES);
    setDtHreDernAcces(new Date(new java.sql.Timestamp(System.currentTimeMillis())));
    getApplicationModule().getTransaction().commit();
    return DtHeureDernAcc;
    This works fine until the user refresh the page, in this case the ViewObjImpl is recreated and DtHeureDernAcc is then null. So the date/time is updated after each refresh.
    How can I get around this problem ?

    The complication here is that &P7_DATE_SHIPPED. and &P7_DATE_ORDERED. are session-state variables - they don't actually get updated until the page submit completes, which is happening AFTER the dynamic action.
    JavaScript might provide an alternative method that will pick up the current values of those fields. You might try something like:
    HTML Header
    <script language="JavaScript" type="text/javascript">
    function check_hours(pThis){
      var v_shipdt = $v("P7_DATE_SHIPPED");
      var v_ordrdt = $v("P7_DATE_ORDERED");
      if(v_shipdt > v_ordrdt){
        alert("Shipping Date is before Order Date!");
      return true;
    </script>Put this in the HTML Form Elements Attributes of your page item:
    onchange="check_hours(this)"This is just pseudocode, but it may help get you started. Dates in JavaScript are a little tricky to deal with.

  • How to insert date into updated record (MySql, PHP)

    I want to be able to update an existing record and automatically include the date the change was made when I submit the data back to the MySql database.
    I saw this thread on how to insert the date on a new record using NOW()
    http://forums.adobe.com/thread/855152?decorator=print&displayFullThread=true#855152
    After reading it I successfully amended my insert.php page.
    Here's the code from my insert.php page which works nicely:
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO standardsclient_tbl (client_name, pantone_ref1, pantone_ref1_image, font_ref1, font_ref1_image, `date`) VALUES (%s, %s, %s, %s, %s, NOW())",
                           GetSQLValueString($_POST['client_name'], "text"),
                           GetSQLValueString($_POST['pantone_ref1'], "text"),
                           GetSQLValueString($_POST['pantone_ref1_image'], "text"),
                           GetSQLValueString($_POST['font_ref1'], "text"),
                           GetSQLValueString($_POST['font_ref1_image'], "text"),
                           GetSQLValueString($_POST['date'], "date"));
    This is the update.php page, I changed `date`=%s to `date`=NOW() but all this did was stop me from updating the record at all.
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE standardsclient_tbl SET client_name=%s, pantone_ref1=%s, pantone_ref1_image=%s, font_ref1=%s, font_ref1_image=%s, `date`=NOW() WHERE client_ID=%s",
                           GetSQLValueString($_POST['client_name'], "text"),
                           GetSQLValueString($_POST['pantone_ref1'], "text"),
                           GetSQLValueString($_POST['pantone_ref1_image'], "text"),
                           GetSQLValueString($_POST['font_ref1'], "text"),
                           GetSQLValueString($_POST['font_ref1_image'], "text"),
                           GetSQLValueString($_POST['date'], "date"),
                           GetSQLValueString($_POST['client_ID'], "int"));
    Can anyone see where I've gone wrong?
    Thanks

    In update query you have 6 %s but 7 GetSQLValueString. That's your problem.

  • Nervous about losing personal data when updating Xperia X10 to 3.0

    I want to download 3.0.1.6.0.75  to my Xperia X10 that currently has 2.1.1.A.0.6 but I am worried about losing my personal data. I have already used Backup and Restore to create a backup of my data but when I go to PC Companion on my home computer, it tells me
    Personal data such as contacts, messages.... saved in the phone memory will be overwritten..."
    Could you please give me ALL the steps I need to do to ensure I do not lose my personal data when updating to 3.0.? The last time I updated my phone about 5 months ago there were good step by step instructions to follow but now I cannot find them on your website.
    thank you,
    SP

    Don't forget to check the other Apps to backup your phone
    Contacts
    just to play it safe sync your contacts w/ google if you haven't already
    open your phonebook
    press MENU button -> tap on Send Contacts -> select all -> send it to your email
    on your computer
    -> download the file -> go to your gmail -> click on contacts -> click on more actions -> on the drop down menu click on "import" -> choose the file -> and click import
    Apps
    Don't worry so much about backing up your apps
    on your computer go to
    market.android.com -> log in -> click on My Library -> and send all your apps to your phone
    SMS/MMS
    if you don't want to use the backup & restore app then
    Install "backup SMS" to back up your SMS and MMS to your Gmail
    https://market.android.com/details?id=com.zegoggles.smssync&feature=search_result
    or your SMS use
    "backup & restore SMS"
    https://market.android.com/details?id=com.riteshsahu.SMSBackupRestore&feature=search_result
    or for your MMS use "Save MMS"
    https://market.android.com/details?id=com.schwimmer.android.mmsextract&feature=search_result
    Call Logs
    And for call logs this is great
    https://market.android.com/details?id=com.yang.android.ansta

  • Date tracking in Oracle HRMS

    Hello,
    in PER_ALL_ASSIGNMENTS_F AND PER_ALL_PEOPLE_F and other data tracked tables, is there any way to find out when a new record is going to be inserted and when an existing record is updated? For example when a job of a person is changed, a new assignment record is added. Similarly at what circumstances these date tracked tables are changed? Is there any document to find out a way to figure out?
    Thanks a lot in advance.
    --Kumar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    If I understand you correctly ypu want some npiece of code which does this checking for you and takes proper action.
    There is a specific api DT_API which helps you do that.
    I am posting a piece of code from that API (Spec from 11.5.10 instance)
    dt_api.find_dt_upd_modes_and_dates
    (  p_effective_date                in     date
      ,p_base_table_name               in     varchar2
      ,p_base_key_column               in     varchar2
      ,p_base_key_value                in     number
      ,p_correction                       out nocopy boolean
      ,p_update                           out nocopy boolean
      ,p_update_override                  out nocopy boolean
      ,p_update_change_insert             out nocopy boolean
      ,p_correction_start_date            out nocopy date
      ,p_correction_end_date              out nocopy date
      ,p_update_start_date                out nocopy date
      ,p_update_end_date                  out nocopy date
      ,p_override_start_date              out nocopy date
      ,p_override_end_date                out nocopy date
      ,p_upd_chg_start_date                out nocopy date
      ,p_upd_chg_end_date                  out nocopy date
      )Now there are numerous boolean variables and based on their values the action gets decoded.
    For example if you want to check for a record started on 01-JAn-2012 and you want to check what will be mode on 01-SEP-2012 then
    p_effective_date := '01-SEP-2012'
    p_base_table_name := 'PER_ALL_PEOPLE_F'
    p_base_key_column := 'PERSON_ID'
    p_base_key_value := 1234
    where 1234 is value of person_id.
    IF ( p_update_override = TRUE OR p_update_change_insert = TRUE )
        THEN
            -- UPDATE_OVERRIDE
            gc_dt_ud_mode := gc_upd_override; -- UPDATE OVERRIDE
        END IF;
        IF (p_correction = TRUE )
        THEN
            -- CORRECTION
            gc_dt_ud_mode := gc_correction; -- Correction
        END IF;
        IF (p_update = TRUE )
        THEN
            -- UPDATE
            gc_dt_ud_mode := gc_update; -- UPDATE
        END IF;

  • Date Track history tables in Oracle HRMS & Discoverer

    Hello experts,
    I will be glad if anyone can help thru. I am trying to develop the DIS report for Audit purpose that tracks all the changes entered by Data Entry clerks, regardless of effective date. Mainly from Person Form and Assignment Form.
    Is there anyway I can include the exact date/time the change made/status updated. Is the 'Effective date' clue?
    e.g. There is an Assignment Change - from 'Global Operations' organization to 'Domestic Application' organization. The change is suppose to be effective from 05/02/2011 but I am entering the action on 04/18/2011. Similar for past events - if I make date tracked Assignment change suppose to be effective from 04/04/2011.
    How can I accommodate this in a report. I just have EUL rights of Discoverer10g. (Oracle R12)
    Thanks a lot.

    Hello
    The effective date is used for date tracking, but not to determine when a change was made. To determine when a change was made you need to look at the date last updated. Bear in mind though that only tables which can be updated have this field. If a table is only used for inserts then you will not find this field.
    The effective dates are used to tie records in different tables together. Some tables have just an effective date, some have an effective start and an effective end, while others have a FROM date and a TO date. All of these can be used together to determine the state of play as it was at a certain point in time. The current records can have their effective dates compared to SYSDATE like this:
    EFFECTIVE_START_DATE <= SYSDATE and EFFECTIVE_END_DATE >= SYSDATE
    Records from one table can be tied to records in another to ensure for example that an assignment is tied correctly back to the right person record. In this case you would need to make sure that the effective date on the assignment is greater than or equal to the effective start date of the PERSON and less than or equal to the effective end date.
    Date last updated will be used to determine exactly when a record was updated. Sometimes a date last updated will pre-date an effective date when companies enter records in advance of when they will be active. For example, in payroll where it is very common to enter new salaries many weeks in advance or in your situation where a change is supposed to be effective from 05/02/2011 but is entered on 04/18/2011. In this case the date last updated will say 04/18/2011 and the effective date or effective start date, depending which is in use, will have 05/02.2011. The effective date, effective start date and date from should never change and should always reflect a record's effectiveness, regardless of many times the record gets updated. The effective end and from dates will be updated to a real date a new record is added and sometimes these will be NULL so you have to take that into account too.
    Data warehouses will generally load data based on the date last updated so that, for example, all records updated in the last 24 hours can be selected.
    Hope this helps
    Michael

  • Date Track fields - changes

    I have a question regarding the date tracked fields in HRMS.
    If I want to know what changes are made for a person record, How do I know that?
    The changes may be anything like position, salary, job, grade, marital status.
    How can I know the old value and the new value after the change?

    if you are modifying any assignment record an additional record will be created in the table per_all_assignments_f for the same assignment id.
    Example if the assignment is updated 3 times you can see 3 records created for the same assignment
    Thanks
    Regards
    Ramesh Kumar S

  • WCF-SQL notification and SQL Change Data Tracking - incompatible?

    Hi,
    I have a DB with Change Data Tracking enabled on a particular table. Each time an Update/Insert is made on this table, I'm able to check what need to be synchronised with other systems by using the CHANGETABLE function of SQL Server.
    And I want to use it with a Receive location WCF-SQL with inboundOperationType=Notification. So each time a modification is made on the table, I have a notification and I'm able to retrieve the updated/inserted records.
    Unfortunately, it seems that using the CHANGETABLE is not supported in the NotificationStatement, I got the following error: "The notification callback returned an error. Info=Invalid. Source=Statement. Type=Subscribe.".
    Any ideas to workaround?
    Thanks.

    Hi Johns-305,
    Thank you for your response.
    I'm not totally agreed with you about the notification because it depends on the situation.
    In my case, I have a table in a remote SQL database where data are not changing often. But I want to retrieve the changes as fast as I can because it needs to be synchronised with a MDM. 
    The notification is great for me because I get a notification message just after a change and I can synchronise it. Of course, if my receive location is down I can't receive the notification but with the mechanism described in the MSDN article you pointed,
    I can get the changes I missed during the outage.
    And now I have a solution to use the notification and the Data Change tracking: I use a regular SELECT statement in the notification statement (SELECT <columns> FROM MYTABLE). If something changes in the table, I got a notification and then I send
    a SELECT FROM CHANGETABLE(MYTABLE, ...) and I store the number of the last modification I got. So I can retrieve only the changes that occurs since my previous call.

  • When attempting to view the date track history for one employee, errors out

    Hi All
    When I attempt to view the date track history for one employee, it gives errors.
    To get the details, the navigation is :
    1. Search for employee xxxxxx
    2. click on Assignment button
    3. click on Date Track History.
    4. Receive error APP-DT-52554.
    5. Click OK on error message
    6. click on Full History button.
    7. Receive error APP-PAY-06153
    What could be the problem and how to solve this?
    Regards
    Rahman

    Sounds as if there is an inconsistency with the date tracked records. Can you check the records through TOAD or SQL Plus?
    Have alook at MetaLInk article 343070.1 which refers to the second error message.
    Regards
    Tim

  • How do I update all the records in a table from the contents of another table?

    Ok some situation information, I have a pervasive database that runs our accounting software that I am pulling a product list from.  I have that list stored in a table in SQL.  From time to time we update the records in the pervasive database and
    I want to be able to pull those changes into the SQL table.  I don't want to drop the table and recreate it because if a product is no longer active in the pervasive database it will not be returned by the query (if I return all the products even the
    inactive ones I will get thousands of records rather than just a few hundred) and I do not want to loose the products from the table that are now inactive.  
    So what I want to be able to do is pull the list from pervasive, compare it to the list that exists in SQL and update any changed records, add any new records, and leave any now missing records alone(missing from the pervasive list but present in the SQL
    list).  I have no trouble pulling the records from pervasive (now) but I am a little stumped on how to do the rest.  I am not sure if this is a situation to use MERGE or not.  I also do not really need this to be done on a regular basis as the
    changes do not happen often enough for that, the ability to manually trigger it would be enough.
    Any help would be appreciated.
    David

    Hi David,
    lets say you want to go with the lookup transformation.
    lets say u want to move the data from server A table A1 to Server B table B1
    What you need to do is the following:
    Cofigure the Lookup options as follows:
    - In general -> Specify how to handle rows with no macthing entries -> "Redirect Rows to no Match Output"
    -  In Connection -> Set the ole db connection to the Server B and select the table B you want to lookup the values in your case the table where you want to input the changes 
    -  In columns -> link the product column from table A to product column in table B. And do not select any rows to output.
    - now your component is ready next you need to input. so when u connect your lookup to the destination component You will get an option to select which output you want to use - use "Lookup No Match Output".
    this will actually just allow you to add only new items only to the table B.
    Teddy Bejjani - BI Specialist @ Netways

  • Data loader : Import -- creating duplicate records ?

    Hi all,
    does anyone have also encountered the behaviour with Oracle Data Loader that duplicate records are created (also if i set the option: duplicatecheckoption=externalid) When i am checking the "import request queue - view" the request parameters of the job looks fine! ->
    Duplicate Checking Method == External Unique ID
    Action Taken if Duplicate Found == Overwrite Existing Records
    but data loader have created new records where the "External Unique ID" is already existent..
    Very strange is that when i create the import manually (by using Import Wizard) exactly the same import does work correct! Here the duplicate checking method works correct and the record is updated....
    I know the data loader has 2 methods, one for update and the other for import, however i do not expect that the import creates duplicates if the record is already existing, rather doing nothing!
    Anyone else experiencing the same ?? I hope that this is not expected behaviour!! - by the way method - "Update" works fine.
    thanks in advance, Juergen
    Edited by: 791265 on 27.08.2010 07:25
    Edited by: 791265 on 27.08.2010 07:26

    Sorry to hear about your duplicate records, Juergen. Hopefully you performed a small test load first, before a full load, which is a best practice for data import that we recommend in our documentation and courses.
    Sorry also to inform you that this is expected behavior --- Data Loader does not check for duplicates when inserting (aka importing). It only checks for duplicates when updating (aka overwriting). This is extensively documented in the Data Loader User Guide, the Data Loader FAQ, and in the Data Import Options Overview document.
    You should review all documentation on Oracle Data Loader On Demand before using it.
    These resources (and a recommended learning path for Data Loader) can all be found on the Data Import Resources page of the Training and Support Center. At the top right of the CRM On Demand application, click Training and Support, and search for "*data import resources*". This should bring you to the page.
    Pete

  • Item text in Purchase Order getting updated with info. record Purchase Order Text

    Hello All,
    I am working in a roll out project and facing issue in text repeating twice for the line item in the Purchase Order for the new company code for which rollout is happening
    Issue:
    Item text in Purchase Order getting updated with info. record Purchase Order Text
    01) PO Text is maintained in the material master under "Purchase Order Text" tab
    02) The PO text that is maintained in material master is getting updated in the Purchase Info. Record
    03) When Purchase Order is created, the "Item Text" gets updated in the Purchase Order automatically only for the new company code for which rollout is happening. when printed, this results in the text getting duplicated twice
    03.1) this behavior is not observed in the Plants/ Company code that is already Live
    Configurations in the system:
    The copying rules for the "Texts for Purchase Orders" is
    Source Object = "Info Record", Source Text="Purchase Order Text", Fix="*"
    We have modified the Purchase Order form to print one of  the condition types maintained for calculating the tax. Other than this there is no change to the plants that are already live.
    I could not locate any "Purchase Organization" / "Company Code" / "Plant specific configuration.
    Am I missing any configuration or where can I look in what is causing this error.
    Request help from the experts in the forum.
    with Regards,
    Dhandapani R

    There is no company/purchasing/plant specific customizing for purchase order text.
    The customizing copying rules for the "Texts for Purchase Orders" affects all equally .
    If the text in the purchase order in ME23N is already filled different to other plants, then you either have a modification in place, or the texts are differently maintained in the referenced data (vendor, material, info record, contract)

  • How to track updates in Master Table?

    hi all
    I have few Master tables like MRP Controllers , Asset Classes, reason for Investment etc.I have got the master tables that store these information. but standard IDocs are not present for those Master data.
    My requirement is , whenever new Master data is added / or existing master data is updated in these tables , i immediatly want to send that changed/newly added data to legacy system.
    what are the different ways to track these changes and send it to legacy system ?
    Regards
    Sheetal

    Hi Sheetal,
    You can also check the user exits for the same.
    Most of the master data creation program has the user exits associated with them at the new data creation.
    So you can explore that option also.
    Reward points if useful.
    Regards,
    Atish

  • Workflow: Automated email when field(date) is updated

    Gentlemen,
    I am trying to implement a workflow were an automated email is send as soon as a specific date is updated. The update happens via webservice.
    While testing the following criteria: [<date>] <> PRE('<date>') I found that it only sends an email when the previous value was not null. Updating from one date to the other works fine.
    Since we are always updating the complete account record when a field changes in our ERP app, simply have it trigger on changes doesn't work. The workflow has to make sure the previous value was different from the new value.
    I have also tried other combinations using [<date>] IS NOT NULL, however I would again need the previous expression to verify the value actually changed.
    Anybody have a good workflow at hand for this type of set up?
    Thanks & best regards,
    Ben

    Hi Ben,
    You need to check for both expressions:
    " (PRE('<YourField>') = [<YourField>] OR FieldValue('<YourField>') IS NULL) "
    You check whether it's changed or was previously empty using the "OR" statement.
    Thanks
    Oli @ Innoveer

  • How to look up master data in update rule

    Hi Friends,
    I want to Fill a characteristic of an info cube using the attribute value in a master data in Update rule.
    Eg: I want to fill a field in cube 0PM_C01 that is got from Master data 0PM_ORDER. I have to do this in upate rule. Can anyone help me.
    Joe

    Eugene, Atlaj
    Your answers were very useful.
    Eugene as you said,
    I read the link you mentioned and I can use code
    like this
    DATA: mat LIKE /BI0/PMATERIAL-MATERIAL.
    SELECT SINGLE MATERIAL FROM /BI0/PMATERIAL INTO mat
    WHERE EANUPC = COMM_STRUCTURE-EANUPC AND OBJVERS = 'A'.
    IF SY-SUBRC = 0.
    RESULT = mat.
    RETURNCODE = 0.
    ELSE.
    RETURNCODE = 8.
    ENDIF.
    But for each record of comm structure the selection quer y will touch the Data base. As Atlaj said, can I fill the internal table in the start routine and look it up in the update rules. I think the performance willbe increased. Could you give me code sample or link?
    Thanks in ADV
    Joe

Maybe you are looking for

  • I can't tether my nikon d600 with lightroom 4.2

    i can't tether my nikon d600 with lightroom 4.2

  • Windows Logs

    your profile lists you as an MCSE with five years in IT and you don't know how to search the security log? Is this windows 7 machine on a domain or not?

  • Data Dictionary for Flatfiles?

    Hi everyone, Is there a document out there for the data dictionary of the flat files? I found "BIAPPSDMRV796_RevA.pdf", which is the data model/data dictionary for the OBAW tables. But it doesn't contain the info for the flat files (at least I haven'

  • Read a file in labview already open in another program

    Hi, I am using labview to read a text file, also there is one more software(not lab view) is writing to the same file which I am using to read.My problem is that ,is it possible to read a file which is already openned by another software ? Thanks, Sa

  • WRT54GS Connection in videogames dropped, but not online

    Hi, starting back in february or so, I've had this weird problem with my WRT54GS router. Originally I would be able to play Team Fortress 2 no problem, but after a few months I would get kicked out randomly every 15-20 minutes. I could still play oth