How to validate each entered hours for a day.

Hi
I have a requirement to allow staff members to enter on full hours of half hours (i.e use should be able to enter on 7.5 or 8 and not 7.25).
How can I implement this? Is there a seeded formula to validate each individual hours entry?

If you want to validate what the user enters in a particular cell (row/column intersection) then you may have to write your own time entry rule.
The seeded rules are to be seen as templates for any rules you need to create.
OTL calls a Fast Formula as the first stage of the TER. But, because you are validating the timecard BEFORE it has been submitted to the database, the data to be validated is only held in PL/SQL tables in memory. Therefore, it is always necessary for the FF to call an external function to read and process the data still in memory. The seeded rules all call these functions.
In your case, I would suggest that your function would need to search for each cell where an entry has been made and validate it. To do this efficiently, you would need to understand the TIMESTORE STRUCTURE.
Regards
Tim

Similar Messages

  • How to access each row value for a database item

    On my form I have a database datablock that represents a table in my database.
    5 rows are shown with a scroll bar that can be viewed to show the rest.
    The user is able to change some of the Database Item values represented in this datablock for any row shown in the datablock.
    I need to validate the correctness of the users change before allowing the database datablock to update the table in the database.
    But a database item in a datablock will represent a value for every row in the table. So how do I access each row value for a database item separately. What is the PL/SQL syntax?
    thanks,
    michelle

    In my situation it was better to use the loop instead
    of a when validate trigger because...Well it was clearly not better to use a loop that doesn't work. I don't understand what you're not clear on about the item and record validation triggers. If you have a specific validation rule for a single field (such as a date that cannot be in the future), that would go in a When-Validate-Item trigger on the date item. If the user enters a future date, your code would display an error message and raise a failure. Raising a failure prevents the item from being marked as valid. Invalid items prevent the record from being inserted/updated. Sometimes you have a validation rule that requires looking at more than one item at a time, such as two items that must either both be NULL or NOT NULL. In that case, you could not use a When-Validate-Item trigger because you can't clear or populate both at once. So then you would use a When-Validate-Record at the block level and if one field is NULL and the other isn't, you would display an error message and raise a failure. Forms is very civil in this respect; we don't throw exceptions around here, but then I digress.

  • How to validate data entered in table maintenance for Z table?

    Hi,
    I created a Z-table with table maintenance. I'd like to perform some validation on the entered data.
    I know there are events for these : "If this pre-defined time is reached in extended table maintenance, the FORM routine specified for the current view and for this time is processed. This is useful, for example, for performing consistency checks before saving or specific actions when creating new entries."
    I also found some info in the Online help:
    http://help.sap.com/saphelp_47x200/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    However it's not clear which event I can use for validation.
    I tried event 01, however when I added a message, in the SM30 in case of message, I got the SM30 initial screen.
    Do you have any example about validation?
    Thanks in advance,
    Peter

    Hi,
    Once you are on the table maintenance generator screen.
    GOTO --> Enviornment --> Modification --> Events.
    Here specify Event as '01' and the Subroutine name that will hold the data for the validation.
    As you know we need to specify a function group.
    GOTO SE80 and Open your function group.
    Now in the PBO of the screen write a subroutine for the validation before saving an entry in the table.
    Refer the code below for validation.
    *&      Form  F9000_CHECK_BEFORE_SAVE
          Subroutine called dynamically to check values before saving
    FORM f9000_check_before_save.
      TYPES : BEGIN OF ty_flmt,
              zz_flmt_type     TYPE zz_flmt_type,
              zz_gsm_flmt_code TYPE zz_flmt_code,
              END OF ty_flmt.
    Internal Table
      DATA : lit_flmt_code TYPE TABLE OF ty_flmt,
             wa_flmt_code  LIKE LINE  OF lit_flmt_code.
      DATA: lv_subrc TYPE sy-subrc VALUE '0',
            lv_tabix TYPE sy-tabix,
            lv_total_rec TYPE i,
            lv_rec       TYPE i,
            flg_upd      TYPE flag.
      DESCRIBE TABLE total LINES lv_total_rec.
      LOOP AT total.
        lv_tabix = sy-tabix.
        READ TABLE extract WITH KEY total.
        IF sy-subrc EQ 0.
          IF extract+3(10) IS INITIAL.
            DELETE total.
            DELETE extract INDEX sy-tabix.
           DELETE extract INDEX lv_tabix.
            lv_subrc = '4'.
            flg_upd = 'X'.
            MESSAGE s119(zcrm_appl) DISPLAY LIKE 'S'.
            SET SCREEN 0.
          ENDIF.
        ENDIF.
        wa_flmt_code-zz_flmt_type = total+13(3).
        wa_flmt_code-zz_gsm_flmt_code = total+16(10).
        APPEND wa_flmt_code TO lit_flmt_code.
      ENDLOOP.
      IF flg_upd IS INITIAL.
        SORT lit_flmt_code BY zz_flmt_type zz_gsm_flmt_code.
        DELETE ADJACENT DUPLICATES FROM lit_flmt_code.
        DESCRIBE TABLE lit_flmt_code LINES lv_rec.
        IF lv_total_rec <> lv_rec.
          LOOP AT extract.
            READ TABLE total WITH KEY extract.
            IF sy-subrc EQ 0.
              DELETE total INDEX sy-tabix.
              DELETE extract INDEX 1.
              lv_subrc = '4'.
              MESSAGE s289(zcrm_appl) DISPLAY LIKE 'S'.
              SET SCREEN 0.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      sy-subrc = lv_subrc.
    ENDFORM.    
    <b>Please reward points and close the thread.</b>
    Regards,
    Amit Mishra

  • How to validate File Path given for upload

    Hi All,
    I am trying to upload a file using the File Upload Control. I have already bound the data and resource property with the context attributes. Can someone please suggest that what can be done to validate the file path? For eg. if i enter "abcd" in the file path and click a button for uploading the file. My application simply "<b>HANGS UP</b>" without even reaching the code what i have written on action of the button.
    Is there any way to permit the user to enter the path only through Browse button and not manually? Please reply ASAP.
    Thanks and Regards,
    Smriti

    Hi Smriti,
    Have a look on the Following Links... which clearly briefs what is the use of FileUpload UI and how it works behind the screen...
    <a href="/people/dagfinn.parnas/blog/2004/08/15/inputfile-how-to-hide-the-plain-browse-button you about the how the FileUplaod UI is being built.</a>
    <a href="/people/dagfinn.parnas/blog/2004/08/15/inputfile-how-to-hide-the-plain-browse-button more stuff on FileUpload UI</a>
    <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;892442">How the FileUpload UI interacts with the local system</a>
    After going thru above post, you can identify that the inputField is being declared as FILE type (like <input type="file" >), and you would also noticed the cause for your error in the last link which I have specified above, and what microsoft also recommends for it as a solution to show an alternative message in place of the blank screen...
    Hope now you would be clear...why your method is not being invoked..
    Please revert back for futher queries... try to come soon with an alernative solution...
    Regards / Guru
    Message was edited by:
            Armin Reichert

  • How to calculate number of hour for projects

    Hello Experts
    I got a table which has all the information about employee. I need to find the number of hours an employee worked on a project. Let say employee ‘ABC’ worked on 2 different projects. I need to find out how many hours he worked on each project. In my table I’ve
    employee_id, employee_name, proj_startdate, proj_enddate, finishtime fields.
    Can please somebody show me how I can find out the hours?
    Thanks a lot in advance

    it's useless...
    but you need to add a field 'project_id', if an employee works for multiple projects..
    furthermore, you can also add a field named like 'working_hours' into your table...
    your table new structure, let's say the table name is employee
    employee_id, employee_name, project_id, proj_start_date, proj_end_date, working_hours
    then you can use the below codes to update it and make your data be more clear...
    UPDATE employee a
    SET a.working_hours = (SELECT (proj_end_date-proj_start_date)*24 FROM employee b
    WHERE a.employee_id = b.employee_id
    AND a.project_id = b.project_id);
    BUT, you have to add a constraint on your table to make the fields(employee_id, project_id) be unique

  • How to change birthdate entered incorrectly for my child's apple id

    An apple id has been set up for my child, but the incorrect birthdate was mistakenly entered.  As the adult, I am trying to set up Family Sharing on icloud, and it shows my child listed as an adult.  How do I change the birthdate to reflect he is a child?  When I log in as his apple id, and go to the "password and security" section, I answer the security questions.  When I go down the the "select your birthdate" section, and try to change it to the correct date, hit save, an error says "You cannot change your birthdate at this time".  I have logged out and logged back in a few times to try again, to no avail.  How can this be corrected?

    I see this question posted 100 times I'm trying to find the answer as well. Does any respond and help out here?

  • How to Validate Newly Added Fields for ME22n and ME23n

    Hi Experts,
    I have added 2 fields at the item level of PO Change and display(ME22n and ME23n). I used the BADIs ME_GUI_PO_CUST and ME_PROCESS_PO_CUST and got that displayed.
    I got a new tab at Item level and my fields are displayed there.
    My problem is how to populate or validate the values into that fields now. The validations have to be done per each item. I would like to have some sample code.
    Useful answers are surely rewarded.
    Thnks in Adv.
    Bhupal

    Thank U Sudha.
    But How can i do the same with BADIs??
    Reply soon.
    Thnx in advance
    Bhupal

  • How to validate the string object for alphabet input

    Hi,
    I want to check for alphabet (a-z,A-Z), in String object. I need to check the object, whether its contain numerals or special character, in that case, I want to throw an error stating that "value is not valid". It should accept only the a-z or A-Z.
    how to do this.
    Thanks in advance
    Karthi

    > I want to check for alphabet (a-z,A-Z), in String
    object. I need to check the object, whether its
    contain numerals or special character, in that case,
    I want to throw an error stating that "value is not
    valid". It should accept only the a-z or A-Z.
    how to do this.
    As Rene suggested, you can do this using the Pattern class:
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
    You can do it also by looping through your String and check with String's charAt(index) method (which returns a char) to see if every char from the String is >= A AND <= z.
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
    Good luck.

  • How to validate a user input for where clause?

    I have a situation to validate a where clause which is input by the user.
    Because the query will be run against huge tables and we need to notify the user if they input the clause is not valid.
    I use the below query to try:
    Select 'A' from blablabla where user_input_where_clause and 1=0;
    however, it can not capture the error when the user input:
    'name=123' while the right condition should be name='123'.
    Can you pls advise ?

    In this particular case, Oracle will not even try to run the SQL statement because of the syntax error. IF the WHERE condition supplied does not make sense, Oracle will not execute the statement, so it does not matter if the query accesses huge tables.
    SQL> Select 'A' from blablabla where 'name=123' and 1=0 ;
    Select 'A' from blablabla where 'name=123' and 1=0
    ERROR at line 1:
    ORA-00920: invalid relational operator
    SQL>IF you have a restriction as to what type/value can user specify for the where condition (asuming it would make sense to SQL engine), you would have to do it before submitting to the database.
    Note, however, that user could specify any condition they like, having potentially damaging effects.

  • How can I print the puzzle for a day that has gone by?

    I am new to this and can't find how to print a puzzle that I missed, how do I do that?

    You are referring to the crossword puzzle app?  There does not appear to be a way to go back and get puzzles from days past. You can set it up for scheduled delivery and choose the days you want it to print so you don't miss it on days that you want to receive it. You can manage that app and others by going to http://www.eprintcenter.com. 
    You also have the ability to pause and resume printing by settings dates like if you were going on vacation and did not want it to print during that time. 
    I am a former employee of HP...
    How do I give Kudos?| How do I mark a post as Solved?

  • How to boost your play amount for the day

    I use to be able to boost my friends amount by just clicking
    the play icon on a song on my friends page and give him hundreds of
    plays but I cant do it no more. Why is this?

    hiya!
    do you mean the nano's name in the ipod source list?
    if so, select the ipod in the itunes sourcelist. click on it once, and pause for a second or so. you should then be able to type in what you please.
    love, b

  • CAT2, entering 99 hours in one day

    Hi there,
    I am busy doing a conversion for a division that is going to use CATS. They want to enter hours for past weeks, to make it easy as many hours as possible in one day. The maximum of hours in one day should be 99 according to the field format. However, when we enter 99, this is automatically reset to 23,50 for a working day, and 24 for a non-working day (without an error message).
    The strangest thing is, I tested this myself last september and then it was possible. Any suggestions?
    Greetings,
    Maud.

    I solved this by dividing total hours into portions of max. 23 hours per day in my program. Still I have no clue what setting defines the maximum possible hours as 23,5.
    Maud.

  • Per diem for multiple days trip - as per German law 2014

    Dear all,
    I'm working on the per diem as per German law 2014. For the multiple days trip, the meal per diem as 12 EUR will be paid for the first and the last day.
    It's configured and tested fine in our system.. But then when I remove the check at "Accommodation", system will calculate 0 EUR for the first and the last day if the travel time less than 8 hour - seems that SAP considers it's not multiple day trip - SAP apply the rate of single day.
    For example,
    Start           10.07.2014     18:00
    Return         12.07.2014     09:00
    With Accommodation, the per diem for meals calculated as:
    10.07.2014     12 EUR
    11.07.2014     24 EUR
    12.07.2014     12 EUR
    Without Accommodation, the per diem for meal calculated as:
    10.07.2014     0 EUR          (as travel time in this day less than 8 hours - from 18:00 to 24:00)
    11.07.2014     24 EUR
    12.07.2014     12 EUR          (as travel time in this day more than 8 hours - from 00:00 to 09:00)
    1. -> So I understand that SAP use accommodation as proof for multiple day trip, and it's required to calculate the meal per diem for the first and last day. Is it correct?
    2. Is there any solution for this issue? As normally company pay dirrectly the hotel cost, so the employees dont have to claim the accommodation - but if we dont check at the accommodation, the meal per diem not calculate correctly for first and last day.
    Appreciate your answer
    Best regards,
    Andy

    Hi Nina
    I suspect this could be to do with how you have the hours and intervals defined (and are you starting this from a domestic schema first of all as if so then is the problem as the trip schema can only be domestic or international and not both when taking into consideration per diem calculation!)  You must have the distinction that the trip is either domestic or international basically.
    Also In the standard logic, a reimbursement interval has maximal 24 hours (neither a calendar day or a 24 hours
    interval). If you maybe reach within 1 calendar day, 1 additional destination at 13:00 the interval is divided into 1 interval
    from 00:00 - 13:00 and one from 13:00 - 24:00. So the reimbursement amounts for hours in view V_T706V are read  1 time with 13 hours and 1 time with 11 hours. So in sum T706V is read with 24 hours for this day. This is the same as if there would be no additional destination.
    It also depends on what is the max/min rate you have defined to reach full per day per diem in each case too, you would need to define hour split to make a domestic trip work with additional destination so you have to maintain in T706V and T706H in a way that with in these 2 intervals, the same amount is calculated as if it would be 1 interval from 00:00 - 24:00.
    Hope this helps
    Sally

  • Date for first day of current month

    How can i get the date for first day of current month ?

    select trunc(sysdate,'MM'),to_char(trunc(sysdate,'MM'),'DD'),to_char(trunc(sysdate,'MM'),'Day') from dual;

  • Spool Request for 365 days?

    Hi Gurus,
    1.     One of my client wants the Spool request to be stored for 365 days
    So please let me know how can I store Spool request for 365 days?
    2.     By default how many days Spool Request is stored?
    3.     Any Spool related Parameter to hold the spool request for days?
    Your response highly appreciated
    Regards
    Ricky Smith
    Message was edited by:
            Ricky smith

    go into SM37 and cancel scheduling of SAP_REORG_SPOOL
    then, you can schedule program RSPO1041,
    check option at the bottom, you can specify usernames (creator).
    click on the arrow on the right, click on exclude single value and put your username
    adapt other parameters in this screen accordingly. call it SAP_REORG_SPOOL
    shchedule the same program and put parameters for 365 days four your special username only. call it SAP_REORG_SPOOL_SPC
    Result: you have 2 scheduled jobs:
    1. job that delete every old spool except for your special user
    2. job that delete 365 days old spool for your special users.
    Please award points if useful.
    Thaks.

