Calculation to get latest completion Date

hi.. thanks guys for all the info.. it really helped me a lot as a newbie..
i am doing a report as an end-user of discoverer desktop 4. how can i get the highest completion date (table and crosstab format) in my data as follows:
BudgetRef ProjectNo TaskNo CompletionDate
2010-01 PN2600 A1000 Mar-2011
2010-01 PN2600 B1000 Sep-2012
2010-01 PN2600 C1000 Jun-2011
2010-01 PN2665 A1000 Jun-2012
2010-01 PN2665 B1000 Dec-2011
2010-02 PN3005 A1000 Mar-2012
2010-02 PN3005 B1000 Dec-2013
2010-02 PN3005 C1000 Dec-2012
Result should be:_
BudgetRef          ProjectNo    CompletionDate
2010-01 PN2600 Sep-2012
2010-01 PN2665 Jun-2012
2010-02 PN3005 Dec-2013
thanks again for the usual assistance.

thanks Michael.. it works fine..
another thing :-).. i tried to run the same report but adding some fields.. comparing the original completion from amended completion but it seems it is giving me a null value if one of the ProjectNo completion date is empty or if the completion date is a text (ie "hold"), and in some cases it is not showing as a line item therefore affecting the ProjectCost
if the comparative completion dates in the original and amended are either empty or is a text.. it should still show the field either an empty field or the text "Hold" (text has the priority when being compared to an empty field) so as to retain the total Project cost.
my sample data are as follows:
BudgetRef ProjectNo     TaskNo     ProjectCost     OrigCompletionDate     AmendedCompletionDate
2010-01 PN2600     A1000     1,000      Mar-11     Mar-12
2010-01     PN2600     B1000     5,000      Jul-10     Oct-13
2010-01     PN2600     C1000     6,000      Hold     May-14
2010-01     PN2665     A1000     3,000      Jun-12     Apr-13
2010-01     PN2665     B1000     2,000      "Null"     Dec-11
2010-02     PN3005     A1000     4,000      Mar-12     May-15
2010-02     PN3005     B1000     9,000      Hold     May-15
2010-02     PN3005     C1000     7,000      Dec-12     Jun-13
2010-03     PN3007     A1000     8,000      "Null"     "Null"
2010-03     PN3007     B1000     2,000      Hold     "Null"
2010-04 PN3008 A1000 _5,000_ "Null" "Null"
          Total     *52,000*           
The result should show as follows:                         
BudgetRef     ProjectNo     ProjectCost     OrigCompletionDate     AmendedCompletionDate
2010-01     PN2600          12,000      Mar-11     May-14
2010-01     PN2665          5,000      Jun-12     Apr-13
2010-02     PN3005          20,000      Dec-12     May-15
2010-03     PN3007          10,000      Hold     "Null"
2010-04 PN3008 _5,000_ "Null" "Null"
          Total     *52,000*           
thanks again for the never ending assistance.

