Can't delete matrix row in UDO form

Hi all,
i have a problem. I've already searched the forum and found a couple of solutions, but they didn't work.
I can't delete a matrix row. I'm on patch level 39, i've read that patches from 32 to 38 gave some problems with matrix row delete.
Any one has notice regarding same problems with patch 39?
I post the code i'm using for the delete.
matrix.FlushToDataSource()
dbDataSource.RemoveRecord(row - 1)
matrix.LoadFromDataSource()
UIForm.Update()
'Removes the change trace row
changeTrace.RemoveAt(row - 1)
UIForm.Mode = BoFormMode.fm_UPDATE_MODE
Thanks in advance

Hi,
I'm using PL39 and I can delete rows in matrix (you are right in previous patch there was an error, and it´s imposible to delete rows). I saw the code you put and I doesn´t undestand what you are trying to do. I explain what I do:
- I enable the menu 1293 to delete row in a matrix, in the menu event i put the following code
                     Dim oMtx As SAPbouiCOM.Matrix =
oMtx.FlushToDataSource()
This works for me.

Similar Messages

  • Another Delete matrix row thread

    I have read some threads with Q&A on the delete matrix row subject but I cant make it work properly. Deleted rows have a tendency to return.
    I first tried to make my own:
    If pVal.MenuUID = "RmLine" And pVal.BeforeAction = True Then
    Set oMatrix = m_oForm.Items("MatrixM").Specific
    i = 1
    While i <= oMatrix.RowCount
      If oMatrix.IsRowSelected(i) Then
       If oMatrix.RowCount = 1 Then
         oMatrix.AddRow
       End If
       oMatrix.DeleteRow i
       m_oForm.DataSources.DBDataSources("@ITCCR_DM").Clear
       oMatrix.LoadFromDataSource
       m_oForm.Mode = fm_UPDATE_MODE
      End If
      i = i + 1
    Wend
    End If
    Problem here is that I cant remove last row without having it return right after.(Thats why I tried the addrow)
    Then I tried using SAP's function:
        m_oForm.EnableMenu "1293", True
    But as soon I hit "Update" the row returns so what do I need to add to the menu event to make it work?

    I use the two following standard methods for add and delete of rows... so far no problems with them (½ a year)
    (Please not that I've have wrapped the entire UI for faster use, so not every method in here are core SDK, but hope you get the idea for the approach)
    public int Add(B1ItemEvent pVal,B1DBDatasource Dbds, bool SwitchToUpdateMode, string ColumnToSelect) {
      InnerMatrix.FlushToDataSource();
      if(Dbds.GetValue_String(0,0)!="" || InnerMatrix.RowCount!=0) {
        Dbds.InsertRecord(Dbds.Size);     
      Dbds.SetValue_String(0,Dbds.Size-1,"");
      InnerMatrix.LoadFromDataSource();
      InnerMatrix.Update();
      if(SwitchToUpdateMode) {
        if(pVal.IsFormModeOK) {
          InnerForm.SwitchToUpdate();
      InnerMatrix.Columns[ColumnToSelect].Focus  (InnerMatrix.RowCount);
      return Dbds.Size-1;
    public bool RemoveSelected(B1ItemEvent pVal, B1DBDatasource Dbds, bool SwitchToUpdateMode, string WarningIfNoRowsSelected) {
      InnerMatrix.FlushToDataSource();
      int row = InnerMatrix.GetNextSelectedRow(0,BoOrderType.ot_RowOrder);
      if(row!=-1) {
        InnerForm.Freeze(true);
        while(row != -1) {
          InnerMatrix.DeleteRow(row);
          if(InnerMatrix.RowCount==0) {
            Dbds.BlankRecord(0);
          row = InnerMatrix.GetNextSelectedRow(0,BoOrderType.ot_RowOrder);
       InnerForm.Freeze(false);
       InnerMatrix.FlushToDataSource();
       InnerMatrix.Update();
       if(SwitchToUpdateMode) {
         if(pVal.IsFormModeOK) {
           InnerForm.SwitchToUpdate();
       return true;
      else {
      Notification.Statusbar_Warning (WarningIfNoRowsSelected);
       return false;

  • How to delete matrix row using rightclick ?

    Hi all ,
    I have UDO form .when i right click on a matrix  then contextual menu appears only(Copy,Remove,Cancel) not appears  (DELETE ROW ) .plz help how to contextual menu appears with (Delete Row) and which event fire when i click delete row.
    thanks in advance
    Surajit

    Hi,
    Menu Event..
    If (pVal.MenuUID = "OnlyOnRCDE") And (pVal.BeforeAction = False) Then
                Try
                    Dim oMenuItem As SAPbouiCOM.MenuItem
                    Dim oMenus As SAPbouiCOM.Menus
                    Dim omat As SAPbouiCOM.Matrix
                    Dim GCols As SAPbouiCOM.Columns
                    Dim i As Integer
                    pmat = pcFrm.Items.Item("5").Specific
                    GCols = pmat.Columns
                    pcFrm.DataSources.DBDataSources.Item(1).Clear()
                    pmat = pcFrm.Items.Item(selItem).Specific
                    For i = 1 To pmat.RowCount
                        If pmat.IsRowSelected(i) = True Then
                            pmat.DeleteRow(i)
                            Exit For
                        End If
                    Next
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            End If
    Right Click Event
    If eventInfo.FormUID = "AAAAAAAAAAAAAAA" Then
                If (eventInfo.BeforeAction = True) Then
                    Dim omat As SAPbouiCOM.Matrix
                    Dim GCols As SAPbouiCOM.Columns
                    pmat = pcFrm.Items.Item("5").Specific
                    GCols = pmat.Columns
                    pcFrm.DataSources.DBDataSources.Item(1).Clear()
                    Try
                        selItem = eventInfo.ItemUID
                        Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
                        oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
                        oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
                        oCreationPackage.UniqueID = "OnlyOnRCDE"
                        oCreationPackage.String = "Delete Row"
                        oCreationPackage.Enabled = True
                        oMenuItem = SBO_Application.Menus.Item("1280") 'Data'
                        oMenus = oMenuItem.SubMenus
                        oMenus.AddEx(oCreationPackage)
                    Catch ex As Exception
                        MessageBox.Show(ex.Message)
                    End Try
                Else
                    Try
                        SBO_Application.Menus.RemoveEx("OnlyOnRCDE")
                    Catch ex As Exception
                        MessageBox.Show(ex.Message)
                    End Try
                End If
            End If
    Regards,
    Siva

  • Can't delete a row with a long raw in it

    I have a table with a long raw column. I am using the following
    to try to delete the row from a copy of 8i Lite:
    stmt.executeUpdate("delete from blobs where blobid="+blobId);
    My application hangs at this point. Any theories?
    I am using this driver: oracle.lite.poljdbc.POLJDBCDriver
    I am using the 1.2.2 jdk.
    -Justin
    null

    I opened activity monitor, closed all programs associated with pdf, preview, etc., however that didn't work. A simple restart did the trick. Even though I could see the pdfs on my destop the files were deleted. That explains why I couldn't manipulate the file. Somehow the file got caught in the graphics string.......????

  • How can I delete a row in access using the database toolkit?

    I want to delete just one row of a access table using the database toolkit. Can it be done and if so How?

    Take a look at page A-1 of the database connetivity manual. It has information on making a sql query that will delete. You will need to use this command with the dbtools execute query function. Look in the shipping examples for an example with this function.

  • HT201269 How can I delete all my data from former Iphone 4 for future sale on Ebay?

    Hello!
    I've just purchased an Iphone 5 from a new carrier. Now I should like to sell my former Iphone 4 but, obviously, removing all my personal data (contacts, photographs, etc.) .  How can I transfer the ringtones that I purchased from by Iphone 4?
    How can I do it? Thanks in advance.
    Regards,
    Maria

    backup the device and restore it as new.
    If you already have or don't need a backup:
    Erase your device
    Erasing all content and settings will delete all the data from your device, including songs, videos, contacts, photos, calendar information, and any other data. All device settings are restored to their factory condition.
    To remove all settings and information from your device, tap Settings > General > Reset > Erase All Content and Settings. For more information about this feature, see iOS: Understanding 'Erase All Content and Settings'.
    If you are unable to erase your device, restore the device using iTunes.
    See: http://support.apple.com/kb/HT4137  for the exact steps.
    Transferring ringtones isn't supported, as far as I know...

  • I can't delete "Front Row".

    I installed "Front Row" then I tried to erase it. I found everything of it (application, preferences, etc.) and I erased them. Now, after a month, when I start my computer, it appear ("Front Row") and I've to close it pressing "esc" key. It doesn't appear since I switch off my computer then I restart it. Thank you.

    You may have to force quit the application running from the Activity Viewer/Monitor in Applications -> Utilities. Make sure it does not reappear. If it doesn't show in that application, go to Applications -> Utilities -> Terminal, widen the window full screen width, and type at the prompt:
    ps -ax
    There you should find the PID for the Front Row application on the same row as the Front Row application itself.
    Once you know that PID number at the prompt type:
    kill -15 PID number
    If it doesn't let you kill it, try
    sudo kill -15 PID number
    All commands given in the Terminal should be followed by a Return key pressing. PID number will be one number, and you should use the number itself to substitute for wherever it says PID number in the instructions above.
    Once you have verified Front Row is no longer running with
    ps -ax
    Deleting it should be possible.

  • Can i delete redundancy rows in geometry column?

    i had more geom data rows in table . it's repeat,repeat and repeat .
    but i want keep single row for twinssssssss
    the "distinct" and "group by" function can't help me...
    please take a idea for me ?

    Hi,
    for that case i would use SDO_AGGR_CENTROID or SDO_AGGR_UNION .
    I had a similar problem where i had to determine, if geometries are redundant. I used here SDO_AGGR_UNION and then SDO_AGGR_CENTROID because i was not interested in one single point. Another way could be the use of SDO_WITHIN_DISTANCE or my favourite for searching duplicate geometries:
    a selfjoin:
    SELECT /*+ ORDERED */
    b.<ID>, a.<ID>
    FROM table_1 a, table_1 b
    WHERE SDO_RELATE (a.<geometry>, b.<geometry>,
    'mask=EQUAL querytype=WINDOW') = 'TRUE'
    AND a.<ID> != b.<ID>;
    regards, Andreas

  • How can I delete a row in datatable!

    This is my code:
    com.sun.jsfcl.data.DataCache.Row row =
    dataTable1Model.getDataCache().get(dataTable1.getRowIndex());
    row.setDeleted(true);
    dataTable1Model.commit();
    dataTable1Model.execute();
    we use msSQLServer2000.

    Another way, to do this (here's a snippet from AppModel)
    http://developer.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    if your in your DataTable you have a column of
    checkboxes. If you click on the checkbox and outside your
    datatable, you have a delete button. Note, sel is the id of
    the checkbox.
    for (int rowIndex = dataTable1.getFirst();
    rowIndex < (dataTable1.getFirst() + dataTable1.getRows());
    rowIndex++) {
    log("OnePage: check row " + rowIndex + " for deletion");
    dataTable1.setRowIndex(rowIndex);
    if (!dataTable1.isRowAvailable()) {
    log("OnePage: no data available for row " + rowIndex);
    break;
    if (sel.isSelected()) {
    log("OnePage: mark row " + rowIndex + " for deletion");
    com.sun.jsfcl.data.DataCache.Row row = dataTable1Model.getDataCache().get(rowIndex);
    row.setDeleted(true);
    count++;
    sel.setSelected(false);
    // Perform the actual delete transaction and report results
    try {
    dataTable1Model.commit();
    info("Total rows deleted: " + count);
    } catch (Exception e) {
    log("OnePage: Delete commit exception", e);
    error("OnePage: Delete commit exception: " + e);
    // Re-execute the query to pick up new results
    try {
    dataTable1Model.execute();
    } catch (SQLException e) {
    log("OnePage: Delete reselect exception", e);
    error("OnePage: Delete reselect exception: " + e);
    Refer to the AppModel for more info
    Thanks
    John B
    JSC QA

  • How to add/delete rows on the form without saving data

    I am new to apex
    I am working on project and need some help on creating a form
    my requirment is to save a request that has multiple questions.
    i have a request form with multiple regions
    On one of the region that takes questions, I want to create a tabular form such that i can add/delete/update row without hitting database and enter multiple questions
    each row is one question.
    Apex has the default functionality of having a tabular form linked to a table that onload shows the data from that table and also on click of add or delete hits the data base to save the data.
    However i want to load a form that does not show any data if its a new request and click of add/delete should not update the databse. It should just add/delete a row on the form
    so user logs in and can create a request that has multiple questions
    finally want to submit the form and save all the information of the form in multiple tables.
    As of now i a m able to have a simple form and a process that save 1 question per request.
    How do i achieve this. Please assist.

    Do that using collections like in this example:
    http://apex.oracle.com/pls/otn/f?p=31517:176
    Once you are done, you may decide either to save that or to clean it up.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Udo form matrix binding

    Hi,
    I created one UDO form.
    in that i am trying to fill the matrix with recordset.
    becoz i am selecting the value from combobox and i run the query with this value.
    so this resultant record set i want to fill in matrix rows.
    oForm = SBO_Application.Forms.Item("JBWISSUES_")
                oItem = oForm.Items.Item("mtx_0")
                oMatrix = oItem.Specific
                oColumns = oMatrix.Columns
                'frm = app.Forms.ActiveForm
                'oMat = frm.Items.Item("gd_act").Specific
                'oMatrix.Clear()
                oComboBox = oForm.Items.Item("27").Specific
                ds = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                ds.DoQuery("select a.code as Code,b.Itemname as Desc1,a.quantity as Quantity from itt1 a,oitm b where a.code=b.Itemcode and a.code='" & oComboBox.Selected.Value & "'")
                ds.MoveFirst()
                'oColumn = oColumns.Item("col_0")
                For i = 0 To ds.RecordCount - 1
                 oColumn.ValidValues.Add(ds.Fields.Item("Code").Value, ds.Fields.Item("Desc1").Value)
                    ds.MoveNext()
                Next
                oMatrix.AddRow()
    here i am getting error like Object reference not set to instance error at oColumn.validvalues....... plz hel p me in that.
    Regards,
    Ravi

    That's because you have commented out the line where you set the oColumn object:
    'oColumn = oColumns.Item("col_0")
    Regards,
    Frank

  • Can't delete newly added row in inner advanced table

    Hi!
    Im using advanced in advanced table and i can't delete a row after i added in detail table, i have to refresh the page in order to delete the row.
    This is what i do.
    execute query from master table
    expand row in master table
    click Add row button in detail table(standard button in footer)
    add data in columns
    click save button
    select row with multiselect and then click delete button but nothing's happend i just can delete older rows
    also i can't edit the new row just older rows.
    i think that is something wrong with the cache :S
    any ideas?
    thanks!
    Edited by: 892088 on 03-nov-2011 16:06

    still no answers, the problem is with the new row created because i cant delete or modify it.
    any comment?

  • To add/delete the rows in ALV report outpout

    Hi,
    Is there any way by which we can  add/delete the rows in ALV report output.
    Thanks
    Ankul

    Hi,
    Try out this way:
    data: i_modified TYPE STANDARD TABLE OF mara,"For getting modified rows
            w_modified TYPE mara.
    CASE e_ucomm.
          WHEN 'EDIT'.
          perform save_database.
          CALL METHOD ref_GRID->REFRESH_TABLE_DISPLAY.
        ENDCASE.
    FORM SAVE_DATABASE .
    data: i_selected_rows TYPE lvc_t_row,                "Selected Rows
          w_selected_rows TYPE lvc_s_row.
    * Getting the selected rows index
        CALL METHOD ref_grid->get_selected_rows
                    IMPORTING  et_index_rows = i_selected_rows.
    * Through the index capturing the values of selected rows
        LOOP AT i_selected_rows INTO w_selected_rows.
        READ TABLE it_tab INTO wa_it_tab INDEX w_selected_rows-index.
        IF sy-subrc EQ 0.
          MOVE-CORRESPONDING wa_it_tab TO w_modified.
          APPEND w_modified TO i_modified.
        ENDIF.
      ENDLOOP.
      MODIFY mara FROM TABLE i_modified.
    Thanks,
    Krishna

  • How to delete empty row without validation error in ADF Table(EMP)

    Hi Everyone,
    I am using EMP Table in ADF jspx page to insert the data into database.when i insert a row into table by createInsert operation,it inserting the row.But I need to delete that row immediately with out entering any value.
    But it showing some validation error at empno.Is there any ways to delete the empty row?if not,what are the reasons that we can't delete the row.
    could any one tell me the reasons!!
    Thanks in advance!!
    With Best Regards,
    Amar
    Edited by: 973755 on Dec 11, 2012 6:42 AM

    Amar,
    I am little confused with your logic here.....
    but if you are trying to remove the row by clicking Remove button, you can set the immediate property to true and that remove function will run without executing any entity validation.......
    -R

  • How do I delete a row in Microsoft Access from a vi using the database toolkit

    Using the database toolkit 1.01 how can I delete a row from my vi

    Bambi,
    I know you already got the answer from Jeremy in the LabVIEW Forum, but I wanted to place this link here so that other users could see the answer.
    How do I delete a row in Microsoft Access from a vi using the database toolkit
    Evan

Maybe you are looking for