Maybe you are looking for

  • My iTunes won't display the artwork

    My iTunes on a jukebox setting won't display the artwork. It currently has an error message of "iTunes is unable to browse album covers on this computer". It was working fine the other day. I have updated it version when I received the error message

  • Special G/L indicator - Due on date issue

    When I am posting to a vendor with Special Gl indicator, system is asking me to put DUE ON date. Whereas when we post to a vendor (without special GL indicator) FB60, standard behaviour of the system is to calculate Due On date based on the baseline

  • Volume needs to be repaired

    I just recently had a new hard drive and a logic board put in. I ran ONYX for the first time today and am getting a "volume needs to be repaired" message. What causes the volume to need to be repaired? And why already?

  • Import stops with 'Transport set created, exported, and submitted...'

    Hi, I'm using Oracle Portal 10.1.4, and I've successfully imported page groups into this portal before, but now when I try to do an import, I only see the following message in the 'Browse Transport Sets' page: Import: Transport set created, exported,

  • How do I load an upgrade version of elements 11 to a new PC.

    I have upgraded from Win XP to 8.1 by buying a new machine. I have a valid copy of elements 11 on DVD. This was upgraded from elements 8 which was downloaded and those files have been lost. Windows 8.1 will not read the DVD. How can I get PSE11 onto