Read input from user and strore in ztable

Hai,
    could you please give some examples of How to read the input data from user and store in Ztable.
Thanks

Hi Prasanna,
If i understood your requirement correctly,
The below code will insert record in DB table as soon as you enter the value in two fields and press enter button .
Go through the below code,
<b>In Layout</b>
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page title = "first page ">
    <htmlb:form>
      <htmlb:inputField  id="field1"/>
      <htmlb:inputField  id="field2"/>
      <htmlb:button       id="submitButton"  text = "Press Me"
                          onClick       = "myClickHandler" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
<b>In Oninputprocessing event</b>
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
  DATA: event TYPE REF TO CL_HTMLB_EVENT.
  data : begin of wa,
         matnr type mara-matnr,
         ersda type mara-ersda,
         end of wa.
  event ?= CL_HTMLB_MANAGER=>GET_EVENT( runtime->server->request ).
  IF event->id = 'submitButton' AND event->event_type = 'click'.
    DATA: data TYPE REF TO CL_HTMLB_INPUTFIELD.
    DATA: data1 TYPE REF TO CL_HTMLB_INPUTFIELD.
    data ?= CL_HTMLB_MANAGER=>GET_DATA( request = runtime->server->request
                                           name     = 'inputField'
                                           id       = 'field1'
    IF data IS NOT INITIAL.
     value = data->value.
      wa-matnr = data->value.
    ENDIF.
    data1 ?= CL_HTMLB_MANAGER=>GET_DATA( request = runtime->server->request
                                           name     = 'inputField'
                                           id       = 'field2'
    IF data1 IS NOT INITIAL.
     value = data->value.
      wa-ersda = data1->value.
    ENDIF.
   insert into ZAZAZ_BSP CLIENT SPECIFIED values wa.
  ENDIF.
Regards,
Azaz Ali.
Don't forget to reward points.

Similar Messages

  • How to  Get input from  User and Display it's Value

    Hi ,
    I need to get 2 inputs from user and to display it's Mutilple Value.
    The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
    overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(char)br.read();
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

    Changed to Integer but still the problem persists.
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(int)br.read();
    Count++;
    b=(int)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

  • How to Get Input From User and Display Result

    Hi ,
    I need to get 2 inputs from user and to display it's Mutilple Value.
    The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
    overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(char)br.read();
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

    Hi ,
    I need to get 2 inputs from user and to display it's
    Mutilple Value.
    The Below Code is working fine to get 2 Input's from
    user,but it display a Junk value as a Result .How
    to
    overcome this Problem. I need to display it's
    Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws
    IOException{
    BufferedReader br =new BufferedReader(new
    InputStreamReader(System.in));
    do{
    a=(char)br.read();This line will get you the ascii-value of the typed character.
    This line will not get you the value typed in.
    Try looking for Integer.parseInt()...
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);

  • Get input from user and create a file and run a script in command line.

    Hi all,
    i'm trying to get a input from user and write it into a file named alpe.jacl
    To get multiple userinputs like address and jobtitle etc etc in the same single window.
    and the code will save the inputs in alpe.jacl one by one in a new line like
    nameis name
    address russia
    jobtitle dev
    So i coded like below.
    Though GUI for user input looks dull Its working fine.
    Now I want this code to perform one more task which is the GUI will contain one more button INSTALL with OK and CALCEL .
    and when after putting all inputs and creating the alpe.jacl file if someone clicks INSTALL it should start ./install.sh script present at the same folder which contains some unix shell commands.
    Here am not able to figure out how to go further...
    One more thing after all the inputs given when I am clicking on the OK button its closing the window instantly which i dont want. I want it like it should wait till someone press CANCEL to exit.
    Please some one help me.
    import javax.swing.*;
    import java.io.*;
    public class file
    public static void main(String []args)throws IOException
    FileWriter ryt=new FileWriter("alpe.jacl");
    BufferedWriter out=new BufferedWriter(ryt);
    JTextField wsName = new JTextField();
    JTextField sName = new JTextField();
    JTextField cName = new JTextField();
    Object[] message = {    "Web Server Name:", wsName,"Server Name:", sName,"Cluster Name:", cName};
    int answer = JOptionPane.showConfirmDialog(    null, message, "Enter values", JOptionPane.OK_CANCEL_OPTION);
    if (answer == JOptionPane.OK_OPTION){    String webserver = wsName.getText();
    String server = sName.getText();
    String cluster = cName.getText();
    out.write("set webservername " +wsName.getText()+"\n");
    out.write("set ClusterName " +cName.getText()+"\n");
    out.write("set ServerName " +sName.getText()+"\n");
    out.close();
    }}Thanks,
    Ricky

    Thanks a lot.
    Is there any way through which i can assign a scroll bar to my panel.
    As when the number of user inputs grows the GUI becomes more bulky and some of the fields are not showing up.
    Cheers
    _Ricky                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SAP BPC - Intercompany reconciliation - IC accounts - Input from user?

    Dear All,
    When doing consolidation(of investments), we need to reconcile IC transactions prior to consolidation process. I believe, there are specific accounts which are specific to IC transactions. These IC related accounts must be identified and used in the business rules during reconciliation process.
    My question is:
    During requirements gathering, even if I(SAP BPC Consultant) know those IC specific accounts on seeing the chart of accounts, this info./data MUST come from the users as these accounts may vary from company to company. When it is a legal consolidation, it is safer that these inputs are coming from the user and not from the SAP BPC Consultant. This is my understanding.
    Is my above understanding is correct? IC related accounts must be an input from users and not expected from SAP CONS. specialist?
    Correct me if I am wrong.
    Thank you!
    Regards,
    Peri

    Hi Peri,
    Different companies use different charts of accounts and the intercompany group of accounts have to be confirmed by customers finance.
    Vadim

  • How can i take input from user?

    class input{
    public static void main(String args[]){
    int i,j,result;
    //i want to take input here from user.
    result=i+j;
    System.out.println(result);
    }

    here's the code which takes input of i , j from user and adds it
    <code>
    public static void main(String[] args)
              int i=0;
              int j=0;
              String s = null;
              System.out.println("Enter value of 'i'");
              InputStreamReader isr = new InputStreamReader ( System.in );
              BufferedReader br = new BufferedReader ( isr );
              try
              s = br.readLine ();
              i=Integer.parseInt(s);
              System.out.println("Enter value of 'j'");
              isr = new InputStreamReader ( System.in );
              br = new BufferedReader ( isr );
              s = br.readLine ();
              j=Integer.parseInt(s);
              System.out.println("Enter value of 'i+j ='"+(i+j));
              catch(Exception e){}
    </code>

  • RMI that ask input from user..

    i've been trying to understand the programming for 2weeks!!but still i cant figure out how to get input from client and server process the input and return it to the client.
    can somebody PLEASEEEEE give me a complete simple program that got all the interfaces,client,server and implementation RMI code.Please give me a complete code that i can run that does this:-
    1st-server ask client for input of two numbers.
    2nd-the client give 2 input
    3rd-server compute the number and return it to the client
    i am so lost on how to implement the io in RMI.The program that im supposed to build is much more complicated than this,but right now,i just need to know how the heck to use the input output thing in RMI.

    1st-server ask client for input of two numbers.No. Incorrect design. The client should do that. The server has no interface with the user at the client.
    2nd-the client give 2 inputIf the client does (1) this is unnecessary.
    3rd-server compute the number and return it to the client1. Design the remote interface.
    2. Implement the remote class, extending UnicastRemoteObject, implementing the remote interface, and providing a method that implements the remote method(s).
    3. Write a main() that instantiates the remote object and binds it to the local Registry.
    4. Write a client that does (1) above. Then have it get an instance of the remote interface by looking up the Registry on the server machine, and then have it call the remote method.

  • Read Input from console !!!

    Im am very new to java and trying to learn java ..
    Now the problem i have is, I have to read input from console without using the BufferReader method..
    Please tell me how to go about it..
    I have a assignment to complete and im not able to figure out the way out.
    Help ..

    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/System.html
    Read first about the System class provided by Java.
    Select the 'in' method of System class and it will take
    you to the InputStream.
    http://java.sun.com/j2se/1.4.1/docs/api/java/io/InputStream.html
    An essay way of reading input is:
    "value?"=System.in.read();
    Try and see if this works. It will not use the
    BufferReader portion, but it gives you another way
    of reading from the console.

  • 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 read input from handheld scanner on a keyboard port

    Hi everybody,
    i have an application that should read input from a scanner.
    If i use a jTextField to input scanned data it works fine.
    the problem is that i don't want to use any text component to input data into it.
    And if i set the jtextField not visible then the focus sustem doesnt work.
    I tried to read a buffered input stream from System.in but it doesnt work.
    If the scanner was installed on a serial port i could use javax.comm to monitor it.
    But unfortunately i must use the keyboard wedge thing...
    Do you have any ideas?
    Thank you in advance

    BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()))
    null

  • Problem with reading data from screen and inserting in table

    hi ther,
    im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
    i done screen gui , table creation but problems with action. what the content of acton add.
    is ther any link that helps me or tut??
    thankx in advance!
    regards

    Hi,
    Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
    Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
    Now in the action of ADD button....
    --> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
    for example if the node is contains aone attribute like MATNR
    reading the node from wizard will generate the code as....
    DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
      DATA lo_el_matnr TYPE REF TO if_wd_context_element.
      DATA ls_matnr TYPE wd_this->element_matnr.
      DATA lv_matnr TYPE wd_this->element_matnr-matnr.
    * navigate from <CONTEXT> to <MATNR> via lead selection
      lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
    * @TODO handle non existant child
    * IF lo_nd_matnr IS INITIAL.
    * ENDIF.
    * get element via lead selection
      lo_el_matnr = lo_nd_matnr->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_matnr IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_matnr->get_attribute(
        EXPORTING
          name =  `MATNR`
        IMPORTING
          value = lv_matnr ).
    here the variable lv_matnr will contain the entered value......
    now you can use this value for further process.
    Thanks,
    Shailaja Ainala.

  • Need to read Email from Lotusnotes and Outlook using Oracle

    Dear All,
    My database version Oracle 10.2
    I need to read Email from Lotusnotes and Outlook using Oracle.
    I have tried with below link
    http://sourceforge.net/projects/plsqlmailclient/The problem is i am getting some java error.
    Can anyone suggest me to proceed further.
    Cheers,
    San

    I am using the another function to read an email from pop3 server
    create or replace
    FUNCTION pop3 (
       username   VARCHAR2,
       PASSWORD   VARCHAR2,
       msgnum     NUMBER
       RETURN tstrings PIPELINED
    IS
       --POP3_SERVER             constant varchar2(19) := '127.0.0.1';
       pop3_server   CONSTANT VARCHAR2 (100)     := 'xxxxxx';
       pop3_port     CONSTANT NUMBER             := 110;
       --POP3_TIMEOUT            constant number := 10;
       pop3_ok       CONSTANT VARCHAR2 (10)      := '+OK';
       e_pop3_error           EXCEPTION;
       --E_READ_TIMEOUT  exception;
       --pragma exception_init( E_READ_TIMEOUT, -29276 );
       socket                 UTL_TCP.connection;
       line                   VARCHAR2 (30000);
       BYTES                  INTEGER;
       -- send a POP3 command
       -- (we expect each command to respond with a +OK)
       FUNCTION writetopop (command VARCHAR2)
          RETURN VARCHAR2
       IS
          len    INTEGER;
          resp   VARCHAR2 (30000);
       BEGIN
          len := UTL_TCP.write_line (socket, command);
          UTL_TCP.FLUSH (socket);
          -- using a hack to check the popd response
          len := UTL_TCP.read_line (socket, resp);
          IF SUBSTR (resp, 1, 3) != pop3_ok
         THEN
           RAISE e_pop3_error;
          END IF;
          RETURN (resp);
       END;
    BEGIN
    --UTL_TCP.CLOSE_CONNECTION (SOCKET);
       PIPE ROW ('pop3:' || pop3_server || ' port:' || pop3_port);
       -- Just to make sure there are no previously opened connections
       UTL_TCP.close_all_connections;
       -- open a socket connection to the POP3 server
       socket :=
          UTL_TCP.open_connection (remote_host      => pop3_server,
                                   remote_port      => pop3_port,
                                   --tx_timeout => POP3_TIMEOUT,
                                   CHARSET          => 'US7ASCII'
       -- read the server banner/response from the pop3 daemon
       PIPE ROW (UTL_TCP.get_line (socket));
       -- authenticate with the POP3 server using the USER and PASS commands
       PIPE ROW ('USER ' || username);
       PIPE ROW (writetopop ('USER ' || username));
       PIPE ROW ('PASS ' || PASSWORD);
       PIPE ROW (writetopop ('PASS ' || PASSWORD));
       -- retrieve the specific message
       PIPE ROW ('RETR ' || msgnum);
       PIPE ROW (writetopop ('RETR ' || msgnum));
       --PIPE ROW( 'LIST '||msgNum ); PIPE ROW( WriteToPop('LIST '||msgNum) );
       PIPE ROW ('*** START OF INTERNET MESSAGE BODY ***');
       LOOP
       dbms_output.put_line('entering');
          BYTES := UTL_TCP.available (socket);
         IF BYTES > 0
          THEN
             BYTES := UTL_TCP.read_line (socket, line);
             line := REPLACE (line, CHR (13) || CHR (10), '');
             -- WILL HAVE TO USE PLSQL FUNCTIONS (HAVE BOOKMARKED) TO GET THE MAIL
             -- IN THE PREFERRED FORMAT. CAN USE "REPLACE()"
             IF LENGTH (line) = 1 AND line = '.'
             THEN
                PIPE ROW ('*** END OF INTERNET MESSAGE BODY ***');
             ELSE
                PIPE ROW (line);
             end if;
         END IF;
          EXIT when length (LINE) = 1 and LINE = '.';
          -- PIPE ROW (line);
       END LOOP;
       --PIPE ROW( '*** END OF INTERNET MESSAGE BODY ***' );
       -- close connection
       PIPE ROW ('QUIT');
       PIPE ROW (writetopop ('QUIT'));
       UTL_TCP.CLOSE_CONNECTION (SOCKET);
    EXCEPTION
       WHEN e_pop3_error
       THEN
          PIPE ROW ('There are no mails !');
    END;I am getting the below output .
    21     pop3:sbssld1 port:110
    75     "+OK Lotus Notes POP3 server version Release 8.0.1 ready on SBSSLD1/SBPSS.
    47     USER [email protected]
    69     "+OK [email protected], your papers please.
    13     PASS password
    63     "+OK [email protected] has 1 message.
    6     RETR 1
    17     "+OK 1546 octets
    38     *** START OF INTERNET MESSAGE BODY ***
    9     Subject:
    48     X-KeepSent: A231D6D0:8485FE4B-65257AB1:0022E60F;
    23      type=4; name=$KeepSent
    46     To: [email protected]
    53     X-Mailer: Lotus Notes Release 8.0.1 February 07, 2008
    95     Message-ID: <[email protected]mbnpparibasfs.in>
    48     From: [email protected]
    36     Date: Fri, 9 Nov 2012 11:51:14 +0530
    90     X-MIMETrack: Serialize by POP3 Server on SBSSLD1/SBPSS(Release 8.0.1|February 07, 2008) at
    23      11/09/2012 11:51:21 AM
    17     MIME-Version: 1.0
    37     Content-type: multipart/alternative;
    68     "     Boundary="0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6""
    27     Content-Disposition: inline
    (null)     (null)
    58     --0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6
    39     Content-type: text/plain; charset=UTF-8
    33     Content-transfer-encoding: base64
    (null)     (null)
    (null)     (null)
    76     DQoNCg0KUmVnYXJkcywNClNoYW5tdWdhbSBOYXRhcmFqYW4uDQpNb2IgOiA5NjI5MjUyNDI1DQpP
    76     ZmYgOiAwNDQgMjI1MDQ3MDAgRXh0biA0Nzc5DQoNCiB+SWYgdGhlIGZhY3RzIGRvbuKAmXQgZml0
    68     IHRoZSB0aGVvcnksIGNoYW5nZSB0aGUgZmFjdHMu4oCdIC0gQWxiZXJ0IEVpbnN0ZWlu
    (null)     (null)
    58     --0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6
    38     Content-type: text/html; charset=UTF-8
    27     Content-Disposition: inline
    33     Content-transfer-encoding: base64
    (null)     (null)
    76     PGh0bWw+PGJvZHk+DQo8cD5SZWdhcmRzLDxicj4NClNoYW5tdWdhbSBOYXRhcmFqYW4uPGJyPg0K
    76     TW9iIDogOTYyOTI1MjQyNTxicj4NCk9mZiA6IDA0NCAyMjUwNDcwMCBFeHRuIDQ3Nzk8YnI+DQo8
    76     YnI+DQogfklmIHRoZSBmYWN0cyBkb27igJl0IGZpdCB0aGUgdGhlb3J5LCBjaGFuZ2UgdGhlIGZh
    60     Y3RzLuKAnSAtIEFsYmVydCBFaW5zdGVpbjxicj4NCjwvYm9keT48L2h0bWw+
    (null)     (null)
    60     --0__=EABBF022DFB16ED68f9e8a93df938690918cEABBF022DFB16ED6--
    (null)     (null)
    36     *** END OF INTERNET MESSAGE BODY ***
    4     QUIT
    42     "+OK Lotus Notes POP3 server signing off.
    "Now pls suggest me how can i store the sender mail id, receiver mail id, subject and body of the mail in a table.
    So that i can display the saved data in the above table as a mail in my separate application.
    Thanks in advance.
    Cheers,
    San

  • Make System.in read input from a command prompt

    How can i make System.in read input from a command prompt which is opened after program
    is started. Please note that program starts without commad promt. Can u plz help?
    sharmila

    System.in DOES read from the command shell that you start the app in.
    What you don't have is a prompt.
    You should know about Java Almanac. There are code samples for simple things like I/O that everyone should know about. There's an example there to help you.
    MOD

  • Read data from Excel and write into oracle database

    Hi
    I want  to know how can i read data from excel and write into oracle database using java.Kindly help me out to find a solution.
    Thanks and Regards
    Neeta

    Hai,
    I am suggesting the solution.
    I will try out and let u know soon.
    Make a coma separated file from your excel file.
    Assuming that your requirement allows to make a csv file.
    This file may be passed as an file object to be read by java.Using JDBC you must be able to populate the data base.You can also use String Tokenizer if needed.
    You do not want to  go via sql Loader?
    For reading the excel file itself do you want java?

  • I can buy an iPhone 5 from users and it has been icloud, now I can not find it's owner, so anyone show me how to open it not, sir, thank you

    I can buy an iPhone 5 from users and it has been icloud, now I can not find it's owner, so anyone show me how to open it not, sir, thank you

    There is nothing you can do then. You have a brick.
    The phone has an Activation Lock on it, and there is no way to get around it:
    http://support.apple.com/kb/ht5818
    Sorry,
    GB

Maybe you are looking for

  • Unable to generate output due to huge xml generated

    Hello All, I am working on etext templates for generating EFT payments. When the payments are below 100 then the output is fine. But when it is crossing 100 payments then it is not producing any output. This is a standard rtf which I have modified an

  • 7.1, 6.1, 5.1, 2.1 whats the differan

    OK i have a 400 watt sony stereo and it has a left and a right input. I have it plugged in the back of my sb audigy 2 zs sound card on the third jack. My stereo has 2 side speakers and a subwoofer. Now what happens when i go into the creative audio c

  • How copy info-record of one vendor to another ?

    Dear guru , A vendor change its VAT reg.no and I must create a new vendor. How can I run a massive copy of all info-record of the old vendor to the new vendor ? Thanks for your help.

  • Table control - what is the limit to how much I can sent to it.

    Greetings, I am using a table control for a test program.  Each time a feature of the unit is tested it is logged to the table control. I know that the answer will depend on how many columns i am filling (9) and the length of the strings in each colu

  • OIM: Disable User and Move to New OU

    Hey guys, I'm trying to figure out how to add an additional event when I disable a user. I want to be able to do as the title says. When I disable a user through OIM, move them to a specific OU within Active Directory. Has anyone done this before? TI