Similar Messages

  • In which table we get latest finish date of operation

    Hello all,
    I have one report for planned order in which i have to display the latest finish date of all the operation in that particular plnned order.
    can you please tell me from which table i can get the latest finish date of the operation.
    I have used the table KBED, but in table KBED i am not getting data for all the operation in planned order. I am geting only one or two operation in table KBED.
    Is there is any other table or any other way by which i can find the latest finish date for the opeartion.
    Please help.

    Hello Rudra,
    I don't want dates of planned order.
    In planned order we have number of operation.
    I want latest finish date of these operation,
    In table KBED we get the latest finish date but i am not able to get details of all the operation.
    In table KBED i am getting detials of only two operations where as in planned order i have 7 operations.
    Thanks

  • SQL command to get latest effective date

    Hi!
    How can i want to write a sql command to fetch records as such
    Vendor;    Item;     EffectiveDate;    UnitPrice;    Remarks
    Vend1;      ABC;    31/01/2012;        120;            Dont show
    Vend1;      ABC;    29/02/2012;        150;            Show
    Vend2;      ABC;    01/01/2012;        140;            Show
    Vend1;      XYZ;    15/01/2012;        100;            Show
    Please help me, so far I can only figuire out how to get the latest effective date by vendor and item but was not able to get UnitPrice
    SELECT  "VendPart"."Vendor", "VendPart"."Item", Max("VendPart"."EffectiveDate") AS MaxOfEffectiveDate
    FROM   "POS_LiveRpt"."dbo"."VendPart" "VendPart"
    GROUp BY "VendPart"."Vendor", "VendPart"."Item"
    Edited by: MichellePoh on Feb 23, 2012 9:58 AM

    hi Michelle,
    you can use a subquery in your command to bring back the UnitPrice that is applicable to the max date...see the code below for an idea.
    you'll have to change the "UnitPrice" field below to match yours.
    note that in the subquery the vendpart table has been aliased as vendpart2 for the subquery to work. also note that the code may not work in your database as Alan aluded to the fact that the syntax is specific to the database type...if you get any database errors please refer to your database manual or a forum for your database type that has a subquery. and of course there may be errors from my typing in the query as it's just being done inside this forum thread...but hopefully this will give you an idea how to do this.
    cheers,
    jamie
    SELECT 
    "VendPart"."Vendor",
    "VendPart"."Item",
    Max("VendPart"."EffectiveDate") AS MaxOfEffectiveDate,
    SELECT "VendPart2"."UnitPrice"
    FROM "POS_LiveRpt"."dbo"."VendPart" "VendPart2"
    WHERE "VendPart2"."EffectiveDate" = Max("VendPart"."EffectiveDate")
    AND  "VendPart2"."Vendor" =  "VendPart"."Vendor"
    AND "VendPart2"."Item" = "VendPart"."Item"
    ) AS UnitPrice
    FROM  
    "POS_LiveRpt"."dbo"."VendPart" "VendPart"
    GROUp BY
    "VendPart"."Vendor", "VendPart"."Item"

  • How to get the complete data from Webdynpro using a RFC

    hi guys,
    A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
    I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
    And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
    I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
    FUNCTION ZSEND_MAIL_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
    *"  TABLES
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
          gd_sent_all(1) TYPE c,
          gd_error TYPE sy-subrc,
          tab_lines LIKE sy-tabix.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      data : v_bin_data like SOLISTI1 occurs 0 with header line.
      DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    *data bin_data1 like table of solix with header line.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
      DATA V_SUBJECT(255) VALUE 'HI'.
      gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SENDFILE'.
      gd_doc_data-obj_descr = v_subject.
      gd_doc_data-sensitivty = 'O'.
      APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
    *CALL FUNCTION 'GUI_UPLOAD'
    *EXPORTING
    *filename = V_FILE_PATH
    *filetype = 'BIN'
    *TABLES
    *data_tab = BIN_DATA.
      move bin_data to v_bin_data.
      append v_bin_data.
    *move soli to bin_data.
      LOOP AT V_BIN_DATA into objbin.
    MOVE v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
    data file(255) value '/tmp/bali.txt'.
    *Appending The Internal Table it_receivers
    close dataset '/tmp/bali.txt'.
    open dataset '/tmp/bali.txt' for output in text mode encoding default.
    if sy-subrc = 0.
    loop at objbin.
    transfer objbin to '/tmp/bali.txt'.
    endloop.
    else.
    write 'hi'.
    close dataset '/tmp/bali.txt'.
    endif.
      it_receiver-receiver = '[email protected]'.
      it_receiver-rec_type = 'U'.
      it_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
    if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    **Function Module To Post The Message To Externa Mail
         CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
             document_data              = gd_doc_data
             put_in_outbox              = 'X'
             commit_work                = 'X'
           TABLES
             packing_list               = it_packing_list
             CONTENTS_TXT               = objbin
             receivers                  = it_receivers
           EXCEPTIONS
             too_many_receivers         = 1
             document_not_sent          = 2
             document_type_not_exist    = 3
             operation_no_authorization = 4
             parameter_error            = 5
             x_error                    = 6
             enqueue_error              = 7
             OTHERS                     = 8.
         clear wa_receiver.
    ENDFUNCTION.

    You have to convert your long string to a table of shorter strings.
    There may be other ways, but one possibility is to use a loop to process you string.
    while (there is something left)
       put the next e.g. 1024 characters in a new row of your table
    endwhile
    If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
    Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

  • Calc of VAT in ext system: how to get complete data in BSET/RFUMSV00

    Hello
    We have a system that posts into SAP FI GL via BAPI BAPI_ACC_DOCUMENT_POST . The external system does not contain tax codes but it does calculate tax amounts and has GL account determination. How do I get the complete data in BSET so that I can use RFUMSV00 as the sole report on VAT for the client? Other formulation: how do I post an invoice from a vendor without using a tax code or should I use a dummy tax code VST without percentage number?
    regards
    Arjan

    Hi Deepa,
    I tend to develop a substitution (OBB)that adds a tax code to the interface posting so that in SAP I have for every VAT amount/document a tax code. Otherwise I cannot use RFUMSV00...

  • Downloading problem::getting only partial data from the net, why ??

    hi
    i am trying to download a file using the code
    InputStream getStream(){
    try {
    URL url = new URL("http://www.etc..");
    URLConncection urlconn= url.openConnection();
    InputStream in =urlconn.getInputStream();
    return in;
    }catch(MalformedURLException ){...}
    catch(IOException ioe){...}
    the problem is it is not getting the complete data.
    i tried to download a file which is 46k but it got only 1.3k
    can any one tell what to add or modify the above code so that i will be getting the complete data
    thanks in advance
    have a nice time
    krishna
    email id:[email protected]

    Try to set the request property and usecaches like
    this:
    con.setUseCaches(false);
    con.setRequestProperty ("Content-Type",
    "application/octet-stream")
    not working, i tried to download 46663 bytes got only 1369 bytes,please suggest me another solution.
    thanks in advance
    krishna

  • I need to get the complete element including tag. How to parse this xml?

    I am sure there should be some solution to this. I have XML file like this
    <test>
    <data value="123" color="RED">
    <type>single</type>
    </data>
    <data value="13323" color="BLUE">
    <type>double</type>
    </data>
    </test>
    I need to parse this XML and get the data element(s). The problem is that I need to get the complete data element include tags like
    "<data value="123" color="RED"><type>single</type></data>". I need to parse the complete XML file and get every data element including tag and send it to another upstream process.
    Any solution to this will be appreciated. I am little familiar with SAX. Is there any solution around using xerces SAX parser.
    Other solution is also appreciated.
    Thanks

        DocumentBuilder builder = factory.newDocumentBuilder();
        document = builder.parse(srcFile);
        NodeList list = document.getElementsByTagName("data");
        Node node = list.item(0); // Loop this
        TransformerFactory tFactory = TransformerFactory.newInstance();
        Transformer transformer = tFactory.newTransformer();
        DOMSource source = new DOMSource(node);
        StreamResult result = new StreamResult(outputstream);
        transformer.transform(source, result);
    Using XSLT will be lot easier.No it won't. Extending DefaultHandler is easy.Do you really think so?
    Hardly 10-15 lines.

  • Not able to get complete data in Heading of the smarform

    Dear Friends,
                    I am devloping a smartform for my requiremnt, i am not able to get complete data jin Header Window ( i.e the Title Name of the company is not getting fully) when i execute the Smartform ,
    Iam able to see only the last few words of the Text. Please help me what i should do in this regard
    regards
    madhuri

    Hi
    Also, check where the window is placed in the Form Painter...may be it is not on the page properly..and also check the size of the window..
    Further, check the paragraph format that is used.
    Regards,
    Vishwa.
    Edited by: Vishwa Sri Hari on Oct 15, 2008 1:21 PM

  • Complete data not getting returned when running IIS (v7.5) commands remotely.

    Hello All,
    I searched quite a number of forums before posting and all that I have come to know is that some have mentioned it to be related to COM. I do not have experience dealing with COM and no idea how I can sort this out. I hope someone can provide guidance on
    these:
    Question 1: Server (2008 R2 Standard) is having 4 websites. Default - Running, WS2 - Stopped, WS3 - Running and WS4 - Running. When I run the command "invoke-command -computername Server1 -Credential domain\User -ScriptBlock
    {import-module 'webAdministration'; get-website}"
    I get this output and then an error:
    name            : Default Web Site
    id              : 1
    serverAutoStart : False
    state           : Stopped
    bindings        : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
    PSComputerName  : Server1
    RunspaceId      : ca8bbb00-4631-4c92-a7c7-3bec8039eaee
    Attributes      : {Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute}
    ChildElements   : {Microsoft.IIs.PowerShell.Framework.ConfigurationElement
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationElement...}
    ElementTagName  : site
    Methods         : {Microsoft.IIs.PowerShell.Framework.ConfigurationMethod,
                      Microsoft.IIs.PowerShell.Framework.ConfigurationMethod}
    Schema          : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema
    The data is invalid. (Exception from HRESULT: 0x8007000D)
        + CategoryInfo          : NotSpecified: (:) [Get-Website], COMException
        + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.GetWebsite
       Command
    What I have been able to figure out is that it returns complete data for the Default Website and then throws the error. Tried the same command on another server running 2 websites (both in started state) and same results :(
    Question 2: When the same command "Get-Website" is run locally on the server then only 5 columns show by default; Name, ID, State, Physical Path & Bindings. Why then the command when run remotely returns slightly
    more data?
    PS: I have Win7 x64 on my desktop. Tried the commands from x86 as well as x64 shells and same results.

    Hi Yan,
    When I use Enter-PSSession, it works in the same manner as if the command is run locally. Hence the same output as local.
    I am not sure of the exact way to use [Reflection.Assembly]::LoadFile('C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll') 
    I tried this and get an error:
    invoke-command -Session $session -ScriptBlock invoke-command -Session $session -ScriptBlock {[Reflection.Assembly]::LoadFile('C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll'); get-website}
    Output:
    GAC    Version        Location                                                   PSComputerName
    True   v2.0.50727     C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administrati... Server1
    The term 'get-website' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and try again.
        + CategoryInfo          : ObjectNotFound: (get-website:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
        + PSComputerName        : Server1
    The version of the dll on the server is 6.1.7601.17514
    Thanks

  • Complete data is not getting downloaded in XL

    We have developed one Z report to take the status of open purchase order for projects. While downloading it to XL (ofiice 2007 installed on PC), complete data is not getting downloaded.
    I would like to know whether it is XL problem or it is some bug in the report itself.
    Pl. help.

    While downloading the data to excel , try the following option
    List -- > Export -- > Spreadsheet -- > Excel(in MHTML Format).
    The download will authormatically open in excel window. Save it as excel file

  • To get supplier name based on latest approved date

    hi
    in PO SUPER USER -Purchase Order Summary ,when we enter the item number in Item,rev field a new form Purchase Order Lines opens
    in this form there are many lines of PO numbers ,suppliers(vendors),approved date ,can we get the supplier name for which the approved date is most recent
    kindly guide
    thanking in advance

    hi
    in my system i can see the latest approved date wise but i have to add an inline query on the most recent vendor based on approved date to an already existing query
    meaning just the first row data(most recent supplier) should be captured in the query
    when i do the following query , i am taking an eg of the item_no 1020101001
    select msib.segment1,max(pha.approved_date) from
    po_headers_all pha,
    po_lines_all pla,
    po_vendors pv,
    mtl_system_items_b msib
    where
    pha.po_header_id = pla.po_header_id
    and pla.item_id = msib.inventory_item_id
    and pv.vendor_id=pha.vendor_id
    and msib.segment1='1020101001'
    --and pha.approved_date=max(pha.approved_date)
    group by
    --item_id.
    msib.segment1
    this is the output i get
    segment1           MAX(PHA.APPROVED_DATE)
    1020101001    1/9/2011 3:16:48 PMwhen i do the following query
    select msib.segment1,max(pha.approved_date) ,pv.vendor_name from
    po_headers_all pha,
    po_lines_all pla,
    po_vendors pv,
    mtl_system_items_b msib
    where
    pha.po_header_id = pla.po_header_id
    and pla.item_id = msib.inventory_item_id
    and pv.vendor_id=pha.vendor_id
    and msib.segment1='1020101001'
    --and pha.approved_date=max(pha.approved_date)
    group by
    --item_id.
    msib.segment1
    ,pv.vendor_name
    segment1           MAX(PHA.APPROVED_DATE)  VENDOR_NAME
    1020101001    7/21/2008 9:09:20 AM   TRIZAC  ABU DHABI
    1020101001   1/9/2011 3:16:48 PM        SAUDI CEMENT COMPANY
    1020101001   2/14/2010 4:03:46 PM     UNION CEMENT NORCEM CO.
    1020101001  5/19/2010 3:08:32 PM      AS CIMENTO SANAYI VE TICARET A.S.i require the most recent vendor_name for a particular item ( i require the output as below)
    segment1 MAX(PHA.APPROVED_DATE) VENDOR_NAME
    1020101001 1/9/2011 3:16:48 PM SAUDI CEMENT COMPANY
    kindly guide me
    thanking in advance

  • Can anyone please Tell me how to get a complete browser history including Date and TIME?

    I really need help finding out what time a website was visited that is in the browsers history. How can I get a complete browser history or set the iPhone to keep longer than a week. Is there a way to look back further than the dates shown? IOS there a app you can download that will keep track of safaris browser history and what time a site was accessed ? Thank you for your help:)

    Sorry, this just isn't possible.

  • How to get latest date

    If there are two dates for a P O and i want to get latest date how to giv the condition in select stmt.kindly ctell me pls.from EKET table.

    Hi Sameer,
    Try using this code.
    IF NOT it_ekpo[] IS INITIAL.
      SELECT ebeln
             ebelp
             etenr
             eindt
             menge
             wemng
        FROM eket
        INTO TABLE it_eket
        FOR ALL ENTRIES IN it_ekpo
        WHERE ebeln EQ it_ekpo-ebeln
        AND   ebelp EQ it_ekpo-ebelp.
      IF sy-subrc EQ 0.
        SORT it_eket BY ebeln ASCENDING
                        ebelp ASCENDING
                        eindt DESCENDING.
        DELETE ADJACENT DUPLICATES FROM it_eket COMPARING ebeln
                                                          ebelp.
      ENDIF.
    ENDIF.

  • How to get the FA completion date?

    Hello,
    What is the correct way (from screen or backend) to find the date/time on which field activity was completed? I want the completion date, not the scheduled date (ci_fa.sched_dttm).
    Thanks in advance.

    If you look at the FA Upload Staging table (CI_FA_STAGE_UP), there is a WORK_DTTM field, which is the date the work was completed, if that is the date that you want.
    If the date that you want is however the date that the status was changed to "Completed" in the system, then this is not shown anywhere, unless you have an algorithm to log status changes, like the example FWFM-FA-INT, which is used in the case of integration with another system to send outgoing messages for status change - this algorithm also has an option to add log entries to the Field Activity.

  • JTable not getting latest data (unless mouse is focussed out of the cell)

    Hi,
    I am using JDK 1.4.2. I am having a basic problem of reading the data present in a JTable.
    JTable table = new JTable(9, 9);
    JButton solveButton = new JButton("Solve");
    solveButton.addActionListener(new DumpListener(table));The dump listener just dumps the data in the table.
    I have a 6*6 jtable where each value is a number. Now i focus the mouse on say square (1,2) and enter some data, then on square (5,5) and enter data say "4". There is a button in this panel, and which on being clicked, gets the table data and does some operation on it.
    Problem is when i use the "getValueAt" API, it gives correct data for square(1,2) but not for (5,5). This is because the mouse focus is still on square (5,5). However if i focus out of square (5,5) using my mouse (to some other random square) then the data comes up properly. Am i missing something here?
    I understand it is to do with the data model getting altered only when the mouse if focussed out? But this seems to be very trivial. Is there a way of getting the data out without focusing the mouse out of the cell?

    My solution uses a JFrame instead of a JApplet.
    But I think the effect is the same.
    First of all, the setVisible(true) should be put after all components are added.
    Secondly, when you retrieve data in the table, you'd synchronized() the model.
    Thirdly, I didn't find any problem when I call stopCellEditing(). Perhaps I'm using Java 5. Anyway, please try whether the following code works.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.TableModel;
    public class DummyFrame extends JFrame {
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        DummyFrame frame = new DummyFrame();
                        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        frame.pack();
                        frame.setVisible(true);
         public DummyFrame() {
              JTable table = new JTable(9, 9);
              JButton data = new JButton("DATA");
              data.addActionListener(new SimpleButtonListener(table));
              JPanel panel = new JPanel();
              panel.setLayout(new BorderLayout());
              panel.add(table, BorderLayout.CENTER);
              panel.add(data, BorderLayout.SOUTH);
              getContentPane().setLayout(new BorderLayout());
              getContentPane().add(panel);
    class SimpleButtonListener implements ActionListener {
         JTable table;
         public SimpleButtonListener(JTable table) {
              this.table = table;
         public void actionPerformed(ActionEvent e) {
              synchronized (table) {
                   if (table.isEditing()) {
                        System.out.println("Is Editing!");
                        table.getCellEditor(table.getEditingRow(), table.getEditingColumn()).stopCellEditing();
              printArray(getData());
         String[][] getData() {
              synchronized (table) {
                   TableModel model = table.getModel();
                   synchronized (model) {
                        String[][] question = new String[9][9];
                        for (int i = 0; i < 9; i++) {
                             for (int j = 0; j < 9; j++) {
                                  question[i][j] = model.getValueAt(i,j) == null ? null : model.getValueAt(i,j).toString();
                        return question;
         void printArray(String[][] question) {
              int rows = question.length, columns = question[0].length;
              for (int i = 0; i < rows; i++) {
                   for (int j = 0; j < columns; j++) {
                        System.out.println("[" + i + ", " + j + "] -> "
                                  + question[i][j]);
    }And ... please don't forget to give me the 5 Duke dollars if it works.
    Thank you!
    Asuka Kenji (UserID = 289)
    (Duke Dollars Hunting now ...)

Maybe you are looking for

  • Importing iTunes library from an external hard drive backup

    Hi, I would like to know how I can import my iTunes library from a backup on a external hard drive? If that's possible, I would like to keep organisation of files, playlists, iphone settings... I had a crash with my previous computer and I would like

  • MobileMe Gallery and iPhoto 11

    Before, (iphoto 9), I can upload, view, play slide shows with photos in my MobileMe gallery very quickly. But with iphoto 11, it is forever pending, pending, pending... what did I do wrong?

  • Eco on sound

    I have asked this question before. I am getting an eco on sound which is driving me up the wall I know there is a way to change the sound output but cannot remember how to do it I seem to remember you could choose between things like stadium, theatre

  • Ipod 4th gen

    My Ipod touch 4th gen will Sync but it will not add songs what do I do?

  • I have error in call report

    hi every body i need help in report9i after i was write all code to call report after call report this error comming 'FRM-41213:Unable to connect to the report server rwservlet