Textfield for date input

Hello,
I would like to have a textfield so that the user can enter a date value in the form 21-Jan-2004 (only input that matches this pattern should be allowed). I know how to do this with a JSpinner but I need to do it with some kind of textfiled.
Questions:
(1) How can I achieve this?
(2) How do I get the date into a date/calendar object? Do I have to parse the string manually and set the corresponding date/calendar values individually or is there some kind of document/model that returns a date/calendar object?
Greetings,
--Alex

Hi,
haven't done this before myself, but have a look at JFormattedTextField. The API gives some hints how to use it. Think it could be what you looking for.
Michael

Similar Messages

  • Tree-control for data input?

    Hi,
    I need to program an input screen for values that have hierarchical dependencies (e.g. sums). I feel, the most adequate user-interface would be a tree control, because of the data dependencies and also because the users asked for a possibility to collapse/expand parts of the data during input.
    I had a look at CL_GUI_COLUMN_TREE, but I'm not sure, if it can be used for data input. Has anyone done something like this before or can anybody direct me to some additional sample coding? (the sample coding in the reuse library didn't do it...)
    Thanks for your help, greetings, Kathrin!

    Hello Kathrin,
    Since you say that the user's input is hierarchical in nature, it is nice to have a tree-control for input. But, the choice of using a custom-control-version of the tree is a cause for some concern. I cannot recollect any of the SAP screens where the input can be given through such a tree framework (please do let me know if you have come across one). The problem with such a tree would be in the areas of even-handling. Filling the tree with appropriate data at the right times would be another challenge.
    However, there's one alternative that I would like to direct your attention to. You must have observed another kind of tree, when you select an application component from the APPLICATION HIERARCHY, which is just like a list. Also, the <i>Transport Organizer (SE09)</i>, <i>Menu Painter (SE41)</i> etc., have this kind of a tree. You can use this if you (or rather your users) are very particular on having a tree display. For more information, you can see the Function Group <b>SEUT</b>, which has the required function modules to accomplish the same. The Function Group is well documented, and you might have to work a little on the function modules themselves.
    Please do let me know if this is a suitable option to meet your requirement. All the best,
    Regards,
    Anand Mandalika.

  • Why Excel insert cell block, hasn't input for data input?

    Hi
    I found a block for insert new row in excel, but there is no input for data input. how should I insert data by this block to excel file? can you help me?
    that block name: Excel insert cells
    in report generator toolkit
    Best Reagards

    behzad1 a écrit :
    I could work with  Excel insert cell block, but when I want add new data to an old row continuation, last row shift downward! while I want add data to old row. anyone can help me?
    Nobody will be able to identify the problem without seeing your code. Excel Insert Cells.vi is used to add cells to an existing spreadsheet, not to set the cell value. To do this is a more specific way than the Append Report Text.vi you can use Excel Easy Text.vi or Excel Insert Table.vi. With these vis you can specify the range where you want to insert something.
    For your other question (Two different data types) you can use the Excel Set Cell Format.vi to format a range as a date or something else. You will need to use the Excel format specifiers for this.
    Ben64

  • Combine year + period as one dimension for data input

    Existing Hyperion Planning has 2 dimension to keep the year and period. Our users would like to have the data entry web form title to show the year+period e.g. Jan 2009 instead of two rows. Is it very difficult to build such a label or a dimension for data input?
    Thanks in advance.

    Jake_Turrell wrote:
    You could do this with custom JavaScript, although I have to say the work would outweigh the benefits.
    Why is it important that they see the year and month with a specific layout on a web input form? Are they printing the form, or using it as a "report"? If so, I would direct them to Financial Reporting, where it is much easier to format labels, etc. Forms shouldn't be used as reports as a general rule.
    - JakeI am referring to the web form. Because there are 12 months in a year and they need to input more than 10 years budget, the label on the web form is not easy to view from our end user point of view. They say that sometimes they will input data in the wrong year. So they prefer to the column label as Jan2009, Feb2009, etc instead.
    Thanks for your help.

  • Open/close line for data input depending on characteristic value

    Hi,
    assume we have an input ready query linked to an analysis item.
    material qty
    1            100
    2              50
    3              70
    How can we achieve that only the line 2  is open for data input by the user
    and the other lines 1/3 are closed.
    Regards
    Paul

    Hi,
    You can use data slice for this. Activate the data slice for sl no 1 and 3  and the appln will not allow you to enter for these records.
    Data slice can be made dynamic to activate/deactive as per your requirement.
    pratyush

  • Developed VI for data input from a Serial RS485 S. Himmelstein 700 Series Signal Conditioner

    Has any one developed a VI for data input from a serial RS485 connection with S. Himmelstein 700 series signal conditioner. Multiple displays and channels. Labview 2009

    Hi 
    I am using the same vi which you have suggested and i have selected proper com port and other settings, but i am not getting any data,but if i send "ADC0" and "*IDN?\n" command alternatively then it is giving the data...but if i do that i will get zero and data alternatively.I want to get data without zero in between.. any solutions on why i have to send *IDN?\n?
    Expand.Evolve.Influence
    Attachments:
    Hammltn.jpg ‏91 KB

  • Using ALV Grid for data Input

    Hi experts.
    Can someone assist me with information on using ALV grid for data input. Please give a simple example if possible.
    I am mainly interested in the part in which we can transfer data from the grid changing the internal table's data.

    Try this code:
    REPORT z_demo_alv_jg.
    TYPE-POOLS                                                          *
    TYPE-POOLS: slis.
    INTERNAL TABLES/WORK AREAS/VARIABLES                                *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.
    FIELD-SYMBOLS                                                       *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.
    SELECTION SCREEN                                                    *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.
    START-OF-SELECTION                                                  *
    START-OF-SELECTION.
    Storing table name
      p_table = tabname.
    Create internal table dynamically with the stucture of table name
    entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
        LEAVE TO LIST-PROCESSING.
      ENDIF.
    Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.
      SORT i_fieldcat BY col_pos.
    Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.
      REFRESH <dyn_tab_temp>.
    Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    *&      Form  SET_PF_STATUS
          Setting custom PF-Status
         -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'Z_STANDARD'.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  user_command
          Handling custom function codes
         -->R_UCOMM      Function code value
         -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.
    Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.
      CASE r_ucomm.
      When a record is selected
        WHEN '&IC1'.
        Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.
          IF sy-subrc = 0.
          Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
          Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.
            Make all the fields input enabled except key fields*
              w_field-input = 'X'.
              MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.
            ENDIF.
          Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.
            IF sy-subrc = 0.
            Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
            If the record is changed then track its index no.
            and populate it in an internal table for future
            action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.
          ENDIF.
      When save button is pressed
        WHEN 'SAVE'.
        Sort the index table
          SORT i_index.
        Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.
          LOOP AT i_index.
          Find out the changes in the internal table
          and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.
          ENDLOOP.
        Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.
          IF sy-subrc = 0.
          Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
            REFRESH <dyn_tab_temp>.
          Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.
          ENDIF.
      ENDCASE.
      rs_selfield-refresh = 'X'.
    ENDFORM.                    "user_command

  • Flash Interface for Data Input - Good Examples?!

    Hello,
    I’m interested in locating samples of how a Flash graphic interface can be used as a way to more effectively engage users for inputting data collection - in contrast to a less engaging data collection form. 
    Please let me know any examples you may know and if possible attach links to samples if available.
    Thanks!

    Hello Kathrin,
    Since you say that the user's input is hierarchical in nature, it is nice to have a tree-control for input. But, the choice of using a custom-control-version of the tree is a cause for some concern. I cannot recollect any of the SAP screens where the input can be given through such a tree framework (please do let me know if you have come across one). The problem with such a tree would be in the areas of even-handling. Filling the tree with appropriate data at the right times would be another challenge.
    However, there's one alternative that I would like to direct your attention to. You must have observed another kind of tree, when you select an application component from the APPLICATION HIERARCHY, which is just like a list. Also, the <i>Transport Organizer (SE09)</i>, <i>Menu Painter (SE41)</i> etc., have this kind of a tree. You can use this if you (or rather your users) are very particular on having a tree display. For more information, you can see the Function Group <b>SEUT</b>, which has the required function modules to accomplish the same. The Function Group is well documented, and you might have to work a little on the function modules themselves.
    Please do let me know if this is a suitable option to meet your requirement. All the best,
    Regards,
    Anand Mandalika.

  • What is the proper SQL syntax for dates input as variable

    Hello,
    I am working on an ASP JavaScript page that requests totals
    from an Access database for a specific date range. I can write the
    SQL statement to query the DB and get the results I need using the
    WHERE statement below.
    ...WHERE LABOR_DATE BETWEEN #7/15/2006# AND #7/18/2006# GROUP
    BY [LABOR].[JOB_NUMBER_NAME]
    I have another page that I want to pass two variables in
    Dreamweaver specifying the date range varBeginDate and varEndDate
    and query the database using the date range input by the user.
    What is the correct syntax for replacing the actual dates in
    the example above with my variable values?

    Short answer - you can't. There's no automatic link between file paths and mounting servers. There are lots of valid reasons for this (e.g. preventing malicious links from automatically opening files from remote servers), but you can get there in a controlled environment.
    You can configure Automounts on any directory. That way whenever any application tries to access a particular path the OS will automatically mount the directory, but it needs to be told in advance which directories (and which servers) to mount.
    For example, if you'd configured your iTunes Library to be saved at /mnt/itunes and it's served from afp://mediaserver.your.net/path/to/itunes you would configure an automount to mount the AFP server at /mnt/itunes.
    Since its an automount, the OS wouldn't mount the server until some process tried to read /mnt/itunes.
    There are several ways of specifying automounts, and for each there are several tutorials online that walk you through the process. Try Mike Bombich's site for a starter.

  • Query for data input into IncoCube (Non Integrated Planning)

    Hello Gurus,
    i was trying to search over the internet how to make a query ready for input, but without using integrated planning, but no luck.
    I want to make a bex query (specific form) which could be filled with data by simple user, and then on button click sent to BW InfoCube.
    Is it at all possible or not?
    Thanks and Regards

    Hi,
    Thanks for quick responce.
    So basically what you are saying is that only IP anables me to enter the data through BEX.
    Regards
    Laurynas

  • Formatt textfield for time input

    I have a form for inputing a event schedule and would like to
    have the start and finish time textfields be formatted with a ":"
    character to accept the time in the proper format I amusing ASP VBS
    and would like to find a input mask to make the input easier for
    the users like this 09:45 PM

    Hi,
    haven't done this before myself, but have a look at JFormattedTextField. The API gives some hints how to use it. Think it could be what you looking for.
    Michael

  • Dropdown field - when certain entries are selected make another field unavailable for data input

    Hi All,
    Sorry one again I am very new to forms and have another question. I have a dropdown list which when selecting certain values I need another field to be unavailable so the user can't enter data.
    Hope this example makes sense:
    DropDown
    Field %
    Outer
    Not Allowed to enter data
    Back
    Not Allowed to enter data
    Inner
    Not Allowed to enter data
    Cotton
    Allowed to enter data
    Wool
    Allowed to enter data
    If someone could give me some examples that would be a great help.
    Many Thanks
    Adam Sadler

    Here's a script that you can use for the custom Validate script of the dropdown. It resets the value of the corresponding text field whenever a change is made to the dropdown. You can get rid of the line that does this if you don't want this to happen. Change "text1" in the code to match the name of the text field you're using.
    // Custom Validate script for dropdown
    (function () {
        // Get the selected value
        var v = event.value;
        // Set up an object to associate read-only status of text field with items
        var f_state = {
            "Outer": true,
            "Back": true,
            "Inner": true,
            "Cotton": false,
            "Wool": false
        // Get a reference to the text field
        var f = getField("text1");
        // Clear the text field
        f.value = "";
        // Set the read-only status of the text field based on what's selected
        if (v in f_state) {
            f.readonly = f_state[v];

  • Cjr2 - protect AND unprotect fields in planning layout1-701 for data input

    Where can I configure the field status of a field in teh planning WBS layout 1-702 (profile SAP ALL) in CJR2.
    I would like to protect and unprotect certain fields for input.

    standard planning layouts are protected. you can not change it. create your own planning profile..
    Or try by Using a transaction variant (SHD0)
    may be you can also try GuiXT settings..
    Please search the forum / internet for more informations.

  • Forms for Data Input

    Hi, my employees are using the form as a way to input data quickly, in order to do this they are using the test form link, is there a faster way to do this instead of having to use a link to the form or the test page?
    Thanks
    Jenn

    Hi Jenn,
    Can you elaborate a bit more?  Why is filling in the form from a URL not fast?  Are you looking to copy/paste data?  Import it from Excel?  If you could, describe a bit more on what your form is, and how you are using it.
    Thanks,
    Todd

  • Txt Fields used for dates input???????

    Evening all - Hope someone can help?
    I've written an website that runs of the back of an Oracle
    database using SQL - its just a simple database and is being done
    for a uni project.
    The problem I'm having is I'm trying to use a form as to
    search through a recordset using mutiple criterias - Thats fine.
    Except when it comes to dates....
    I have created the query :...
    SELECT DVDID, TITLE, GENRE, CERTIFICATE, DIRECTOR, ACTORS,
    RELEASE, BRANCHID
    FROM BUCK.DVD
    WHERE TITLE LIKE '%MMColParam%' AND GENRE LIKE '%VarGenre%'
    AND CERTIFICATE LIKE '%VarCert%' AND DIRECTOR LIKE '%VarDirector%'
    AND ACTORS LIKE '%VarActor%' AND DVDID LIKE '%VarDvdId%' AND
    BRANCHID LIKE '%VarBranchID%'
    ORDER BY DVDID ASC
    This works absolutely fine. What I want to do is add the line
    "AND RELEASE BETWEEN 'VarStart' AND 'VarEnd"
    I set the default values as "05-dec-01" and "05-dec-10"
    (which work fine when typed directly into the sql prompt) but I get
    an error that says:...
    "[oracle][ODBC][ORA]ORA-01858: a non numerical character was
    found where a numerical was expected"
    The datatype in the database is definately date....
    Any ideas>??

    LeighBuckRogers wrote:
    > Evening all - Hope someone can help?
    >
    > I've written an website that runs of the back of an
    Oracle database
    > using SQL - its just a simple database and is being done
    for a uni
    > project.
    >
    > The problem I'm having is I'm trying to use a form as to
    search
    > through a recordset using mutiple criterias - Thats
    fine. Except when
    > it comes to dates....
    >
    > I have created the query :...
    > SELECT DVDID, TITLE, GENRE, CERTIFICATE, DIRECTOR,
    ACTORS, RELEASE,
    > BRANCHID FROM BUCK.DVD
    > WHERE TITLE LIKE '%MMColParam%' AND GENRE LIKE
    '%VarGenre%' AND
    > CERTIFICATE LIKE '%VarCert%' AND DIRECTOR LIKE
    '%VarDirector%' AND
    > ACTORS LIKE '%VarActor%' AND DVDID LIKE '%VarDvdId%' AND
    BRANCHID
    > LIKE '%VarBranchID%' ORDER BY DVDID ASC
    >
    > This works absolutely fine. What I want to do is add the
    line "AND
    > RELEASE BETWEEN 'VarStart' AND 'VarEnd"
    >
    > I set the default values as "05-dec-01" and "05-dec-10"
    (which work
    > fine when typed directly into the sql prompt) but I get
    an error that
    > says:... "[oracle][ODBC][ORA]ORA-01858: a non numerical
    character
    > was found where a numerical was expected"
    >
    > The datatype in the database is definately date....
    >
    > Any ideas>??
    Wrong date format possibly? ie: use the US version 12/01/01
    Buzby
    There's nothing more dangerous than a resourceful idiot

Maybe you are looking for

  • Risk Analysis in GRC 10.0

    Dear Experts, I have configured RAR in GRC 10.0. Sync jobs are successful. Batch risk analysis is sucessful. But when I tried to run a User/Role risk analysis I am not getting any result. I am not sure whether system has run risk analysis or not but

  • P2 to DV = owie!

    ok, here's my dillema; I recently got some footage to cut, from the new panasonic P2 camera. It was shot 960x720 (16:9 HD) @ 59.94 fps, I am now trying to output this for someone else to a DV deck using a firwire link. The problem is that it doesn't

  • Change the SLD adress in Integration Directory

    Hello, When I launch the SLD from the integration directory page I get an error and the host adress is not right. Could you please show me how to change the host adress of the sld. In order to access the integration directory page go to: http://<host

  • I can't print(i use macbook air) pls help

    my printer is hp deskjet f4280 model, when i connect to printer, it shows connect status but when i press print to perforn my task it never print out.

  • Rename the WIP folder

    Is it possible to rename the Work In Progress folder globally? The Hungarian translation of this folder is called "Folyamatban", but there is a better translation called "Piszkozatok". I know, that there is no option in the client to rename, maybe th