Insert ITAB INDEX SY-TABIX Problem

Hi Experts,
I have a problem in my report.
Please look into the code.
loop at li_basez980.
   read table i_z980 with key spmon = l_spmon
                              matnr = li_basez980-matnr
                              kunnr = li_basez980-kunnr
                              werks = li_basez980-werks
                              vkorg = li_basez980-vkorg binary search.
   if sy-subrc ne 0.
     i_z980-spmon = l_spmon.
     i_z980-matnr = li_basez980-matnr.
     i_z980-kunnr = li_basez980-kunnr.
     i_z980-werks = li_basez980-werks.
     i_z980-vkorg = li_basez980-vkorg.
     i_z980-basme = li_basez980-basme.          " 8/6/07
     i_z980-waers = c_waers.
     i_z980-cpudt = v_datum.
     i_z980-cputm = v_uzeit.
     i_z980-znetsalekg = 0.
     i_z980-znetsalevl = 0.
     insert i_z980 index sy-tabix.
     clear  i_z980.
   endif.
endloop.
When run my report in Foreground it runs fine. But when i run the same report in Background job gets cancelled when the index reaches to 228984 once 230070 once and 230104 once at insert statement i.e " insert i_z980 index sy-tabix." . I found this  by debugging the Job.
Please help me if you know the solution.
Regards,
Ravikumar P
Edited by: Ravikumar P on Mar 30, 2010 4:40 PM

Hi,
This is happening because after read you inserting the records when sy-surbc <> 0. At that time did you check the sy-tabix value. This value is comming correctly. You directly append the same.
loop at li_basez980.
read table i_z980 with key spmon = l_spmon
matnr = li_basez980-matnr
kunnr = li_basez980-kunnr
werks = li_basez980-werks
vkorg = li_basez980-vkorg binary search.
if sy-subrc ne 0.
i_z980-spmon = l_spmon.
i_z980-matnr = li_basez980-matnr.
i_z980-kunnr = li_basez980-kunnr.
i_z980-werks = li_basez980-werks.
i_z980-vkorg = li_basez980-vkorg.
i_z980-basme = li_basez980-basme. " 8/6/07
i_z980-waers = c_waers.
i_z980-cpudt = v_datum.
i_z980-cputm = v_uzeit.
i_z980-znetsalekg = 0.
i_z980-znetsalevl = 0.
insert i_z980 index sy-tabix.
clear i_z980.
endif.
endloop.

