Hi how can i fetch the data from tree table

Hi i am designing a UI in which i am creating a java tree table as on sun java site http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html now i have to fetch the perticular column value on the mouse click.I have implemented mouse listener and on mouse clicked event I tried :
Object obj=tableInputOutputEntities.getValueAt(tableInputOutputEntities.getSelectedRow(),tableInputOutputEntities.getSelectedColumn());
as we usually do in case on JTable but it is also throwing null exception. Again after going through forum i found some code to get the current row and current column selected values and tried with getValueAt(int,int) method but still it is throwing nulll pointer exception. Please help me out.
                     public void mouseClicked(MouseEvent e)
          Point p = e.getPoint();
          int row = treeTable.rowAtPoint(p);
          int column = treeTable.columnAtPoint(p);
          Object obj=treeTable.getValueAt(row,column);
          System.out.println("Object value: "+obj.toString());               
                            }Regards
Naxy

Hello Kevin,
The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

Similar Messages

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • How Can i get the data From A Table that use DefaultTableModel

    Hi and sorry for my bad english. The problem that i have is that i used this code to fill a table. Now i want when i select a row and click in a button , get the value of that row that i select so then i can update or delete that data in my dataBasesServer.
    private void consulta(){
              Connection c = ConectarSQL.conexionSQL();
              try {
                   Statement s = c.createStatement();
                   ResultSet ar = s.executeQuery("Select Apellido, Nombre FROM Personas");
                   DefaultTableModel modelo = new DefaultTableModel();
                   this.Tabla.setModel(modelo);
                   modelo.addColumn("Apellido");
                   modelo.addColumn("Nombre");
                   while (ar.next()) {
                      Object [] fila = new Object[2];
                      for (int i=0;i<2;i++)
                         fila[i] = ar.getObject(i+1);
                      modelo.addRow(fila);
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }

    Dont worry kevinaworkman, the thing is that a read it and is really usefull, but i was looking other kind of solution. But i welcome your answer and interested to solve my problem.
    I find the answer.
    To retrive the data i have to use the following instruction:
    Tabla.getValueAt(Tabla.getSelectedColumn(),Tabla.getSelectedRow);

  • How can i Delete the data from three tables at a time  using same key.

    I am New to Oracle ADF, I have a Requirement Like these, I have three tables like Employee,Salaries,Teams all of these are having one common EmpNo as common attribute, I have Search form these will return the all the employees related to that search query, when i click on Delete button the particular employe Data should delete from all the three tables based on the EmpNo.
    Any Help is appreciable..

    1) The easiest way is to mark the foreign key constraints from SALARIES to EMPLOYEES and from TEAMS to EMPLOYEES as ON DELETE CASCADE. The DB server will then delete the necessary rows whenever you delete an employee row.
    2) Another way is to implement a Before-Delete-Row DB trigger on the EMPLOYEES table where you can delete the related rows in the other tables (have in mind, that if you have foreign keys you may get a Mutating Table Exception, so this approach might be not very good).
    3) An ADF way is to implement a custom EntityImpl class for the Employee entity and to override the remove() method where you can lookup the related TeamMember and Salary entities (through EntityAssoc accessors) and invoke their remove() methods too.
    4) Another ADF way is to implement a custom EntityImpl class for the Employee entity and to override the doDML() method where you can delete the necessary rows in SALARIES and TEAMS tables through JDBC calls whenever a DELETE operation is being performed on the underlying Employee entity.
    Dimitar

  • How Can we get the data from Non-SAP to SAP in WebDynpro

    Hi,
    I hope u understand my query, How can we get the data from Non-SAP to SAP thru WebDynpro Programming.
    Help out with the steps for getting the data or procedure.
    Regards,
    Mutyapu

    You can expose the APIs in the Non-SAP backend as Web Services, and consume them in SAP by creating an Enterprise Proxy. Then these can be called just like normal class methods from Web Dynpro.
    Regards,
    Nithya

  • How can we export the data from OAF Page to Excel instead of .csv or .txt

    Hello,
    How can we export the data from OAF Page to Excel instead of .csv or .txt
    When i click on the export button it is exporting to txt file, But i need to export the data into Excel by default
    Please help me
    Thanks in advance
    Thanks,
    Raju
    We have changed the below profile option to get the data in excel by default
    Profile Name Export MIME type
    Profile Code FND_EXPORT_MIME_TYPE+
    Existing Value: text/tab-separated-values+
    Change as: Excel
    Thank you,
    Raju
    Edited by: 1006649 on May 21, 2013 10:55 AM

    We have changed the below profile option to get the data in excel by default
    Profile Name Export MIME type
    Profile Code FND_EXPORT_MIME_TYPE+
    Existing Value: text/tab-separated-values+
    Change as: Excel
    Thank you,
    Raju

  • How can i save the data from the Oracle database to my local directory

    How can i save the data from the Oracle database to my local directory instead Of saving the data file to the Directory created on the Oracle Server ?
    I require to design the Procedure which will pull the data from various tables and needs to store the data in the Client's local directory.

    Since SQL*PLUS runs on the client, you can use SQL*PLUS to spool data to your local drive.
    You could also use the database to write a a specified drive where all users have access to (mapped network drive, e.g.). I wouldn't recommend doing it that way, but it is sometimes useful when the files are created in some nightly batch run.

  • How can I extract the data from Xstring .

    Hi Gurus ,
    How can I extract the data from a XSTRING  .
    I have to get the data which is filled in the survey form the data is getting saved in form of xstring .
    Someone told me that there is a standard FM for that . but I am not able to find .
    Please reply with the FM in case some one knows about it .
    Thanks in advance .

    The following code works as of 7.0 (in any SAP system):
    FORM XSTRING_TO_STRING USING input TYPE xstring CHANGING output TYPE string.
    TYPES : BEGIN OF ty_struc,
              line TYPE c LENGTH 100,
            END OF ty_struc.
    DATA lt_char TYPE TABLE OF ty_struc.
    DATA length TYPE i.
    length = xstrlen( input ) / cl_abap_char_utilities=>charsize.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = input
      tables
        binary_tab            = lt_char.
    CONCATENATE LINES OF lt_char INTO output RESPECTING BLANKS.
    output = output(length).
    ENDFORM.
    Edited by: Sandra Rossi on Mar 30, 2010 12:24 AM

  • How can i store the data from the list to MS-Access?

    Hi all,
    We all know that from alv it is possible to export data to Ms-excel or word or text file. Can anyone tell me how can i store the data from alv or reports to Ms-Access?
    Thanks in Advance,
    Abhijit

    Hi,
    If you want that without code, i suppose there is a option in MS-Access to import data from Excel, so you have to first export to excel and then import to Access.
    If you want to code it yourself then have a look at FM TABLE_EXPORT_TO_MSACCESS, as said in Exporting Data from R/3 to MS ACCESS
    You can also see the search results in SCN for [export data to MS-Access (45 Results)|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=exportdatato+MS-Access&cat=sdn_all].
    Regards
    Karthik D

  • I have Time Machine that I used to back up my old computer. It was running snow leopard. My MacBook died, so I got a new one which is running Lion.  how can I restore the data from the time capsule to my new Mac?

    I have Time Machine that I used to back up my old computer. It was running snow leopard. My MacBook died, so I got a new one which is running Lion.  how can I restore the data from the time capsule to my new Mac?

    In technical support, sometimes you have to make educated guesses. I'm sorry that you were offended.
    iTunes does prompt when it is going to erase a device, and the message is clear.
    She said in her message that she was able to successfully sync the old ipad. This indicated to me that itunes wiping the data was not an issue, because either it had been setup at the apple store (in which case it doesn't actually wipe the ipad despite saying it will*) (*based on a single case I saw), or because the itunes media folder was migrated.
    Furthermore, my solution was to tell her how to backup her ipad (by either doing it manually, or as a last resort, by deleting the corrupt backup -- that she couldn't access anyway.)
    I got that last part of the instructions from the "Taking Control of your iphone" book which I found samples of when I did a google search for "corrupted backup itunes".
    She marked this as a solution, so it worked for her.

  • I removed my SSD card from my broken macbook, how can I transfer the data from it to another computer?

    I removed my SSD card from my broken macbook, how can I transfer the data from it to another computer?  I have an iMac now or a PC. 

    You can put it into any notebook SATA enclosure such as Build your own External/Add your own drive up to 1.5TB! OWC Express USB 2.0 Express Kits From $18.79 USB 3.0 Express Kits From $21.99.

  • How can i change the data from one Time Capsule to another?

    How can i change the data from one Time Capsule to another?

    Do you mean copy it?  If so, see #18 in Time Machine - Frequently Asked Questions  You'll need section 2 there.
    If you mean something else, please clarify.

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • How can i Pick the data from the string

    Hi Gurus
    How can i Pick the data from the string using regular expressions. for ex:
    1) 10000-san0001
    2) 3000000-rani0001
    3) 30-super003
    its doesnt mainain how many characters.
    like this i got string. now i only want  after the symobl( -) text (san
                                                                                    rani
                                                                                    super)  .how can i pick that
    can anyone provide me regular expressions.
    Thanks & Regards
    Sandya
    Edited by: sandya rani on Jan 29, 2010 2:51 PM

    REPORT  ZTEST.
    data: str1 TYPE string,
    str2 TYPE string,
    str3 TYPE string,
    lenth TYPE string,
    str4 TYPE string,
    temp type i value '0'.
    data: ii type i value '0',
          jj type i value '1'.
    Data : begin of itab OCCURS 0,
    l_string type string,
    end of itab.
    itab-l_string = '3000000-GUNDALA20001'.
    append itab.
    clear itab.
    itab-l_string = '2045677-iCVj1001'.
    append itab.
    clear itab.
    itab-l_string = '3000-ragh30001'.
    append itab.
    clear itab.
    loop at itab.
      MOVE 0 TO ii.
      MOVE 1 TO jj.
      SPLIT itab-l_string AT '-' INTO: str1 str2 .
      clear: itab-l_string,str1.
      lenth = strlen( str2 ).
      while temp < lenth.
        str4 = str2+ii(jj).
        if str4 CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' or str4 CA 'abcdefghijklmnopqrstuvwxyz'.
          if sy-subrc = 0.
            CONCATENATE str3 str4 into str3.
          endif.
          ii = ii + 1.
        ENDIF.
        temp = temp + 1.
      ENDWHILE.
      write: / str3.
      clear: itab, ii, jj,str1, str2, str3, str4,temp, lenth.
    Endloop.

  • How can I transfer the data from iPhone 3 to iPhone 5?

    How can I transfer the data from iPhone 3 to iPhone 5?

    Sometimes you might get an error while restoring if the ios version used on 3 is outdated. 
    But other wise please follow the article
    Transfering data

