How to use the manually entered Hours/Days in the Duration field for BG_ABSENCE_DURATION

Hi All,
How to use the manually entered Hours/Days in the Duration field for BG_ABSENCE_DURATION fast formula?
Requirement is to restrict employees for applying for leave more than the accrued balance. In SSHR, apply leave functionality, the employee enters the start date, end date and duration manually. The entered duration must be used in the fast formula to check against available balance.
In the BG_ABSENCE_DURATION FF, I have a function to calculate the net accrual balance as on the calculation date.
I want to add the logic as - If to_number(Duration) /*[manually entered value]*/ > net accrual balance then
Duration = 'FAILED'
invalid_msg = 'Error'
return duration, invalid_msg
Thanks!

Hi,
We have a standard functionality to override the duration calculation and you don't need to add a validation for the same. Please set the value of profile option HR: Absence Duration Auto Overwrite to Yes
When you do this user will not have to enter the duration value manually. It will get auto calculated based on the duration calculation in BG_ABSENCE_DURATION when you click on the next button.
For not allowing negative leaves to be applied, If you are on R12 then, this is a standard functionality and you need to set profile option HR Allow Absence Negative Balance to No
If you are on 11i then refer Note: 268171.1: How Do You Stop Accrual Plans from Going Negative?
Try and let me know in case you need further help.
Thanks,
Sanjay

