How to set a date range for date field ?

Dear Experts,
Scenario:
I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM  DATE (BEGDA).
Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM  DATE (BEGDA) and less than HIRING DATE.
Technical Requirement:
How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
Following is the code to describe date field in my application.
    <htmlb:inputField id= "ENDDA_NEW_IN"
                      type= "date"
                doValidate= "TRUE"
                  showHelp= "TRUE"
                  disabled= "FALSE"
                     width= "183"
                     style= "cssTextAreadate"
                     value= "<%='99991231'%>"/>
Thanks a lot in advance for your assistance and help.
Cibinu2026
Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AM

Hi,
This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
Regards,
<p>Blair Wheadon</p>
<p>Product Manager, Crystal Reports</p>

Similar Messages

  • HOW TO  SET A DEAFULT  VALUE  FOR A FIELD?

    hi friends
      i have doubt..how to  set a default  value for a field..say  like in  local printer field i always want  lp01 to  be displayed defaultly..when i  click  F1  in that  field i  get the parameter id ..i  know there is something  dealt with that  parameter id..how can i  set that  default value ..in the case of the default  printer value i made in  own data settings as lp01 but  how to  do it  normally  for other  field which has parameter id ??????
    thanks and regards
    prince

    Hi Prince,
    u can set the default value in abap as given below
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : S_BUKRS TYPE BSID-BUKRS OBLIGATORY DEFAULT '1000'.
    PARAMETERS : S_BELNR TYPE BELNR_D OBLIGATORY DEFAULT '1600000070'.
    PARAMETERS : S_GJAHR TYPE GJAHR OBLIGATORY DEFAULT '2008'.
    PARAMETERS : ASON TYPE BUDAT OBLIGATORY DEFAULT SY-DATUM.
    PARAMETERS : S_KUNNR TYPE KUNNR MODIF ID GP1.
    PARAMETERS : S_LIFNR TYPE LIFNR MODIF ID GP2.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN : END OF BLOCK B1.
    or
    u can give the default value in INITIALIZATION also.
    vlue = '1000'.

  • How to set a default value for particular field in SRM PO Portal

    Dear Gurus,
    Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
    My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
    I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
    Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
    Thanks in advance...
    Regards,
    Sathish

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • How to set a new value for formula field in crystal reports xi?

    <p>How to set a new value for formula field in crystal reports xi?</p><p>//formula</p><p>{@description}</p><p> </p><p>exemplo in VB6</p><p>crxSubreport.FormulaFields.Item(1).Text =  "&#39;Subreport Formula&#39;"  or</p><p>crxSubreport.FormulaFields.Item("description").Text =  "&#39;Subreport Formula&#39;"</p><p>How to in JRC?</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • HOW TO set the input range for analog in (DAQ)?

    How can I set the input range of a - NI DAQ USB 6259 - analog voltage input?
    I wish to control it directly in my VI. Is it possible to set different ranges for different input channels?
    Thank you,
    Roberto

    duplicate post

  • How to set a dynamic variant for date in select-options in the upper field

    Hi  Variant experts Good Evening!
           I have the following problem while setting up a dynamic varinat .
    Ex: select-options: dat for sy-datum.  
    I am able to save the lower limit as a dynamic value but not able to save the upper values as dynamic in the select-options. Could any of you please help me in this.
    Regards
    Ravi.

    i hope dynamic variant concept is not there,
    but u can use the fn module DYPRO_GET_VALUES  and
    DYNPRO_SET_VALUES
    DYNPRO_GET_VALUES gets the values in the screen,
    DYNPRO_SET VALUES sets the values.
    first get the values, compare and set the values as u want

  • How to set the time interval for data obtain through labview via write measureme

    I'm need to programme to obtain data from oscilloscope. Currently my laptop able to communicate with Agilent DSO6014A oscilloscope via USB. I'm include the write measurement in mty program and save the data in .lvm file. But the time interval in the data are too small which is in micron seconds. Is there a way to modify the interval values?

    The attached file is the capture of my diagram. Thanks.
    Attachments:
    Capture.PNG ‏56 KB

  • How can I set a date range for a Date/Time Field in LiveCycle ES2?

    I need to set a specific date range for a form set up in LiveCycle ES2. Cannot see where i allows me to do that without a code entered.

    Hi,
    You can't set a start and end date for the date/time field, the best you can do is validate the range after the user has selected it.
    An alternate is to make your own date / time field, like this sample http://adobelivecycledesignercookbookbybr001.blogspot.com.au/2013/05/an-alternative-date-p icker-for.html
    Regards
    Bruce

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • Date range for key date in hierarchy

    Dear Friends,
    Is there a work around for single key date restriction for time dependent hierarchy.Bcos i can only select one key date in teh report for my hierarchy so that it will take that hierarchy which falls in this date and display the result accordingly.
    But is there a way to select the date range for key date so that more than one hierarchy can be used to display my report accrding to the time range.
    Say,i have 4 hierarchies (time dependent) like v1,v2,v3,v4 and v5 for jan 08,feb 08,mar 08,apr 08 & may 08 respectively.
    In my report,i want to display the result for the time interval say mar to May.
    So my report should diplay the result according to the 3 different hierarchies for the time period i.e.v3,v4&v5.
    How do i acheive this.
    Thanks.
    ragu

    Hi
    I think we may do with the Char with text with replecement path.
    take time char as Calmonth and set the offet value as -1 and -2 and design the report and use the hierarchies in that query.
    Am not surt it willwork but better to try with this.

  • Date Range for a fixed fiscal year

    Dear All,
    How to write a code to fix the date range for 12months only. Example like mine selection should be between one fiscal year only.
    I have check that the date is of one year range like 1.05.2008 to 30.04.2009
    month bt 05 & 04 for one particular year. how to write the code.

    hi,
    check for the year like this.
      if v_date1(4) EQ v_date2(4).
      endif.
    this will check for the first 4 characters of the date string which is the year.
    regards,
    Peter

  • In Transaction code va41 how to set default sales contract start date

    Hi ,
    In Transaction code " VA41 "  how to set default sales contract start date and end date.
    Can any one tell me the correct user exit for the same.
    Thanks
    Basu

    hi,
    u have to use user exits  or badis.
    use sutable exits mentioned below.
    SDTRM001  Reschedule schedule lines without a new ATP check          
    SDVFX006  User exit: Tax line (transfer to accounting)               
    V45A0001  Determine alternative materials for product selection      
    V45A0002  Predefine sold-to party in sales document                  
    V45A0003  Collector for customer function modulpool MV45A            
    V45A0004  Copy packing proposal                                      
    V45E0001  Update the purchase order from the sales order             
    V45E0002  Data transfer in procurement elements (PRreq., assembly)   
    V45L0001  SD component supplier processing (customer enhancements)   
    V45P0001  SD customer function for cross-company code sales          
    V45S0001  Update sales document from configuration                   
    V45S0003  MRP-relevance for incomplete configuration                 
    V45S0004  Effectivity type in sales order                            
    V45W0001  SD Service Management: Forward Contract Data to Item       
    V46H0001  SD Customer functions for resource-related billing         
    V60F0001  SD Billing plan (customer enhancement) diff. to billing plan
    Edited by: katigiri linganna on Apr 28, 2009 12:19 PM

  • EasyDMS - search by date range for characteristics of type date

    Hi Folks,
    I have a characteristic of type date in the additional data of a DMS document. If I enter the date (for example validity date) as 08/31/2009 and search using cv04n and give a date range for the characteristic (i.e. 01/01/2009 - 12/31/2009), the search result will bring up the document.
    However, I cannot do this from the EasyDMS find function. I need to specify an exact date. This is not very helpful for user who need to find documents with a validity date between 01/01/2009 - 12/31/2009 for example. Is there a way users can search for date range in EasyDMS find function?
    Thanks,
    Lashan

    To search a date range with EasyDMS Client you have to set the registry key
    \HKEY_CURRENT_USER\Software\SAP\EasyDms\Generel\DateSearchPick to Value 0
    Then you can use the input field like in SAP-Gui. (01.01.2009-31.01.2009)
    If you set the value to 1 or the key is not defined you can only search for one specified date.
    If you don't find this key on your PC create it as dword.
    Maybe you must restart you PC for takeing effect.
    Hope this will help you.
    Regards Wolfgang

  • How to set the timezone in a DATE datetype?

    How to set the timezone in a DATE datetype?
    Thanks
    Maximus

    10.5 Date, Time, and Timestamp
    The JDBC API follows the Java platform's approach of representing dates and times as a millisecond value relative to January 1, 1970 00:00:00 GMT. Since most databases don't support the notion of a time zone, the JDBC 2.0 API adds new methods to allow a JDBC driver to get/set Date, Time, and Timestamp values for a particular time zone using a Calendar. For example,
    ResultSet rs;
    Date date1 = rs.getDate(1);
    returns a Date object that wraps a millisecond value which denotes a particular date, like January 3, 1999, and a normalized time 00:00:00 in the default time zone. The time component of the Date is set to zero in the default time zone since SQL DATE values don't have a time component. Since a Calendar was not supplied explicitly to getDate() , the default time zone (really the default Calendar) is used by the JDBC driver internally to create the appropriate millisecond value assuming that the underlying database doesn't store time zone information.
    The following example retrieves a date value in GMT-Greenwich Mean Time.
    ResultSet rs;
    TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
    Calendar cal = Calendar.getInstance();
    Date date2 = rs.getDate(1, cal);
    In the example above, a Calendar is passed explicitly to getDate() to inform the JDBC driver how to calculate the appropriate millisecond value. Note that the same result could have been achieved by simply changing the default time zone, and not passing the Calendar explicitly since the JDBC driver will use the default time zone by default.
    Note that the two Date objects created above will not compare as equal assuming that the default time zone is not GMT, even if they represent the `same' date.
    if (date1.equals(date2))
    //never get here
    This is because each Java language Date object really just wraps a normalized millisecond time value and these millisecond values will differ across time zones. If an application wishes to compare dates in different time zones it should first convert them to a Calendar.
    An application should create a Date object using a Calendar. The application is responsible for specifying the time as 00:00:00 on the desired date when using the Calendar since JDBC uses this convention. In addition when creating a Time value the application must specify a date of January 1, 1970 to the Calendar used to create the millisecond value for the Time as this is the convention specified by JDBC for time.
    Above from:
    http://java.sun.com/products//jdk/1.2/docs/guide/jdbc/spec2/jdbc2.0.frame10.html
    I hope it can help you!

  • Find date range for sick leaves

    Hi,
    Ive been trying to get readable output from HR system.
    I have added the source data into Data Model, since i had to read the data with power query. Now i have pivot table like this:
    date        workdaY?    user
    6.3.2014    Sickleave    user1
    1.2.2014    Sickleave    user2
    2.2.2014    Sickleave    user2
    5.3.2014    Sickleave    user4
    5.3.2014    Sickleave    user1
    5.5.2014    Sickleave    user1
    16.9.2014  Sickleave    user3
    7.3.2014    Sickleave    user1
    6.5.2014    Sickleave    user1
    6.3.2014    Sickleave    user4
    Is there any possible way to get some kind of find function to sort and combine the data like this:
    user1        Sickleave    5.3-7.3.2014
    user1        Sickleave    5.5-6.5.2014
    user2        Sickleave    1.2-2.2.2014
    user3        Sickleave    16.9-16.9.2014
    user4        Sickleave    5.3-6.3.2014

    One way to do this is with a VBA macro.  The following should get you started.
    As you can see looking at the macro, the original data is assumed to be on a worksheet named HRData and starts in A1.
    The results are placed on the same worksheet but starting at cell G1.  You could easily write the results to another worksheet.
    The original data is copied to a temporary worksheet for sorting (and the temporary sheet is subsequently deleted).
    A Class Module is added so we can use a User Defined Object which has the properties of the user name, start date and end date of the vacation period.
    We then cycle through the sorted data, and create a Sickleave object and add it to a collection.  If the "previous" row has the same user, and the date is one more than the previous End Date, we add one to the previous end date; if not, we
    create a new object and start another sickleave period.
    This is the data input:
    and  here are the results:
    To enter this Macro (Sub), <alt-F11> opens the Visual Basic Editor.
    Ensure your project is highlighted in the Project Explorer window.
    First, from the top menu, select Insert/Class Module.  Highlight the new class module in the Project Explorer; click F4, and rename it to cSickLeave
    Then paste the code below into that class module:
    =======================================
    Option Explicit
    Private pUser As String
    Private pStartDt As Date
    Private pEndDt As Date
    Public Property Get User() As String
    User = pUser
    End Property
    Public Property Let User(Value As String)
    pUser = Value
    End Property
    Public Property Get StartDt() As Date
    StartDt = pStartDt
    End Property
    Public Property Let StartDt(Value As Date)
    pStartDt = Value
    End Property
    Public Property Get EndDt() As Date
    EndDt = pEndDt
    End Property
    Public Property Let EndDt(Value As Date)
    pEndDt = Value
    End Property
    Then, from the top menu, select Insert/Module and
    paste the code below into the regular module window that opens.
    To use this Macro (Sub), <alt-F8> opens the macro dialog box. Select the macro by name, and <RUN>.
    ====================================
    Option Explicit
    Option Compare Text
    Sub SickLeave()
    Dim cSL As cSickLeave, colSL As Collection
    Dim wsSrc As Worksheet, wsRes As Worksheet
    Dim wsTemp As Worksheet, rTemp As Range
    Dim vSrc As Variant, rSrc As Range
    Dim vRes() As Variant, rRes As Range
    Dim I As Long
    'set Worksheets
    Set wsSrc = Worksheets("HRData")
    With wsSrc
    Set rSrc = .Range("A1", .Cells(.Rows.Count, "C").End(xlUp))
    End With
    Set wsRes = Worksheets("HRData")
    Set rRes = wsRes.Range("G1") 'upper left cell of results
    'Sort the HRdata on a Temp sheet
    Worksheets.Add
    Set wsTemp = ActiveSheet
    Set rTemp = wsTemp.Range("A1")
    rSrc.Copy rTemp
    Set rTemp = rTemp.CurrentRegion
    With rTemp
    .Sort key1:=.Columns(3), order1:=xlAscending, _
    key2:=.Columns(1), order2:=xlAscending, _
    Header:=xlYes, MatchCase:=False
    End With
    vSrc = rTemp.Value
    With Application
    .ScreenUpdating = False
    .DisplayAlerts = False
    wsTemp.Delete
    .DisplayAlerts = True
    End With
    'create collection for results
    Set colSL = New Collection
    For I = 2 To UBound(vSrc)
    If vSrc(I, 2) = "Sickleave" Then
    If I = 2 Then
    Set cSL = New cSickLeave
    With cSL
    .User = vSrc(I, 3)
    .StartDt = vSrc(I, 1)
    .EndDt = vSrc(I, 1)
    colSL.Add cSL
    End With
    ElseIf vSrc(I, 3) = colSL(colSL.Count).User And _
    (vSrc(I, 1) - 1) = colSL(colSL.Count).EndDt Then
    With colSL(colSL.Count)
    .EndDt = .EndDt + 1
    End With
    Else
    Set cSL = New cSickLeave
    With cSL
    .User = vSrc(I, 3)
    .StartDt = vSrc(I, 1)
    .EndDt = vSrc(I, 1)
    colSL.Add cSL
    End With
    End If
    End If
    Next I
    ReDim vRes(0 To colSL.Count, 1 To 3)
    vRes(0, 1) = "User"
    vRes(0, 2) = "workdaY?"
    vRes(0, 3) = "Date Range"
    For I = 1 To colSL.Count
    With colSL(I)
    vRes(I, 1) = .User
    vRes(I, 2) = "Sickleave"
    vRes(I, 3) = Format(.StartDt, "d.m\-") & _
    Format(.EndDt, "d.m.yyyy")
    End With
    Next I
    Set rRes = rRes.Resize(UBound(vRes) + 1, UBound(vRes, 2))
    With rRes
    .EntireColumn.Clear
    .Value = vRes
    .EntireColumn.AutoFit
    .Rows(1).HorizontalAlignment = xlCenter
    End With
    Application.ScreenUpdating = True
    End Sub
    Ron

Maybe you are looking for

  • Redirect Blog to Wordpress

    I would like to use my .MAC and iWeb 08 for my Web site; however, I needed added blogging functionality. Can you help me redirect my blog tab to my Wordpress blog? THANKS! Deirdre

  • Internet & BB Services

    New Blackberry owner here Bought a Curve 3G from Amazon unlocked and then a Tesco SIM contract with a data but have since had confirmation from Tesco that this SIM contract does not support BB services so I need to upgrade by another £5 a month.  Not

  • Swf preload in dreamweaver?

    hi all, i'm creating a website using dreamweaver. and i would like to insert a preload before the main website comes up. can i put a preload made in flash before entering the main website made in dreamweaver? thanks a lot for your help! Cheers, SLLIM

  • I-phone 5 crashed durning software update.  Now won't accept backup password.

    Just tried to update software on i-phone 5.  A backup was made.  Something crashed durning update and my only option to move forward was to restore the phone to the original settings.  Now it won't accept my password to reload the backup; however, th

  • BAPI for FB60

    Hi all, I need to park a document using FB60 tansaction. I need to use BAPI to do the job. Which BAPI can i use to park the document? When the document is park, how do i know the status? Which database table stored the information that is pass via BA