Sap.m.Table generating first two blank rows after adding more rows.

Hi everyone,
                      I am stucked in a very bad condition the problem is with the table rows and columns. I am generating dynamic table columns and rows based on searched unit so whenever i am searching i created a function for initializing the table rows and columns i am looping the array for whatever the size of rows and columns it will display up to 5. My issue is with the request going is adding more times then the required one. So if anyone can check for the solution. Only problem is my data is generated correct but next time i call this method again it is hiding the first 2 rows.
function initializeGrid() {
    if (SHOPFLOOR_DCS_UNIT_KEY != null) {
        var dcsComboBox = sap.ui.getCore().byId("selectDCSName");
        var dcsName = dcsComboBox.getValue();
        var viewData = {};
        viewData.EntityName = "DataCollectionSetAttribute";
        viewData.Condition = [{ColumnName : "DcsName",Value :dcsName}];
        viewData.Projection = {AttributeName:true,AttributeType:true,Length:true,Precision:true,LowerLimit:true,
                UpperLimit:true,DefaultValue:true };
        $
        .ajax({
            type : "POST",
            url : "/demo/xsds/designer/SelectByQueryService.xsjs",
            contentType : "application/json",
            data : JSON.stringify(viewData),
            dataType : "json",
            success : function(data) {
                /*dcDataTable.unbindItems();
                dcDataTable.removeAllItems();
                dcDataTable.removeAllColumns();*/
                var dcsCols = data;
                if (data != null
                        && data.length > 0) {
                    var firstColumn = [{
                        "AttributeName": "SerialNumber",
                        "ModifiedAttributeName": "SerialNumber"
                    for (var index = 0; dcsCols.length > index; index++) {
                        var currentRow = dcsCols[index];
                        if (currentRow.AttributeName != null
                                && currentRow.LowerLimit != null
                                && currentRow.UpperLimit != null) {
                            dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                            + "["
                                + currentRow.LowerLimit
                                + " - "
                                + currentRow.UpperLimit
                                + ","
                                + "Def:"
                                + currentRow.DefaultValue
                                + "]";
                            firstColumn
                            .push(dcsCols[index]);
                        } else if (currentRow.AttributeName != null) {
                            dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                            + "["
                                + "Def:"
                                + currentRow.DefaultValue
                                + "]";
                            firstColumn
                            .push(dcsCols[index]);
                        if (currentRow.AttributeType != null
                                && currentRow.AttributeType == "LocalDate")
                            dateAttributes[dateAttributes.length] = currentRow.AttributeName;
                    dcsCols = firstColumn;
                    runtimeDCS = dcsCols;
                    console.log("dcsCols", dcsCols);
                    var viewData = {};
                    viewData.EntityName = dcsName;
                    viewData.Cmd="GET";
                    viewData.UnitKey=SHOPFLOOR_DCS_UNIT_KEY;
                    $.ajax({
                        type : "POST",
                        url : "/demo/xsds/designer/AddOrRemoveDCSDataService.xsjs",
                        contentType : "application/json",
                        data : JSON.stringify(viewData),
                        dataType : "json",
                        success : function(data) {
                            console.log("dcsVals"+
                                    JSON.stringify(data)+data.length);
                            dcDataTable.removeAllColumns();
                            for (var i = 0; i < data.length; i++) {
                                for (key in data[i]) {
                                    var textValue = data[i][key];
                                    if (typeof textValue !== "object"
                                            && typeof textValue === "string"
                                            && textValue
                                            .indexOf("/Date(") > -1) {
                                        var startIndex = textValue
                                        .indexOf("(");
                                        var endIndex = textValue.indexOf(")");
                                        var tempValue = textValue.substring(startIndex + 1,endIndex);
                                        var tempDate = new Date(parseInt(tempValue));
                                        data[i][key] = tempDate.toDateString();
                            dcsModel.setData({dcsRows : data});
                            sap.ui.getCore().setModel(dcsModel);
                            var columnList = new sap.m.ColumnListItem();
                            dcDataTable.bindItems({
                                path: "/dcsRows/",
                                template: columnList,
                            for (var i = 0; i < dcsCols.length && i<5; i++) {
                                dcDataTable.addColumn(new sap.m.Column({
                                    header : new sap.m.Label({
                                        text : dcsCols[i].ModifiedAttributeName
                                columnList.addCell(new sap.m.Text({
                                    text : {
                                        path : dcsCols[i].AttributeName
                            clearItems();
                        },error : function(response) {
                            console.log("Request Failed==>",response);
                            if (response.responseText.indexOf('<html>') == -1)
                                console.log(JSON.stringify(response.responseText));
                            else
                                console.log("Invalid Service Name");
            },error : function(response) {
                console.log("Request Failed==>",response);
                if (response.responseText.indexOf('<html>') == -1)
                    console.log(JSON.stringify(response.responseText));
                else
                    console.log("Invalid Service Name");
    else {
        console.log("Data not found!!!");

No, even with the select box gone the table still doesn't show the last two rows, so this seems indeed be irrelevant to the question.
Best Regards,
S.
***update***
I tried to create a simple case in which the same strange behavior occurs but I can't seem to reproduce it. The table that produces the two blank rows is part of a complex application and I tried to extract enough of it for a simple test case that behaves the same way but I can't manage to do that. I guess that once I have the behavior I will also know what causes it.
It seems that the iterator is set to rangesize 10 but the table rests on rangesize 12, when I looked at other tables in the application it seems that if I want to set the rangesize from 57 to 50, it remains on 57.
Can anyone help me with either this limited info or otherwise instruct me to get more info ?
Best Regards,
S.
Edited by: matdoya on Dec 1, 2008 5:51 AM

Similar Messages

  • EDIT method doesn't work after adding new row

    I would like to start editing after adding new row into TableView.
    I copied example from Oracle website: [Using JavaFX UI Controls - 13 Table View|http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJAGDAHE]. Then I put additional button for adding new row and define action for the button.
        final Button addButton = new Button("Add");
        addButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent arg0) {
                Person p = new Person("", "", "");
                table.getItems().add(p);               
                table.getSelectionModel().select(p);
                table.edit(table.getSelectionModel().getSelectedIndex(), table.getColumns().get(2));
        });In result I can see selected new row but the table doesn't start edditing in the third column.
    I have similar method for editing existing rows and it works properly.
        final Button editButton = new Button("Edit");
        editButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent arg0) {
                table.edit(table.getSelectionModel().getSelectedIndex(), table.getColumns().get(2));
        });Could you help me what I do wrong?

    Try wrapping the setCaretPosition(...) method in a SwingUtilities.invokeLater(...)
    caret=outputArea.getDocument().getText(0,outputArea.getDocument().getLength()).length();Should be:
    caret = outputArea.getDocument().getLength();

  • Warning  Query has exceeded 200 rows. Potentially more rows exist...

    Hi all,
    I am getting a following warning message on every page.
    Query has exceeded 200 rows. Potentially more rows exist, please restrict your query.
    In my code whatever VO i am using doesnt fetch more than 50 records still I am getiing warning as Query exceeded 200 rows.
    Even on helloWorld Page from Tutorial.jpr also I am getting the same warning.
    Any suggestions , how to remove it.
    Thanks and Regards,
    Anant.

    Its an oracle instance system profile. It will be in effect whether you are testing the page from jdev or the instance.
    --Shiv                                                                                                                                                                                                                                                                   

  • Warning - Query has exceeded 200 rows. Potentially more rows exist, please

    Hi Guys
    I am really stuck on this one did a snoop in the forum to find what the problem may be but have found nothing that can help me.
    I get the following error on my pages.
    I am using 11.5.10
    Warning - Query has exceeded 200 rows. Potentially more rows exist, please restrict your query.
    I had originally created a page and a view object with the relevent app module... and it was givin me the error. so what i did was delete the project
    created a page and just the app module with no view objects
    there is nothing on the page.. just that the page is linked to the app module via app module instance option.
    still givin the error
    i change the profile option for personal view object retrieval to 10 and still no avail..
    the message just change from
    Warning - Query has exceeded 200 rows. Potentially more rows exist, please restrict your query.
    to
    Warning - Query has exceeded 10 rows. Potentially more rows exist, please restrict your query.
    i have changed the max fetch size as well as the fetch size to limit the query..
    i have changed the max fetch size via code and setmaxfetchsize(1) via code on iniziliation..
    PLEASE HELP?>>>

    Hi George,
    What do you mean by, when you claim that the page still runs without your VO (i.e. Just the PG & AM)? Does it means that your webBeans in the page that references the VO Attributes, still comesup with no issues like (VO not found)?
    If yes, then your jdev. project is picking up the VO xml/class files else where from your classpath. Please check your classpath settings and library settings to see where the old file is still available.
    HTH.

  • Is there a way to bypass the first two inspection block after first cycle in Vision builder AI?

    I want to inspect the C-C of a matrix of holes (holes side by side). But when I do re-cycle the routine, the hole #'s change location (not in same place twice) and the my C-C are all not side by side and all over the place. For example, diaganal 4 holes away, etc...

    laj,
    I'm not sure that I completely understand the question that you are asking in your post. You may want to repost your question with some additional information and explanation to allow this forum to help you more effectively.
    As for the question that you posed in the title of your email, can you bypass the first two steps of your Vision Builder for Automated Inspection (VBAI) script? The answer is unfortunately no. VBAI is designed to repeatedly run through the same script and does not allow only a portion of the script to run.
    If you need more control over your application than VBAI can provide, you may need to move a programming language like LabVIEW, which will allow for lower level decision making.
    Please post a follow up if you have any additio
    nal information you would like to add, or have additional questions.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments

  • SAP BPC 10.0 Web Client Blank Screen after login

    Hi ALL,
    We are using SAP BPC 10.0 Web Client with Adobe Flash Player 13.0.0.214 with IE 9.0 on Windows 7.0.
    We face strange error where on only on certain PC, the BPC web client working.. On other getting Blank/Blank Screen after login (with "movie not loaded" on the adobe flash player).. Both PCs are having the same setting.
    Even one of PC which previously working, starting this week suddenly getting the same error.. I have created OSS message and got feedback with also share this problem on this forum.
    I have done several actions as mentioned on several SAP notes )1624267, 1664889, 1681147, 1694871, 1752971, 1798336, 1804221, 1806371, 1811218, 1820505, 1918631, 1968584), but still no luck..
    If you have the same issue, kindly share..
    Thanks and regards,
    Hery

    Yes .. Compatibility View also checked.. in several PCs, it is working well. both failed and working PCs have the same setting.
    Just found another weird: in one working PC, 2 different windows local-admin users login to the same PC for BPC-web and getting different result (1 Ok ; 1 failed) ..seems it is related with the user profile and login-domain servers (we have multiple login-domain servers with load balancing mechanism).
    Thanks and regards,
    Hery

  • Adding more rows in a html table(enclosed inside a jsf tabbed pane)

    hi,
    i m facing a problem. i have a html Table inside a jsf Tabbed Pane and a button to add more rows.whenever i click on the button it should add 5 more rows to the table using javscript.
    can anyone hlp me in solving this problem.
    thankx in advance

    Use the elegant JSF h:dataTable instead of plain HTML table with a heap of DOM stuff.

  • Blank page after adding portlet from sample provider

    Hi All,
    Homepage not appearing after Login, tried adding Sample portlet to HomePage!
    I managed to configure and register the JPDK's Sample portlet provider as per the installation instructions.After configuration i tried the URL "http://yourserver/servlets/sample" and i got "Congratulations! You have successfully reached your Provider's Test Page"
    Then tried to add a sample portlet (Hellow Worls portlet) to one of the regions of the my homepage using the Navigator.
    Now, I'm not able to navigate to the home page after logging in from the portal Welcome page.
    I'm just seeing a blank page after login.
    This is the error i got in jserv.log file
    page/Unexpected exception in servlet
    java.lang.Exception: Invalid meta-data found in ProviderData process 4
         at oracle.webdb.page.ProviderData.parse(ProviderData.java, Compiled Code)
         at java.lang.Exception.<init>(Exception.java, Compiled Code)
         at oracle.webdb.page.ProviderData.parse(ProviderData.java, Compiled Code)
         at oracle.webdb.page.DataProcessor308.generatePage(DataProcessor308.java, Compiled Code)
         at oracle.webdb.page.DataProcessor308.process(DataProcessor308.java:2658)
         at oracle.webdb.page.PageBuilder.process(PageBuilder.java:684)
         at oracle.webdb.page.ParallelServlet.doGet(ParallelServlet.java:89)
    How can view the sample portlets from my home page?
    Any help would be greatly appreciated.
    Sapna

    Yes. I selected yes to Require Proxy .
    But no use. Where i'm doing wrong.
    Under Proxy settings in Global seeting i've given the following info.
    HTTP Server : alpha
    HTTP Server :80
    No Proxy Servers for Domains beginning with ALPHA
    URL Connection Time-Out (seconds) :0
    and in the provider edit page i set Require Proxy to 'YES'
    Thanks in advance
    Sapna

  • Count not updating when counting table rows (after adding one)

    following this code from this link:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/479cbc96-6ec2-4d9f-b2f8-a2b43a09111e/html-client-dynamically-count-records-in-a-collection-on-browse-screen?forum=lightswitch
    I have got my screen to count how many rows are present when the screen first loads. In my scenario I have a add button located on the bottom navigation bar. this opens up a dialog window where the user can add the relevant information. However when the
    user hits save, and is navigated back to the browse screen, the count still displays the previous value. If i was to refresh the page it updates but this is not what i am after, when i navigate back i want the value to add by one, am i missing something in
    this code?
                screen.ExpanderLines.addChangeListener("state", function() {
                        screen.countExp = screen.ExpanderLines.data.length;
    thanks for any help

    Try this:
    screen.ExpanderLines.addChangeListener("count", function () {
    screen.countExp = screen.ExpanderLines.count;
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • Two sorted lists after adding a new contact

    I got a new N73 (actually by Softbank Japan 705NK, language set to English), synchronized it to Outlook, so I had a couple of contacts in the contact list of my phone. They were all correctly sorted.
    When I now added new contacts to the phone (not via Outlook, but directly inside the phone), I got a second sorted contact list before the existing one, i.e. all new contacts are not automatically inserted into the existing list of contacts, but a second list of contacts (which is sorted again) is generated. So now I have two sorted lists followed by each other, first the contacts inserted via the phone, second the contacts synchronized via Outlook/Nokia PC Suite.
    Did anyone experience this problem? How can I get one sorted list instead of two lists?

    My thinking about deleting from the phone after synch-ing the contacts to Outlook was indeed that if you don't remove them, the synch won't see any reason to update them on the phone.
    Your point about sync deleting them is a good one, which is one reason I thought you might have to remove all contacts from the phone before synching back.
    Either way, I'd take a backup before you try anything
    Message Edited by patc on 18-Jan-2008 12:43 PM

  • Issue with empty value of LOV of first row after clicking on add row button

    JDeveloper 11.1.14
    I have a page with table-form layout.
    In the form I have two detail tables on the same page (tabbed).
    I have an issue with using model-choicelist LOV's in the detail tables.
    I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
    I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
    After saving the new row I get the following error on the screen:
    Error: a selection is required. --> first row
    Does anyone have a suggestion how to solve this issue?

    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?

  • Call the program first two screens and return

    Hi all,
    I am coding an Zprogram in that i have to call an Standard Report Program ( ex:- RFFOUS_T ) and execute.
    and in  that standard program  i need to execute upto the first two screeens only after the first two screens i need to come back to my Zprogram
    How can i do this.
    Regards
    Ajay

    Hi Ajay,
    SUBMIT  RFFOUS_T  WITH SELECTION-TABLE i_rspar AND RETURN.
    where i_rspar contains the value u want to pass to next report programs output screen
    with structure as         i_rspar  TYPE  STANDARD TABLE OF rsparams.
    Try with it
    it may help you.

  • Scrolling to next range in advanced table when new rows are added.

    I programatically implemented Add New Row in an advanced table.
    "Records Displayed" attribute of advanced table =10, so as log as I add upto 10 new rows the table displays 10 rows,if I add 11th record the new record is appended @ 11th position but I've to choose "Next" link on the advanced table to see the 11th row.Is it possible to show the last rowset in the advanced table when new rows are added?
    The underlaying VO executes the following code when "Add New Row" button is pressed:
    int rCount = this.getFetchedRowCount();
    int rangeSize = this.getRangeSize();
    int rangeStart = this.getRangeStart();
    if (rCount < rangeSize) {
    this.insertRowAtRangeIndex(rCount, newRow);
    } else {
    this.setRangeSize(rCount+1);
    this.insertRowAtRangeIndex(rCount, newRow);
    this.setCurrentRow(newRow);
    To scroll to the 11-20 rows (when added more than 10 rows),I tried with following options, but none of them helped:
    1) int newRangeStart = ( rCount / 10 ) * 10 ;
    this.setRangeStart(newRangeStart);
    2) this.scrollRange(newRangeStart);
    3) this.scrollRange(rCount);
    4) int newRangePage = rCount / 10;
    this.scrollToRangePage(newRangePage+1);
    5) this.getNextRangeSet();
    Please let me if it is possible to achieve.

    What happens if you just add the new row without specifying where to add it ? doesn't it add the new row on the same page as the last row ?
    Thanks
    Tapash

  • Add a row after Total row in ALV report

    Hi Experts,
    I have a report is displayed by  ALV format(not use function module to display it but use Class cl_gui_custom_container),I want to add a row after the total row. for example,
    Customer   amount1    amount2    amount3 
    10000         1,234        1,000         2,000
    10001         4,000        2,000         1,000
    10002         1,300        1,000         3,000
    11000         1,200        4,000         3,000
         Total:     7,734        8,000         9,000
    Ratio%        31.27       32.34          36.39
    the row of 'Total' is calculated by fieldcat-do_sum = 'X' But after the Total row we need a Ratio row to display the ratio. Yes we can calculate the total amout and ratio and then append it into the output itab, but we don't like this solution.We want to keep the total function in the ALV report.Any experts can poit me a direction. Thanks in advance.
    Joe

    Djoe,
    First you need to handle the user command,in order to capture the button action. For this you need to implment a class, i  am attaching sample codes here
    In top include write the following code
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION .
        METHODS:
         handle_toolbar  FOR EVENT toolbar                   " To add new functional buttons to the ALV toolbar
                         OF        cl_gui_alv_grid
                         IMPORTING e_object,
         handle_user_command FOR EVENT user_command          " To implement user commands
                            OF cl_gui_alv_grid
                            IMPORTING e_ucomm .
      PRIVATE SECTION.
    ENDCLASS.                                               " Lcl_event_handler DEFINITION
    Now   <b>Class implementation</b>
    CLASS lcl_event_handler IMPLEMENTATION .
      METHOD handle_toolbar.                                " Handle Toolbar
        PERFORM f9500_handle_toolbar USING e_object.
    ENDMETHOD .                                            " Handle_toolbar
      METHOD handle_user_command .                          " Handle User Command
        PERFORM f9600_handle_user_command USING e_ucomm .
      ENDMETHOD.
    ENDCLASS .                                              " lcl_event_handler IMPLEMENTATION
    FORM f9600_handle_user_command USING p_e_ucomm TYPE sy-ucomm.
      CONSTANTS:c_newl(4) TYPE c
                          VALUE 'NEWL',               " New line
                c_copy(4) TYPE c
                          VALUE 'COPY',               " Copy
                c_corr(4) TYPE c
                          VALUE 'CORR'.               " Correction
      CASE p_e_ucomm .
        WHEN c_newl.
    Create a new line
          PERFORM f9610_insert_new_line.
    ENDFORM.                                          " f9600_handle_user_command
    FORM f9610_insert_new_line .
    *Data Declarations
      DATA: lt_rows     TYPE lvc_t_row,                 " Itab for row property
            ls_rows     TYPE lvc_s_row,                 " Work area for row
            lv_cntid    TYPE i.                         " Counter
      DATA: gv_index TYPE sy-index.
      CLEAR gs_last.
      CALL METHOD gr_alvgrid->get_selected_rows
        IMPORTING
          et_index_rows = lt_rows.
      READ TABLE lt_rows INTO ls_rows INDEX 1.
      IF sy-subrc EQ 0.
        gv_index = ls_rows-index + 1.
      ELSE.
        gv_index = 1.
      ENDIF.
      DESCRIBE TABLE gt_last LINES lv_cntid.
      lv_cntid = lv_cntid + 1.
      gs_last-cntid = lv_cntid.
      INSERT gs_last INTO gt_last INDEX gv_index.
      LOOP AT gt_last INTO gs_last FROM gv_index TO gv_index.
    Make the new line editable
        PERFORM f9611_style.
      ENDLOOP.
      CALL METHOD gr_alvgrid->refresh_table_display
        EXCEPTIONS
          finished = 1
          OTHERS   = 2.
    ENDFORM.                    " f9610_insert_new_line
    You can ask questions doubts if any!
    regards
    Antony Thomas

  • How Do I get SSIS To Stop Looping Through Excel Rows After Last Populated Record?

    I have a package that loops through many excel files. Each Excel File has about 5000 rows. My problem is that after the 5000th row SSIS keeps looping through all the rows after the last row. There are nothing in these rows. This is a complete bottleneck
    of my package because it takes forever when doing this. How do I stop this?
    Thanks

    Another way is to specify the range in select statement which can be done in two ways
    http://getsetsql.blogspot.in/2012/01/using-ssis-load-data-to-excel-sheet-at.html
    http://sqlserversolutions.blogspot.in/2009/02/selecting-excel-range-in-ssis.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Connect my tv-tuner to my ThinkVision L2440p monitor

    Hello Is it possible to have two devices connected to my monitor and switch between them with the button in front of the monitor? I tried to connect my laptop with a vga-cable and my tv-tuner with a hdmi-to-dvi cable to the monitor, but the monitor w

  • Transferring Styles in Excel to another PC.

    I understand that when you set set up Styles for a specific cube in an Excel spreadsheet that the style information is saved in the registry of the local machine. We have a situation where we want to give the Excel spreadsheet to several users and ha

  • CC 2014 and GTX 680 Graphics Card for Mac

    I am using a NVIDA GTX 680 card for Mac and with Premiere CC and I can use the Mercury Engine with Cuda. I am running a Mac Pro 12 Core with OS 10.8.5. When I launched CC 2014 it told me to update the Cuda drivers for my card otherwise Premiere could

  • Error -43 file cannot be found

    I'm running Windows Vista Ultimate 64-bit, and after updating QT to 7.5 (861) - I cannot play ANY .mov files on my system. The browser plugin for IE7 appears to be working, but not for Firefox. I get the Error 43 message when trying to open any .MOV

  • Installation of 11g Discoverer

    Hi Experts , I like to know if below installation is possible or not I have installed weblogic 10.3.4 and created a domain . Now is it possible if i install 1. middleware 11g(11.1.1.2) next 2.middleware 11g(11.1.1.3) next 3.middleware 11g(11.1.1.4) P