Similar Messages

  • How do I compute miles per hour from distance and duration fields?

    miles/duration = mph.
    in excel the equation is 1/(distance/duration x 24)

    You could use the DUR2HOURS function, something like this:
      =A2÷DUR2HOURS(B2)
    SG

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • DTW -How to use a Manual Series in PO

    Hi Experts
    I want to upload open purchase orders through DTW It is working fine if I choose a series. But In my case PO numbers are not sequence so I want to choose manual series in document numbering. For that I choose  -1 which it show when I select manual series. But when I import using DTW it gives message 'Record matching is not found'.  Please give your suggestions. What can be done If I want to enter Docnum as I want.
    Thanks
    Jitender

    Jitender,
    It is absolutely possible. The key is to set the HandWritten column to tYES and depending on the SAP version add the manual document number either in the DocNum or ManualNumber column (ManualNumber for the earlier versions and DocNum for newer ones, can't remember which is which so please try).
    I hope this helps.
    Regards,
    Nat

  • How to find the last 4th business day of the month (not include weekend)

    Hi,
    I need help how to code the ABAP program to locate the last 4th business day of the month (not include Satuday, Sunday and holidays).
    For example for the last 4th business day in 2008 are:
    1/28/2008,
    2/26/2008
    3/26/2008
    4/25/2008
    5/27/2008
    6/25/2008
    7/28/2008
    8/26/2008
    9/25/2008
    10/28/2008
    11/21/2008
    12/26/2008
    Thank you so much!
    Helen

    Hello Helen
    I would use a two-step approach:
    (1) Set date to the first of day of month (e.g. 20080201 = 01.02.2008)
    (2) Subtract four working days from this date
    If I remember correctly there is a function group BKK available which contains fm's for adding workdays to a given date (search for 'BKKWORKDAY). To subtract a number of working days use a negative number.
    See also: [BKK_GET_MONTH_LASTDAY|reg :BKK_GET_MONTH_LASTDAY;
    Regards
      Uwe

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • How to use a charctersic as a keyfigure in the BEx report

    How to use a charctersic as a keyfigure in the BEx report?

    Hi chandra:
    Please take a look at the document below.
    "How to... Calculate with Attributes"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc?quicklink=index&overridelayout=true
    Regards,
    Francisco Milán.

  • Query: how to use structure and selection and what's the difference between

    Query: how to use structure and selection and what's the difference between these two?
    Would be appreciated if some experts here give examples to demenstrate on how to use structure and selection in query and what's the difference between these two?
    Thanks in advance!

    Hi Kevin,
    1. Well by default all the KF that you include in your query go into a Key Figure Structure. You can additionally have another structure for defining how your chars are laid out. A common example is a Calmonth structure where you have selections for 12 months, quarers and YTD values. This would be a char structure with different selections (for each month, qtr etc)
    2. Yes, a selection with a KF is the same as restricting a KF. You can use am RKF is you have one on the left hand side, or if you need to do this locally in the query, right click the structure and choose New Selection, then proceed to choose your KF and reqd char values.
    Hope this helps...

  • Do u know how to prompt user to enter password and validate the password?

    hi all,anyone knows how to prompt user to enter password and validate the password as well?I do not need the GUI.Can someone post the codes here?Thanks!

    hi all,anyone knows how to prompt user to enter
    password and validate the password as well?I do not
    need the GUI.Can someone post the codes here?Thanks!Codes are
    BufferedReader
    System.in
    if
    else
    System.out.

  • Using my macbook pro whole day with the power adapter , will it affect my battery? Please help

    Using my macbook pro whole day with the power adapter , will it affect my battery? Please help

    It doesn't affect the battery. You can use your MacBook Pro plugged in all the time without damaging the battery. You only have to be sure that you unplug it and run a battery cycle (drain the battery without letting the Mac turn off and charge it fully) at least once a month to keep the battery life.
    If you want more information about your battery > http://www.apple.com/batteries/notebooks.html

  • How to use lsmw and load cin details of the customer

    hi,
    how to use lsmw and load CIN details of the customer master data as the CIN DETAILS are not visible under XD01.
    thanx in advance
    regards,
    balajit

    i got the solution

  • HT204350 Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?

    Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?

    You can get a thunderbolt to firewire adapter. You can then get a firewire 400 to 800 cable and put the old computer in target mode. Then you can follow these instructions.
    http://support.apple.com/kb/HT4889
    Choose migrate from other disk or volume.

  • How to use "Set Enterprise Call Info" step in the script ?

    Hi all
    Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
    Does anyone has any example script with the same (a complete example script) ?

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

  • I have a iphone5. I went to dubai there it was working properly. On my way back in the plane i turned the manual time zone selection in the date

    I have a iphone5. I went to dubai there it was working properly. On my way back in the plane i turned the manual time zone selection in the date & time setting and changed it to new delhi. when i landed back and tried to use the vodafone network whose sim is installe in te mobile NO SERVICE showed up. I tried to select the time zone & network selection from the carrier but manual selection is not accepted . I got a tiick mark at the service provider name but still no service status remains. After 2 days In the time zone automatic selection has started working and is showing new delhi but still automatic & manual network selection is not working. NO SERVICE is still shown . I m not able to make any calls. Internet through WIFI is working. Kindly help. 

    Hello, swatiy.82. 
    Thank you for visiting Apple Support Communities.
    I would recommend trying the steps in the article below when experiencing this issue.
    iPhone: Troubleshooting No Service
    http://support.apple.com/kb/ts4429
    Cheers,
    Jason H.

  • HT4600 So. The manual indicates I can set the LED to flash on activity.

    Running MountainLion
    I have a first generation Time Capsule, which long ago I set the LED to flash on activity. I happen to like that setting. Alot. Lets me visually diagnose that our broadband connection has croaked (again). I just bought a 4th generation Time Capsule. The manual indicates I can set the LED to flashing, and obviously, once upon a time I knew how. I check the base station pane, where I am supposed to be able to set this. AND THERE IS NO FREAKING OPTION TO SET BLINKING. Sorry. Frustrated here.
    Checked with both 6.1 and 5.6 versions of the airport utility.
    So. Are the manuals full of excrement, or did Apple mess up and remove a function many of us really, really, really liked?

    I have no issues..
    If you are running 5.6 utility in ML.. go to manual setup and airport settings.. still works fine.
    Click on options
    If you do not have the option even in 5.6 utility, downgrade the firmware on the TC to 7.5.2
    Then it should work.

Maybe you are looking for