Maybe you are looking for

  • Airport Express Base Station no longer detectable by my computer

    Ever since I went wireless last year, I have had a love-hate relationship with my Airport Express Base Station. It seems to take forever and a day to configure the sucker, then, somehow I do and it works well for several months - until something happ

  • Fotos drehen in Photoshop Elements 12, Organizer

    Hallo, wenn ich im Photoshop Elements Organizer Fotos drehe, werden die Originalfotos in den Papierkorb verschoben. Möchte aber, das die Originalen Fotos erhalten bleiben. Ist das möglich? Gruß Peter

  • Upright correction doesn't stick

    When I use the new upright correction in LR5 and export the file to a jpeg I find that the file is more distorted than the original file I was attempting to correct.  Is this a bug or a feature? Allan

  • ITunes is very slow to open - does not recognize iPod Touch

    I'm running on Windows 7 and iTunes is the only program that I am experiencing any problems with. Outside of iTunes, everything operates optimally. I'm going to run AV and AM software tomorrow to see if I'm infected but I doubt that is the case here.

  • How to improve the speed of creating multiple strings from a char[]?

    Hi, I have a char[] and I want to create multiple Strings from the contents of this char[] at various offsets and of various lengths, without having to reallocate memory (my char[] is several tens of megabytes large). And the following function (from