Similar Messages

  • Why "Modify itab index sy-tabix." makes internal table content blank?

    We have an internal table itab which looks like to have the following content:
    A---B---C
    1----3----
    2----2----
    We would like to get the column C value in this internal table itab by summing Column A and Column B, and then fill C column values into this internal table. We know that the program would looks like:
    Loop at itab into wa_itab.
        wa_itab-C = wa_itab-A + wa_itab-B.
        Modify itab index sy-tabix.
    EndLoop.
    But after executing the above code, all itab becomes blank. Through debugging, find it's caused by the statement "Modify itab index sy-tabix.".  Could any ABAP expert here let us know the reason and we will give you reward points!

    hi,
    what you tried is correct.but instead of using
    modify itab index sy-tabix
    use
    modify itab index sy-tabix from wa_itab.
    the reason for blank data is you are not mentioning from where that record is to be updated.your specifying the record using index.one thing is no need to use index also because in a loop you are modifying so automatically it will take you to the record.
    try the following code.
    types:begin of it,
         a type i,
         b type i,
         c type i,
         end of it.
    data:itab type standard table of it.
    data:wa_itab type it.
    wa_itab-a = 3. wa_itab-b = 4.
    append wa_itab to itab.
    Loop at itab into wa_itab.
        wa_itab-C = wa_itab-A + wa_itab-B.
    Modify itab index sy-tabix from wa_itab.
    *you can use Modify itab from wa_itab.
    EndLoop.
    loop at itab into wa_itab.
    write:wa_itab-a,wa_itab-b,wa_itab-c.
    endloop.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 5:49 PM

  • Sy-tabix problem

    Hi,
    i am modifying a internal table in which i am using this statement :-
    MODIFY T_DD FROM W_DD INDEX SY-TABIX
    and the work area is further used to insert the data base table . i just want to know that is this the correct way to modify the internal table bcoz when i execute the program for updating the database it is hardly taking 1 minute  to get updated and i think the problem lies in the above statement.
    Please provide me guidelines to sove this problem.

    Hi,
    Refer below code
    LOOP AT it_crmm_territory INTO wa_crmm_territory.
            l_index = sy-tabix.
            CLEAR : wa_crmm_territory_v.
            READ TABLE it_crmm_territory_v INTO wa_crmm_territory_v WITH KEY terr_guid = wa_crmm_territory-terr_guid.
            IF sy-subrc EQ 0.
              wa_crmm_territory-valid_from = wa_crmm_territory_v-valid_from.
              wa_crmm_territory-valid_to   = wa_crmm_territory_v-valid_to.
              wa_crmm_territory-guid       = wa_crmm_territory_v-guid.
            ENDIF.
            MODIFY it_crmm_territory FROM wa_crmm_territory INDEX l_index
                                          TRANSPORTING guid valid_from valid_to.
            CLEAR : wa_crmm_territory.
          ENDLOOP.
    Regards,
    Prashant

  • Difference between sy-index & sy-tabix

    Dear friends,
    Please tell me the difference between sy-index & sy-tabix
    Actually my problem is i don't know how to compare for example between first record'field n and second record'field n when u r in loop so i can take particular action based on result
    on current recor
    if possible send me sample code.
    Regards;
    Parag Gavkar.

    SY-TABIX:
    Current line in an internal table. With the following statements SY-TABIX is set for index tables. With hashed tables, SY-TABIX is not filled or it is set to 0.
    - APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.
    - COLLECT sets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.
    - LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.
    - READ TABLE sets SY-TABIX to the index of the table row read. If no row is found with binary search while reading, SY-TABIX contains the index of the next-highest row or the total number of rows +1. If no row is found with linear search while reading, SY-TABIX is undefined.
    - SEARCH itab FOR sets SY-TABIX to the index of the table row, in which the search string was found.
    SY-INDEX:
    SY-INDEX contains the number of loop passes in DO and WHILE loops, including the current loop pass.
    Regards,
    Santosh

  • Conflict: READ TABLE itab2 INDEX 1 vs  Modify itab1 from index sy-tabix

    The below simple code is for each itab1 line, create a new itab2 by using select statement, and then grab the max value of field f in itab2 and fill it into a corresponding field in itab1.
    However the statement:
    READ TABLE itab2 into gs_itab1 INDEX 1.
    causes the conflict with our another statement in the end of itab1 loop:
    Modify itab1 from gs_itab1 index sy-tabix.
    that the below Modify statement always modify itab1 at 1st row and also causes an unlimited loop that the program is hung up. Our code looks as the following:
    Loop AT itab1 into gs_itab1.
             use Select statement to fill in itab2...
             SORT itab2 BY f DESCENDING. "f is a field of itab2
             READ TABLE itab2 into gs_itab1 INDEX 1.
             Modify itab1 from gs_itab1 index sy-tabix.
    EndLoop.
    However the last two lines of statements in the itab1 loop causes the program hang!
    Any solution?
    Thanks in advance!

    Hi,
    I got confused while going thru the code...
    according to code
    first u loop itab1 and get tht in gs_itab1 and then a select query to get data from some table and store in itab2.
    Here are u using any where condition, if yes u may probably check aganst gs_itab1 rite? if yes
    first suggestion...why cant u put the select statement above the loop and get all the values to an internal table and then read the internal table in the loop stmt. Yes i can see u r sorting it based on some 'f'..just a suggestion
    Now here can u follow this code...
    Loop AT itab1 ASSIGNING <fs_itab1>,
             use Select statement to fill in itab2...
             SORT itab2 BY f DESCENDING. "f is a field of itab2
             READ TABLE itab2 into <fs_itab1> index 1.
    EndLoop.
    Please let me know if its not ok
    <REMOVED BY MODERATOR>
    Regards,
    ABAPer007
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 12:26 PM

  • INDEX vs TABIX

    Hi,
    Can some body explain the CLEAR difference between Sy-index and Sy-tabix. And one or two small examples. I am little bit confused.
    Thanx.

    Hi,
    SY-INDEX
    In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    SY-TABIX
    Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    regards,
    madhu

  • Sy-index sy-tabix

    can any body tell me diff bw sy-tabex and sy-index. pls

    SY-INDEX
    In a loop, a statement block is executed several times in succession. There are four kinds of loops in ABAP:
    Unconditional loops using the DO statement.
    Conditional loops using the WHILE statement.
    Loops through internal tables and extract datasets using the LOOP statement.
    Loops through datasets from database tables using the SELECT statement.
    This section deals with DO and WHILE loops. SELECT is an Open SQL statement, and is described in the Open SQL section. The LOOP statement is described in the sections on internal tables and extract datasets.
    Unconditional Loops
    To process a statement block several times unconditionally, use the following control structure:
    DO [<n> TIMES] [VARYING <f> FROM <f1> NEXT <f 2>].
      <Statement block>
    ENDDO.
    If you do not specify any additions, the statement block is repeated until it reaches a termination statement such as EXIT or STOP (see below). The system field SY-INDEX contains the number of loop passes, including the current loop pass.
    SY-TABIX
    You can use the LOOP statement to process special loops for any internal table.
    LOOP AT <itab> <result> <condition>.
      <statement block>
    ENDLOOP.
    This reads the lines of the table one by one as specified in the <result> part of the LOOP statement. You can then process them in the statements within the LOOP... ENDLOOP control structure. You can either run the loop for all entries in the internal table, or restrict the number of lines read by specifying a <condition>. Control level processing is allowed within the loop.
    The sequence in which the lines are processed depends on the table type:
    Standard tables and sorted tables
    The lines are processed according to the linear index. Within the processing block, the system field SY-TABIX contains the index of the current line.
    Hashed tables
    As long as the table has not been sorted, the lines are processed in the order in which you added them to the table. Within the processing block, the system field SY-TABIX is always 0.

  • Problem inserting data into database (increment problem)

    I have a servlet page that gets various data from a bean and executes multiple SQL statements to store this data. Beacuase i want to insert data into a number of tables that are related with a one to many relationship I am not using the auto increment function in mySQL. Instead i have created a counter bean that increments each time the servlet is involked. I am using this counter to set the primary key ID in the quesiton table that i insert data into and I am alos inserting it into another table as a foreign key which relates a number or records in the outcomes table to one record in the question table. I am havin a few problems getting it to work.
    Firstly the bean counter works but when the tomcat server is shutdown the counter is reset which will cause conflicts in the database no doubt and secondly even though i have not shut my server down i seem to be getting the following error saying there is a duplicate key even though there is no data in the database.
    Here is the exception.
    javax.servlet.ServletException: Duplicate entry '4' for key 1     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:469)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: Duplicate entry '4' for key 1
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)     com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1366)     com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:952)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1974)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1897)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1758)     org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:140)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    My code is here
    // gets the feedback string parameters
         if(request.getParameterValues("feedbackBox") != null)
                   String[] feedbackList = request.getParameterValues("feedbackBox");
                   questionData.feedback = feedbackList;
         //gets the session username variable
         String insertQuestion1__username = null;
         if(session.getValue("MM_Username") != null){ insertQuestion1__username = (String)session.getValue("MM_Username");}
         //Creates a new mySQL date
         java.sql.Date currentDate = new java.sql.Date((new java.util.Date()).getTime());
         //goes thorugh each element of the scores array and calculates maxScore 
         questionData.maxScore = 0;
         for (int i = 0; i < questionData.scores.length; i++) {
                   questionData.maxScore = questionData.maxScore + questionData.scores;
         //increments count;
         synchronized(page) {
    appCounter.increaseCount();
         int counter = appCounter.count;
         Driver DriverinsertQuestion = (Driver)Class.forName(MM_connQuestion_DRIVER).newInstance();
         Connection ConninsertQuestion1 = DriverManager.getConnection(MM_connQuestion_STRING,MM_connQuestion_USERNAME,MM_connQuestion_PASSWORD);
         questionData.numOutcomes = questionData.choices.length;
         while (counter != 0)
              int questionID = counter;
              PreparedStatement insertQuestion1 = ConninsertQuestion1.prepareStatement("INSERT INTO Question.question (Question_ID, Topic_ID, Description, Image, Author, Created_Date, Max_Score, Question_Type) VALUES (" + questionID + ", '" + questionData.topicID + "', '" + questionData.questionText + "', '" + questionData.questionImage + "', '" insertQuestion1__username "', '" + currentDate + "', " + questionData.maxScore + ", '" + questionData.questionType + "') ");
              insertQuestion1.executeUpdate();          
         Driver DriverinsertQuestion2 = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertQuestion2 = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         PreparedStatement insertQuestion2 = ConninsertQuestion2.prepareStatement("INSERT INTO Answer.question (Question_ID, Question_Description, Question_Type, Topic, Number_Outcomes, Question_Wording) VALUES ('" counter "', '" questionData.questionLabel "', '" questionData.questionType "', '" questionData.questionType "', '" questionData.topicID "', '" questionData.numOutcomes "', '" questionData.questionText "' ) ");
         insertQuestion2.executeUpdate();
         Driver DriverinsertOutcomes = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertOutcomes = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         for (int i=0; i < questionData.numOutcomes; i ++)
         PreparedStatement insertOutcomes = ConninsertOutcomes.prepareStatement("INSERT INTO Answer.outcome (Question_ID, Outcome_Number, Outcome_Text, Score, Feedback) VALUES ( '" counter "', '" i "', '" +questionData.choices[i]+ "', '" +questionData.scores[i]+ "', '" +questionData.feedback[i]+ "' ) ");
         insertOutcomes.executeUpdate();
    Does anyone know where i am going wrong or how to fix this problem. I would like to know wheter i am doing this the right way. Is thjis the most practical way to use a counter bean or is there a better safer way to do it.
    Suggestions would be mcuh appreciated
    Thanks

    hi Narendran,
        i declared itab as follows
    DATA:      tb_final TYPE STANDARD TABLE OF ztable,
                       wa_final TYPE ztable.    "work area
    i am populating tb_final as follows:
                 wa_final-vkorg = wa_ycostctr_kunwe-vkorg.
                  wa_final-vtweg = wa_ycostctr_kunwe-vtweg.
                  wa_final-spart = wa_ycostctr_kunwe-spart.
                  wa_final-kunwe = wa_ycostctr_kunwe-kunwe.
                  wa_final-kondm = wa_ycostctr_kunwe-kondm.
                  wa_final-kschl = wa_ycostctr_2-kschl.
                  wa_final-hkont = wa_ycostctr_2-saknr.
                  wa_final-kostl = wa_ycostctr_kunwe-kostl.
            APPEND wa_final TO tb_final.
                  CLEAR wa_final.
    here i am not populating Mandt field.
    finally in tb_final am not getting the proper data .
    kindly help me.
    Thanks,
    Praveena

  • Sy-index / sy-tabix wrong within loop

    Hi friends,
    i do a loop over a a table and am writing out the field contents like this:
    LOOP AT <dyn_table> INTO <dyn_wa>.
            do.
          assign component sy-index
             of structure <dyn_wa> to <dyn_field>.
            if sy-subrc <> 0.
             EXIT.
            else.
    * Here it gets the name of the field based on the sy-index of the component
            READ TABLE l_tab_fields INTO w_tab_fields INDEX sy-index.
          endif.
      ENDLOOP.
    What now doesnt work is, that whenever i have the read statement uncommented the loop doesnt increment so i only get the first row but that n-times.
    any idea where the error is  ?
    thank you! i am awarding points generously

    LOOP AT <dyn_table> INTO <dyn_wa>.
            do.
          assign component sy-index
             of structure <dyn_wa> to <dyn_field>.
            if sy-subrc <> 0.
             EXIT.
            else.
    Here it gets the name of the field based on the sy-index of the component
            READ TABLE l_tab_fields INTO w_tab_fields INDEX sy-index.
          endif.
      ENDLOOP.
    If i gt you rite..i would suggest this
    Data: l_tabix type sy-tabix.
    LOOP AT <dyn_table> INTO <dyn_wa>.
      l_tabix - sy-tabix.
          assign component l_tabix
             of structure <dyn_wa> to <dyn_field>.
            if sy-subrc <> 0.
             EXIT.
            else.
    Here it gets the name of the field based on the sy-index of the component
            READ TABLE l_tab_fields INTO w_tab_fields INDEX l_tabix.
          endif.
      ENDLOOP.
    santhosh

  • Read table index sy-tabix

    Hi Experts,
    As per my requirment I need fetch two different categories of matnr based on movment type
    from mseg..
    For eg: If I have two itab's : itab1 and itab2.
    In itab1 the available records are:    
    matnr    werks     lifnr
    mat1     unit1      ABC
    mat2     unit1      ABC
    mat3     unit1      ABC
    mat4     unit1      ABC
    In itab2 the available records are:  
    matnr_1  werks_1  lifnr_1
    mat5       unit1       ABC
    mat6       unit1       ABC
    mat7       unit1       ABC
    mat8       unit1       ABC
    and I want to move this itab1 and itab2 to another itab ie. itab3.
    and my o/p shud look like:
    matnr    werks     lifnr     matnr_1
    mat1     unit1     ABC     mat5
    mat2     unit1     ABC     mat6
    mat3     unit1     ABC     mat7
    mat4     unit1     ABC     mat8.
    Please advice
    Karthik
    Edited by: Karthik R on Jun 18, 2009 6:33 PM

    Hi Suhas,
    Thanks a lot !! Ur logic is working.. but I have some other problem now:
    ie. If in itab 1 I have
    matnr    werks     lifnr
    mat1     unit1      ABC
    mat2     unit1      ABC
    In itab2 the available records are:
    matnr_1  werks_1  lifnr_1
    mat5       unit1       ABC
    mat6       unit1       ABC
    mat7       unit1       ABC
    mat8       unit1       ABC
    I want my o/p as :
    matnr    werks     lifnr    matnr_1
    mat1     unit1      ABC    mat5
    mat2     unit1      ABC    mat6
                               mat7
                               mat8.
    But as per ur logic I got the o/p as:
    matnr    werks     lifnr    matnr_1
    mat1     unit1      ABC    mat5
    mat2     unit1      ABC    mat6
    Please advice
    Karthik
    Edited by: Karthik R on Jun 18, 2009 7:07 PM
    Edited by: Karthik R on Jun 18, 2009 7:08 PM

  • Index Statistics Update - Problem

    We had performance problem yesterday with FI report FAGLL03, it timed out in online execution and in background mode it took 5000+ sec to execute. Result was no more than 100 records.
    Later with some investigation problem drill down to index usage of table FAGLFLEXA. We then updated the index statistics of table from DB02. After that report worked fine with execution time of 10-15 sec for same set of input.
    However user, in morning , was complaining again about performance problem with same report FAGLL03. We did that update index statistics again and as it was the case yesterday it fixed the problem.
    Later today I checked SQL server the job SAP CCMS_xxx_xxx_Update_Tabstats, which I guess is updating index statistics daily at 0400 hours, is working fine. I can't see any error log there. Daily job to check database consistency is also not reporting anything.
    Anyidea what could be going wrong.
    Basis Consultants are looking into problem however I am putting this case here if anyone of you had same problem and fixed it.
    Thanks,
    Pawan.
    Edited by: Pawan Kesari on Dec 11, 2009 4:05 PM

    Hi,
    Appears the stats are dropped eveytime the job runs @04:00
    Have a look at the table DBSTATC in trx: DB21 to see if it's setup to dropped the stats..
    Mark

  • Inserting JavA Class in sql,problems with import

    hi i am trying to insert java class in the database
    create or replace and compile java source named AppelCommande as
    import client.AppelClient;
    public class Run
    * Creates a new instance of Run
    public static String Run(String cmd) {
    AppelClient AC = new AppelClient();
    return AC.AppelCmd(cmd);
    it gives me the following error
    Class client.AppelClient not found in import.
    i can compile this java code alone and i added client.jar in the classPath
    so there must be some configuration in the database to make it work
    thank you for your help

    thx for the reply
    i did try to load the classes in the database but i seem to have a problem somewhere
    i am using webservices and there are too many libraries to add so i added the rt.jar in java and i am getting the following error
    ORA-29545: badly formed class: User has attempted to load a class (java.math.MathContext) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...

  • Inherited JPanels inserted to GridLayout - panel size problem

    Hello,
    I'm not sure if I implemented it correctly, however I'm trying to have different-sized JPanels inserted to GridLayout. JPanels are inherited from base JPanel class. Shortly:
    public class CMyBasePanel extends javax.swing.JPanel
    public class CPanelBig extends CMyBasePanel
        this.setLayout(null);
        this.setPreferredSize(new java.awt.Dimension(642, 138));
    public class CPanelSmall extends CMyBasePanel
        this.setLayout(null);
        this.setPreferredSize(new java.awt.Dimension(642, 50));
    }and I'm trying to insert them that way:
    int numPanels = this.panels.size();    // Vector of CMyBasePanel
    jPanelSteps = new JPanel();
    jPanelSteps.setLayout(new GridLayout(numPanels, 1));
    for (int i = 0; i < numPanels; i++)
        CMyBasePanel onePanel = (CMyBasePanel)this.panels.get(i);
        jPanelSteps.add(onePanel);
    jScrollPaneSteps.setViewportView(jPanelSteps);
    jScrollPaneSteps.revalidate();
    jScrollPaneSteps.repaint();This method shows created panels correctly, but the panel height is constant for all panels, even if they have different Dimensions set in the constructor.
    Full case can be downloaded here: http://slajerek.demon.pl/others/bugs/JPanelInheritProblem.tar.gz
    After starting the case just right click on empty space to show popup menu and add two different panels, size of already added panels is changed respectively (add 10 small panels, and then big one). Java version: Java(TM) SE Runtime Environment (build 1.6.0_02-b05), Linux
    is this a bug or bad implementation? I thought that if I change one of the parameters in the inherited class I'm not changing the base class. For me it seems that the panel size is declared "static"? how to avoid this problem and have different heights for panels?

    yea GridLayout resizes components to fit in the grid, where all the grids are the same size. So if you have one big component in a grid, then the components in the other grid will be resized i believe.

  • Spotlight Indexing still a problem

    I have read several threads on this and have tried a number of fixes including adding hard drive to privacy section in Spotlight system preferences and then forcing re-index by removing the HD from the privacy section, removing the import filters from the Spotlight prefs, and running OnyX utilities. Spotlight still will not finish indexing. It begins, shows time remaining, counts down (24 mins, 17 mins, 9 mins, etc) and then just stalls before finishing. I have left it for 2 days and it never finishes. In order to free-up the processor, I have disabled indexing now by putting HD in the privacy section, but would really like to be able to use Spotlight. Any ideas?

    I followed your suggestion and if I understand correctly, that just disabled indexing and serching for the root drive. I no longer had Spotlight serch ability. I then went back into Terminal and typed:
    sudo mdutil -i on /
    This re-enabled Spotlight, but still have the never-ending indexing problem. If it is in fact a corrupt index, how can I delete the index and create a new fresh one. Is it possible that the index is fine and there is a corrupt file that Spotlight is trying to index? If so, how to find it?

  • Premiere CS6 Indexing and Pending Problems - HELP!

    Gentlemen,
    Any help you can offer on this would be terrific.
    The problem is.....I have begun editing a feature in CS5, we set up a different project for each scene, 48 in total. Then upgraded to CS6.
    When I open the projects in CS6, some of them work fine. However, most of them don't, and they have the same problems, which are;
    1. All the media doesn't load. The status bar in the bottom left tells me there is xx "Remaining" (See Pic)
    2. The files don't index. Above the project window the message "Items to Index XX" appears.
    However, when I save one of these incomplete projects in CS6 and then open it in CS5, there are no problems. My scratch disks for 5 and 6 are the same.
    I've searched and searched and this appears to be a common fault, but I can't find a solution that works for me. I've tried the following;
    1. Uninstalling and re installing Premiere
    2. Updating to 6.0.3
    3. Cleaning media Cache
    4. Replacing the missing files and then reloading
    5. Temporarily removing all the preview files
    6. Leaving a project open for 16 hours to see if it slowly indexes
    None of this works. If anyone has the answer I would be very gratefull, I don't really want to restart 48 projects and I don't really want to go back to CS5, as CS6 is much better for the Matrox system.
    I'm using MXF footage, from P2, 720p. I have noticed that this problem doesn't occur with projects that use other footage types.
    My system is.....
    Windows 7 Pro 64bit
    8gb Ram
    Many Thanks in advance for any help you can offer.

    Thanks Jim,
    just tried that.....unfortunatley no luck.

Maybe you are looking for