[b]How can I get User Input ..? [/b]

hi,
My question is how can I get get the user to "input a string" and then store it in a variable.
I tried the foll but it didn't work:
String EmpName;
System.in.read(EmpName);
Thanx...

BufferedReader buff = new BufferedReader(new InputStreamReader (System.in));
String userInput = buff.readLine();

Similar Messages

  • How can i read user input value to my User exist

    Hi Guru's,
    I am facing one problem in Variables in BPS.
    I am calculating days from Month/year .I have one variable it is for Days,Second variable it is for Month/Year.
    First variable is user exist (for calculating the days),Second varible is user defined variable(this is a Input to the first variable).
    When i am giving the Month/Year(02/2008)variable i am getting the 29 days from the first variable.again i am changing the value of Month/Yera(03/2008) i am not getting the desired value.
    my doubt is my user exist not able to read current value of variable(month/year).how can i pass my value to user exist because this value is user input value based on this value i am calculating the days and dynamically displaying the layout.
    Here is the my sample code..
    seq = '0000'.
    ind = 0.
       i_area = 'ZTEST1'.
       area_var = 'ZVar2'.
    PERFORM instantiate_object USING    i_area
                                        area_var
                                 CHANGING lsr_var.
    PERFORM get_current_value_of_variable
                            USING lsr_var
                            CHANGING lto_value.
    READ TABLE lto_value INTO lso_value index 1  .
    i_month = lso_value-low.
    iv_month = i_month+4(2).
    iv_year = i_month(4).
    concatenate iv_year iv_month '01' into iv_date.
    begindate = iv_date.
    below bracket code calculating the leap year
    ( IF iv_date+4(2) = lc_feb.
        lv_hlp_date_year = iv_date+0(4).
        lv_hlp_rest      = lv_hlp_date_year MOD 4.
        IF lv_hlp_rest = 0.
          EV_DAYS = lc_days_29.
          lv_hlp_rest = lv_hlp_date_year MOD 100.
          IF lv_hlp_rest = 0.
            lv_hlp_rest = lv_hlp_date_year MOD 400.
            IF lv_hlp_rest NE 0.
              EV_DAYS = lc_days_28.
            ENDIF.
          ENDIF.
        ELSE.
          EV_DAYS = lc_days_28.
        ENDIF.)
      ELSE.
    below bracket code calculating the days
    (   CASE iv_date+4(2).
          WHEN lc_jan. EV_DAYS = lc_days_31.
          WHEN lc_mar. EV_DAYS = lc_days_31.
          WHEN lc_may. EV_DAYS = lc_days_31.
          WHEN lc_jul. EV_DAYS = lc_days_31.
          WHEN lc_aug. EV_DAYS = lc_days_31.
          WHEN lc_oct. EV_DAYS = lc_days_31.
          WHEN lc_dec. EV_DAYS = lc_days_31.
          WHEN lc_apr. EV_DAYS = lc_days_30.
          WHEN lc_jun. EV_DAYS = lc_days_30.
          WHEN lc_sep. EV_DAYS = lc_days_30.
          WHEN lc_nov. EV_DAYS = lc_days_30.
          WHEN OTHERS.   CLEAR EV_DAYS.
        ENDCASE.)
      ENDIF.
    data: st_date(2) type c.
    st_date = '01'.
    ind = 0.
    ind = ind + 1.
    here i am passing the low value and high value.
    yto_charsel-chanm = '0CALDAY'.
    yto_charsel-seqno = 1.
    yto_charsel-sign  = 'I'.
    yto_charsel-opt   = 'EQ'.
    yto_charsel-LOW = st_date.
    yto_charsel-chanm = '0CALDAY'.
    yto_charsel-seqno = 1.
    yto_charsel-sign  = 'I'.
    yto_charsel-opt   = 'BT'.
    yto_charsel-high = ev_days.
    INSERT yto_charsel INTO sto_charsel INDEX ind.
    ETO_CHARSEL = sto_charsel.
    lto_value = sto_charsel.
    How can i pass user input value to read this exist ,some where again i have to write code or else??
    This is very urgent can you help me..

    Hi,
    Instead of two perform statements, use single perform.
    PERFORM get_value USING i_area
                              i_variable
                         CHANGING lw_varsel.
    Take the values from lw_varsel-low.
    FORM statement for this perform is as follows.
    DATA: li_varsel TYPE STANDARD TABLE OF upc_ys_api_varsel,
            lv_varsel TYPE REF TO cl_sem_variable.
      FORM get_value USING p_area TYPE upc_y_area
                           p_variable TYPE upc_y_variable
                     CHANGING
                           p_lw_varsel TYPE upc_ys_api_varsel.
        CALL METHOD cl_sem_variable=>get_instance
          EXPORTING
            i_area       = p_area
            i_variable   = p_variable
             I_CREATE     =
          RECEIVING
            rr_variable  = lv_varsel.
           EXCEPTIONS
             NOT_EXISTING = 1
             others       = 2
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        REFRESH li_varsel.
    ****Getting the Value*********
        CALL METHOD lv_varsel->get_value
          EXPORTING
            i_user     = sy-uname
            i_restrict = 'X'
          RECEIVING
            rto_value  = li_varsel.
        CLEAR : p_lw_varsel.
        READ TABLE li_varsel INTO p_lw_varsel INDEX 1.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
      ENDFORM.                    "get_value
    Try this code.
    Bindu

  • How can I deny user input file name (JFileChooser )

    in a common JFileChooser.
    when user open it, how can it deny user to input in filename field?

    just try this
    JFileChooser chooser = new JFileChooser();
    int option = chooser.showOpenDialog(this);
    if( option == JFileChooser.APPROVE_OPTION) {   }
    change the if little bit to suit yr purpose
    or if not try
    getAccessibleContext() this method may deal the situation
    although i have not tried it......
    i m also trying .........
    the onw who gets it earlier notifies other...
    is it fine
    rgds

  • How can i get user to use my application without logging on as a developer?

    Hi
    Can anyone tell me or point me in the direction of information regarding allowing users to be pointed straight to an application on apex. Curently i log in via the apex.oracle.com home page use my database name then my username and password. But that only gets me in i want to allow user to be able to view and use the applications. How can i do this? Or is this indeeded possible i would assume that it is.
    thanks
    Dan Stead

    Dan,
    Another possibility is that if you host it yourself, or go with one of the production hosting companies then they can help you to configure it so that you can point a DNS name (e.g. www.yourapp.com) to point to your application, so that is all your users would need to enter into their browsers.
    You can find a list of hosting providers here -
    http://wiki.shellprompt.net/bin/view/Apex/HostingExamples
    (in the interests of disclosure, I run one of those companies on the list)

  • How can I get users who accessed the database during last one month

    Hi All,
    How can get the list of users who logged on to the database DBProd and made changes to the tables of particular schema during say last month and current month.
    Thanks & Regards.

    DBA_PRIV_AUDIT_OPTS :-Describes current system privileges being audited across the system and by user and who has updated what can be done through trigger which would send the information to a history table. If you have it ready ask your team..
    SQL> select PRIVILEGE,SUCCESS,FAILURE from DBA_PRIV_AUDIT_OPTS where user_name='SCOTT';
    no rows selected
    SQL> audit ALTER SYSTEM by scott by access whenever not successful;
    Audit succeeded.
    SQL> audit session by scott by access;
    Audit succeeded.
    SQL> select PRIVILEGE,SUCCESS,FAILURE from DBA_PRIV_AUDIT_OPTS where user_name='SCOTT';
    PRIVILEGE SUCCESS FAILURE
    CREATE SESSION BY ACCESS BY ACCESS
    ALTER SYSTEM NOT SET BY ACCESS
    Regards
    Karan
    Edited by: Karan on Aug 2, 2012 7:15 PM

  • OWSM how can i get user credentials from gateway in web service server

    I need username in web service server. Gateway has option like "Insert WSBASIC Credentials" and service definition in gateway has "forwardcredentials" option. how can i use these options? has some any idea or sample code.

    Hi Surya,
    You asked whether there are any other solutions other than JavaBean.
    There are ..
    It is a round about way. But should work good on WEB. This is particular to MS things.
    As you know you can use vb scripting to invoke all of this Ms things on WEB. So the trick is have a dynamic page called with your actual doc name as a parameter. Script and do whatever you want in this Dynamic method. And from within Forms call this Dynamic page using WEB.show_document( remember within Forms I can call any WEB viewable doc ). It should do the job.
    But ( And that is a big but...)..
    You need to take care of lot many things here.
    You must have a app server which would support scripting like VB. And you must have MS OFFICE in the server . I understand this works best with 2000.
    So finally it boils down to what I need and what I have. And Yes It requires a good effort.
    Great going??? :))
    Good Luck
    Vijay

  • How can i get this "input.readline()" in webdynpro

    i wanna get the the return message from a system
    Here is the system.
    When I "telnet XX.XX.XX.XX", it'll return"OK".
    Then "user user" also some info return like "login success".
    With Eclipse these codes are OK.
    out.println("user user");
    out.flush();
    String str = "";
    while ((str = input.readLine()) != null) {
    //now str is "login success"
    //do something...
    But i can get nothing but a "null" str with these codes in NetWeaver Stdio.
    Is there anyone can give me some suggestion?
    Thanks in advance
    Message was edited by:
            fishy yu

    sorry, it's my fault. just because my EP server's ip is limited.

  • How can I get user to enter date & time on a form?

    I have a form where I want the user to enter a date and time for an event. The database field is in MYSQL datetime format
    I've used the datepicker on the form field but it only allows for a date entry not time.(eeven when seetin the width to 22 chars
    I remember doing something before which allowed the user to pick a date and then add the time at the end.
    I've got the date defaulted to dd/mm/yyyy and the time to H:mm in the control panel.
    Can anyone help please or is there a better way to enter date and time?.
    Any help appreciated
    Thanks
    Clive

    Two things:
    The column in your database is defined as DateTime, not Date
    You use the option on the Date Picker to choose datetime, not date
    This will give the user the ability to choose a date and time from the date column.  If you need more control over the time, you probably need to add another column defined as Time.  Then you can use the validation rules to force an entry rather than allowing the default (current time).

  • How can i get user entry values at WAD

    Hi I need some user entry values display at wad?
    suppose i have x( user entry) if i will give x=1000
    on top need to show 1000 values?
    i need user entry boxes at wad level only
    ple let me know

    Hi,
    you have to set the checkbox "Display Variable Screen" in WAD. You can find if under:
    Web Template Parameters->Display Variable Screen
    Regards
    Erwin

  • How can I get User's Manal for Ultiboard in Russian language?

    I need to presrent tthis product at conference in my university, but i couldnt find russian version of user's manual or getting started for ultiboard does it exist?

    Sorry but Ultiboard is only localized in German, Japanese and English. We do not have any Russian translation or localization available. There could maybe be a unofficial translation in the web if you use search engines, but from NI's side we do not have it.
    Nestor
    National Instruments

  • How can i get portal user creation date?

    Hi,
    In my web dynpro java application i must get user creation date.
    How can i get user creation date?
    Thanks.

    user.created()

  • How to capture the User input value to user exist function module.

    Hi,
    How can i capture user input value.Here i am using User exist in BPS variable.
    Calculating days using user exist functin module and my input is another variable i.e user defined value.
    How can i capture user defined vaule into my function module.
    This is very urgent can you help me..
    Thanks....

    Hi!
    You can get the instance using the method get_instance of the class cl_sem_variable, and call the method get_value with the return. Check the example:
          CALL METHOD cl_sem_variable=>get_instance
            EXPORTING
              i_area       = (planning area)
              i_variable   = (variable name)
            RECEIVING
              rr_variable  = lr_var
            EXCEPTIONS
              not_existing = 1
              OTHERS       = 2.
          CHECK sy-subrc IS INITIAL.
          CALL METHOD lr_var->get_value
            RECEIVING
              rto_value = et_value
            EXCEPTIONS
              error     = 1.
    After this, read the first line of the table et_value (it should be the value that the user choose on the screen).
    seeya!
    Robson

  • Can we get user's phone number through coding

    HI, I want to know that, how can we get user's phone number through coding and is it possible to send sms to some number without concerning to user. I required this for developing the mobile tracker application which will detect that the phone is stolen.

    The developer forums are here: http://devforums.apple.com
    Documentation for iOS developers is here: http://developer.apple.com/devcenter/ios/index.action

  • How can i get input from user in Workflows

    Hello professionals,
    I'm new to SAP B1 Workflow, i have created some workflows and they all worked fine.
    But, I am wondering, How can i get input from user?. For example, i want to display list of options to choose between them and route the workflow based on the selected option. I don't want to use the exclusive gateway and check for some conditions, i want to get input from user.
    How can i do that?
    Thanks in advance,
    Kareem Naguib

    Hi,
    Please refer SAP help file:
    http://help.sap.com/saphelp_sbo900/helpdata/en/b8/1f9a1197214254b79bcf8f93f9fff9/content.htm?frameset=/en/44/c4c1cd7ca22…
    Thanks & Regards,
    Nagarajan

  • How to get User input in JTextField?

    How to get User input in JTextField? Can u anyone give me some code samples? thanks

    read the API!!!

Maybe you are looking for

  • PRODUCT GROUP

    While creating product group I am getting error message MG144 as "The field is defined as a required field; it does not contain an entry" I tried to create material type Product group, there also I am getting same message no as "The field Profit cent

  • Why does iphoto not play my movies

    I have a macbook pro. I have transferred photos and movies from SD cards that are otherwise part of my Nikon D 5100 and Panasonic TZ 40. After initially loading the photos and movies, all movies were playing as expected. However, somewhere after upda

  • Spooling out profile that are not being used

    hi guys, is there anyway to spool out those profile that are not in used or assigned to any username or roles?

  • Stylesheets for mobile XML

    Hi, I would like to apply a .css stylesheet on a .jsp containing mobileXML code. Is that possible? Thanks.

  • Wallstreet PMU - Dead or Alive?

    Greetings all. I recently received a Wallstreet (1998 Model M4753) from my mother-in-law with a known history of instability. The laptop that is. Mother-in-law and I are both Mac fanatics. Long term goal is to upgrade hard drive, add wireless and pas