[Help]Grid (Add row - Delete row)

Hi experts. Just want to ask how can I add row and delete row in Grid?
And how can I get the data from the specific row so I can Save the data in my table.
Please help.

Hi  hikaru1207     ,
      this code for delete row from Matrix :
             Matrix oMatrix_cat = (Matrix)form.Items.Item("mtx_cat").Specific;
Delete Row -
           for (int i = 2; i <= oMatrix_cat .rowcount; i++)
                    oEditText = (EditText)oMatrix.Columns.Item(colname).Cells.Item(i).Specific;
                        oMatrix.DeleteRow(i);
             if (form.Mode == BoFormMode.fm_ADD_MODE)
                    if (oMatrix.RowCount == 0)
                        DBDataSource oDBDataSource = form.DataSources.DBDataSources.Item(table name);
                        oDBDataSource.Clear();
                oMatrix_cat .FlushToDataSource();
Add row----
                   if (oMatrix_cat.RowCount == 0)
                            oMatrix_cat.AddRow(1, 1);
                            oDBDataSource_cat.InsertRecord(oDBDataSource_cat.Size);
                        else
                            oDBDataSource_cat.InsertRecord(oDBDataSource_cat.Size - 1);
                        oDBDataSource_cat.SetValue("LineId", oDBDataSource_cat.Size - 1, "");
                        oDBDataSource_cat.SetValue("U_SKU", oDBDataSource_cat.Size - 1, "");
                        oDBDataSource_cat.SetValue("U_CatId", oDBDataSource_cat.Size - 1, "");
                        oMatrix_cat.LoadFromDataSource();
                        oDBDataSource_cat = null;
               please reply ......
yhanks
surajit

Similar Messages

  • Print,Check,Apppend Row,Delete Row,Insert Row buttons actions code

    HI,
    I have a ALV table in that buttons Print,Check,Apppend Row,Delete Row,Insert Row buttons are there.But client requirement is they don't want those buttons in ALV they want in above the ALV table.
    Can you please let me know how to hide those buttons in ALV.and give me code Print,Check,Apppend Row,Delete Row,Insert Row action code..HI,

    I hope you have instantiated your ALV. Check the below code
    * Instantiate the used component " You can use code wizard to get this code.
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_usg_alv( ). "usg_alv should be your usage name
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    * Get Model
      DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_interfacecontroller =   wd_this->wd_cpifc_usg_alv( ).
      DATA lo_value TYPE REF TO cl_salv_wd_config_table.
      lo_value = lo_interfacecontroller->get_model(
    * Hide Standard buttons on ALV toolbar
      DATA: l_std_func TYPE REF TO if_salv_wd_std_functions.
      l_std_func ?= lo_value                                 .
      l_std_func->set_edit_append_row_allowed( abap_false )  .
      l_std_func->set_sort_headerclick_allowed( abap_true ) .
      l_std_func->set_edit_append_row_allowed( abap_false )  .
      l_std_func->set_edit_insert_row_allowed( abap_false )  .
      l_std_func->set_edit_delete_row_allowed( abap_false )  .
      l_std_func->set_view_list_allowed( abap_false )        .
      l_std_func->set_sort_headerclick_allowed( abap_false ) .
      l_std_func->set_edit_check_available( abap_false )     .
      l_std_func->set_pdf_allowed( abap_false )              .
      l_std_func->set_export_allowed( abap_true )            .
    Radhika.

  • Multi Row Delete & Row selector in 1.5

    Hi All,
    Please forgive my ignorance.
    But, are these processes (Multi Row Delete, Row selector) not available for HTML DB 1.5.
    What is the other way to do this.
    Thanks
    Monika

    Hi Monika,
    It's been a while since I used 1.5 so I can't answer that, however whilst I'm not generally in favour of upgrading just for the sake of it, is there a reason why you wouldn't consider upgrading to a later release?

  • Add row / delete row in PDF Form

    Alright so I am really struggling here and no one has been able to provide me a solid answer to date.
    1. I am creating a PDF form I want users to be able to fill and remit via email
    2. I have created the form in Acrobat 9 Pro via the form Wizard and in some combination with MS Word 2007 for text and table fields to get the forms wizard to auto-populate Adobe form fields.
    3. Some of the tables, i.e. In the first table for "Full Time" and "Part Time" should have check boxes - works fine to date. While others should have drop downs, i.e. platform build, etc - works fine to date.
    4. This is the pressing issue. As they exist today there is a large table as you can clearly see. I want users to be able to simply click an "Add Row" or "Delete Row" button to add another row to the table (or delete) without having to have a massive table.
    I've watched demos on Lynda.com (all of which are irrelevant and provided 0 value), tried to work with what people have responded with previously but all are mainly sample documents and I don't know where to start. In short, I open my form and other forms in LifeCycle Designer ES, take a look at the buttons people have created, the scripts, the XML source, etc. but no idea where to go. If the button needs to be in the table. How it should be scripted. etc. I cannot find a video tutorial anywhere on the web and all the responses simply provide a sample but no idea how to make it a reality in terms of translating their sample into a working dynamic form in PDF. Any help is greatly appreciated. Thanks.

    For a dynamic table you have to design a new XFA-form in Designer.
    Here's a little tutorial how to create dynamic tables.
    http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/
    Just a little correction.
    You can inport Docx-Files with tables and add / remove rows in a dynamic PDF.
    But, this is not handy, if the table contains more than one row when it is imported because Designer gives every detected row the same name (Row).
    Delete all row excepting the first one and set it to repeatable in the binding tab.
    Then you can use the addInstance() and removeInstance() methods to add/remove row to the table.
    Here an example file I made from a docx file.
    https://acrobat.com/#d=k8XbQWmqu6bhfrrwui93pw

  • How to add or delete rows in tablecontrol?

    Hi,
    I am using a tablecontrol to enter data records.
    I want to use 2 buttons, one to insert a row into a tablecontrol and another to delete a selected row of a tablecontrol.
    How do I insert or delete rows of a tablecontrol?
    Thanks.

    Hi Kumar,
    Please look at the below sections......
    ADDING BLANK LINES
    To add blank lines to table control we do not need to change any of the fields of the structure CXTAB_CONTROL simply adding blank lines to the internal table will do.
    INSERT INITIAL LINE INTO itab.
    DELETING SELECTED ROWS
    Deletion of selected rows is simple. To delete selected rows first we will determine the rows which have been selected through selection column .
    FOR SINGLE ROW SELECTION
    IF mark EQ 'X' .             "mark is the name of selection column field
    DELETE itab FROM workarea . 
    ENDIF.
    FOR MULTIPLE ROW SELECTION
    *To deetermine the rows selected we will use the selection column field to loop
    *through the internal table.
    LOOP AT itab WHERE mark EQ 'X'.  "mark is the name of selection column field
    DELETE itab                                    " and is part of the internal table .
    ENDLOOP.
    Thanks,
    Ravi Kanth

  • Help with Excel Applescript - deleting rows

    Hi,
    I'd like to delete all the rows that contain about 10 to 12 three letter combinations such as EDM, WAS, PIT, NYI and so on. All those three letter combinations are in one column of my spreadsheet (Column C).
    Simon

    Perhaps you can use this as starting point:
    Sub Transform()
    Dim wshS As Worksheet
    Dim wbkT As Workbook
    Dim wshT As Worksheet
    Dim r As Long
    Dim m As Long
    Application.ScreenUpdating = False
    Set wshS = ActiveSheet
    m = wshS.Range("A" & wshS.Rows.Count).End(xlUp).Row
    Set wbkT = Workbooks.Add(xlWBATWorksheet)
    Set wshT = wbkT.Worksheets(1)
    wshT.Range("A1") = "bgroup"
    wshT.Range("B1") = "verses"
    wshT.Range("A2") = "Default"
    For r = 2 To m
    wshT.Cells(2, r) = wshS.Cells(r, 1) & "." & wshS.Cells(r, 2) & _
    "." & wshS.Cells(r, 3)
    Next r
    Application.Dialogs(xlDialogSaveAs).Show
    Application.ScreenUpdating = True
    End Sub
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Add/Delete rows from ALV-grid

    Hi to all,
    i have 2 questions concerning alv-grids:
    i have an alvgrid displaying a table and what i need is some functionality to add or delete rows from the alvgrid - how can i do that ?
    within one row i have one field containing the status and i want to be able to select the status from a combo/dropdown-field and set it for this particular row.
    thanks in advance!

    Hi,
    Report BCALV_EDIT_04 shows how to append and delete rows.
    Report BCALV_EDIT_06 shows drop down list for cells in a column.
    These report should be available in any R/3 system including all ABAP Preview versions.
    Hope this can help.
    Regards, Johan

  • My add/delete row function is unselectable. How do I fix this?

    For no reason that I can guess I am unable to add or delete rows. That little circle icon with the two horizontal dashes is gone and when I click on a numbered row the 'add/delete row' choices are grayed out, unelectable. My spreadsheet needs are VERY basic so I'm at a loss for what has happened because I've been using this file. It WAS working like it should, but now it's not and I don't know if I clicked something OFF or what. I am not new to a Mac, so I'm not a newbie with this stuff. Any ideas??????

    Try deactivating any filter you have set on the table.
    SG

  • UDO: Add and Remove rows to/from Matrix.

    Hi all,
    Yes, I know there are lots of topics about adding and removing rows but I was having trouble with these and I need some expert's opinion.
    I'm working with a Document type UDO, with 1 header table (ADAT_ONR) and 1 child table (ADAT_NR1 -  MatrixUID = "mtx_NR").
    I add the first row when the user chooses the business partner.
    If oMatrix.RowCount = 0 Then
         oMatrix.AddRow()
          oMatrix.AutoResizeColumns()
         oMatrix.Columns.Item("V_LineId").Cells.Item(1).Specific.Value = 1
    End If
    Then, the user has to press the AddRow button to add new rows, and the user can only add 1 new blank row. Later I'll change the row adding behavior to mimic B1s.
                If pVal.BeforeAction = False Then
                    Select Case pVal.ItemUID
                        Case "AddRow"
                            'ItemHandler_Click = AddRow(oCompany, oApplication, oForm, oForm.Items.Item("mtx_NR").Specific.RowCount())
                            oMatrix = oForm.Items.Item("mtx_NR").Specific
                            If oMatrix.RowCount > 0 Then
                                If Trim(oMatrix.Columns.Item("V_PltCode").Cells.Item(oMatrix.RowCount).Specific.Value) = "" Then
                                    oApplication.StatusBar.SetText(TranslateStr(oApplication, MustChoosePallet), BoMessageTime.bmt_Short)
                                    Exit Function
                                End If
                            End If
                            ItemHandler_Click = NewLine(oCompany, oApplication, oForm)
                            Exit Function
        Private Function NewLine(ByRef oCompany As SAPbobsCOM.Company, ByRef oApplication As SAPbouiCOM.Application, _
            ByRef oForm As SAPbouiCOM.Form) As Boolean
            NewLine = False
            Try
                oMatrix = oForm.Items.Item("mtx_NR").Specific
                Dim Index As Integer = oMatrix.RowCount
                With oForm.DataSources.DBDataSources.Item("@ADAT_NR1")
                    .Clear()
                End With
                oMatrix.AddRow()
                oMatrix.Columns.Item("V_LineId").Cells.Item(Index + 1).Specific.Value = (Index + 1).ToString
                oMatrix.FlushToDataSource()
                oMatrix.LoadFromDataSource()
                oForm.Refresh()
                NewLine = True
            Catch ex As Exception
                oApplication.MessageBox("NewLine(): " & oCompany.GetLastErrorCode.ToString & ", " & ex.Message)
            End Try
        End Function
    When I Add or Update the data, I clear the last blank row, if it exists.
               '// In the Click Event
               If pVal.BeforeAction = True Then
                    Select Case pVal.ItemUID
                        Case "1"
                            If oForm.Mode <> BoFormMode.fm_FIND_MODE Then
                                oMatrix = oForm.Items.Item("mtx_NR").Specific
                                oMatrix.FlushToDataSource()
                                oMatrix.LoadFromDataSource()
                                If Trim(oMatrix.Columns.Item("V_PltCode").Cells.Item(oMatrix.RowCount).Specific.Value) = "" Then
                                    oForm.DataSources.DBDataSources.Item("@ADAT_NR1").RemoveRecord(oMatrix.RowCount - 1)
                                    oMatrix.DeleteRow(oMatrix.RowCount)
                                    'oMatrix.FlushToDataSource()
                                End If
                            End If
                    End Select
    My question is, Is there an easier way to Add and Delete Rows??
    BTW, I still have a problem so solve. With this code, when the user deletes a row the row numbering is incorrect. Example: if I have to rows in a matrix and I delete row nº1, row nº2 will hold the same number...
    Any Ideas?
    Thanks in advanced,
    Vítor Vieira

    Hi Victor,
    there is a Form Data event which you ca use in that try to write the code for adding a row after updating and delete a row while inserting and add a row while traversing.
    sample code.
    Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
            Try
                Select Case BusinessObjectInfo.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD, SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE
                        If BusinessObjectInfo.BeforeAction = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                            oDBs_Head = objForm.DataSources.DBDataSources.Item("@Header")
                            oDBs_Detail= objForm.DataSources.DBDataSources.Item("@Line")
                            objMatrix = objForm.Items.Item("83").Specific
                            If objMatrix.VisualRowCount <> 0 Then
                                objMatrix.DeleteRow(objMatrix.VisualRowCount)
                                objMatrix.FlushToDataSource()
                            End If
                            If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD Then
                                End If
                        ElseIf BusinessObjectInfo.ActionSuccess = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                            If BusinessObjectInfo.EventType =                    SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE Then
                                objMatrix = objForm.Items.Item("83").Specific
                                objMatrix.AddRow()
                                SetNewLineCharge(objForm.UniqueID, objMatrix.VisualRowCount)
                                objMatrix.FlushToDataSource()
                              End If
                        End If
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
                        If BusinessObjectInfo.ActionSuccess = True Then
                            oDBs_Head = objForm.DataSources.DBDataSources.Item("@Header")
                           oDBs_Detail = objForm.DataSources.DBDataSources.Item("@Line")
                            objMatrix = objForm.Items.Item("83").Specific
                            objMatrix.AddRow()
                            SetNewLineCharge(objForm.UniqueID, objMatrix.VisualRowCount)
                            objMatrix.FlushToDataSource()
                           End If
                End Select
                End Sub
    Hope this helps,
    OM Prakash

  • Delete Row in WAD layout for input ready query

    Hi All
    I am using WAD for planning applications.....when i execute the Web template, it is displaying the query in edit mode which is ok... i am able to edit and insert the records in layout but i didn't find any option for deleting row...i couldn't see any command button for delete functionality in WAD...
    please help me out......how i can get delete functionality in my user input query opened in WAD
    Thanks
    Tripple k

    Hi
    Thanks for your help...but that is not going to help...by the way i am surprised why SAP has removed these basic functionality from IP while they are there in BPS..like add row delete row...in WAD if we dont have option for new line...we have to specify the no. of new lines in prior....also if user has filled the new lines then next line will not come untill he save..trhis is ridiculas....i am not able to find any wayout for these silly functionality
    Thansk
    Tripple k

  • Adding delete row icon to report

    We have a custom report that I would like to add the delete row icon to. Is this possible? Thanks in advance.
    Eric

    I am looking to add a sequential row number to some reports.Standard or interactive reports?
    >
    I can't use an ID number because they may not be in a specific order and for asthetics, I would like them to be numbered sequentially. I have a report that we run for different meetings and based on the meeting group is what we base the report on. For example, we have a meeting to review cases with our security team and we have a meeting to review incidents with our server admin team so I have a report based on the different teams we are meeting with and would just like to have a reference to go by. There could be 40 returned rows and if I use an ID they may not be in sequential numerical order so asking someone to look at a row could still be time consuming for them to find and view, if that makes sense.
    >
    That appears to require that the order must be fixed in the query like this:
    select owner, incidentname, incidentaction
    from mytable
    where resolvingteam = 'teamnamehere'
    order by ownerin order for people looking at different instances of the report to be seeing the rows in the same sequence? (The only way to guarantee the sort order in SQL is to <tt>ORDER BY...</tt>) It doesn't appear that there is any room for ambiguity here: you don't want someone instructed to deal with case #4 as a matter of priority when their #4 is numbered according to a different order...
    Do the reports use pagination or should all rows appear on one page? The "+...asking someone to look at a row could still be time consuming for them to find and view...+" comment argues against pagination as it may require one or more page changes to find a given row, but retrieving everything on one page may impact performance and lead to issues with scrolling.
    What version of APEX are you using?
    What theme and template (if it's standard reports) are used?
    What browser(s) and version(s) are used?
    (FWIW, permanent, immutable IDs do appear to be a better idea to eliminate any possible ambiguity.)

  • Adding and deleting "rows" in pdfs

    I need to know the best way to edit pdfs. What I have are files that resemble a table setup in Word. I would need to add and delete "rows" of information which are also set up in columns. I also may need to edit some of the text in a row.
    What is the best tool for me to use? Acrobat? Illustrator? We are currently using v.10 on Macs. Is there a fairly simple way to accomplish this?

    I don't think there is a good way to do this. Except for very simple edits, it's better to edit the source document and recreate the PDF. If there is no source document available, you can try exporting to Word from Acrobat and see if you get something usable.

  • 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
    ------------------------------------------------------------------------------

  • Add and Delete a row in table

    Hi Expert,
    In SAP interactive form OFFLINE Scneario.
    I have a deep structure. In which i am using other structures like kna1, knb1, knvv.
    Now in KNVV is again a deep structure in which i have a table type.
    Now a draged and droped this table type to my layout  so i got a table.
    I Need to have two buttons ADD and Delete, To add and delete a row in table repectvily.
    I saw other threads also but get not do it.
    My table type attribute's name in KNVV structure is VLACT.
    I write following code on click action of ADD button
    data.#subform[0].Button1::click: - (FormCalc, client) -
    VLACT.row.instanceManager.addInstance(1);
    xfa.form.recalculate(1);
    but it shows error msg
    accessor "VLACT.row.instanceManager.addInstance(1);"
    is unknown.
    Also i am not able to see tabel itself wich i draged and droped. Only two buttons are there.
    Plz help
    Thanks ? Regards,
    Arvind

    Hi Otto,
    This is the code i am using to add new row.
    Also all the settings in form are correct like "Repeat row for each data item" etc.
    I want to have at most 7 rows.
    var nTableLength = Table1.nodes.length; 
      var nNumRow = 0;
        for (var nCount = 0; nCount < nTableLength; nCount ++)
          if ((Table1.nodes.item(nCount).className == "subform") & (Table1.nodes.item(nCount).name !== "HeaderRow"))
           { nNumRow = nNumRow + 1; }
               if (nNumRow == 7)
               { xfa.host.messageBox("The maximum allowable number of rows is 7. You cannot add any more rows.", "Warning", 3); }
           else {
                  Table1.Row1.instanceManager.addInstance(1);
                  xfa.form.recalculate(1);
                   xfa.host.messageBox("row added" );
    I get the msg form the statment        xfa.host.messageBox("row added" );
    But i can not see the newly added row
    Plz help
    Thansks & Regards,
    Arvind

  • Editable ALV- Disable Add, delete row buttons

    Hi,
    I have an editable ALV using OO Grid. Some columns are editable and some are not using field catalog. I want to disable the 'add new row' and 'delete row' buttons. How to go about it ?
    Regards,
    Vin

    You can simply add them to the "Exclude" table and pass them to the SET_TABLE_FOR_FIRST_DISPLAY method.
       data: iexclude type ui_functions,
       data: xexclude type ui_func.
        define macro_exclude.
         xexclude = &1.
          append xexclude to iexclude.
        end-of-definition.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_copy_row.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_delete_row.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_append_row.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_insert_row.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_move_row.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_copy.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_cut.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_paste.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
        macro_exclude cl_gui_alv_grid=>mc_fc_loc_undo.
        call method alv_grid->set_table_for_first_display(
            exporting
                 it_toolbar_excluding  = iexclude     "<--- Right HEre
                 is_layout             = xlayout
            changing
                 it_outtab       =  izcmptrans[]
                 it_fieldcatalog = ifc[] ).
    Regards,
    Rich Heilman

Maybe you are looking for

  • How can I transfer iPhoto files from one admin user to another on the same Mac?

    i created a new admin user on my computer, so now my husband has one and so do i. how can i transfer our iphoto files from his admin user to mine as a shared file? i was able to do this with itunes easily but i am not able to do it with iphoto.

  • BUG:  Help (F1) dialog constantly pops up in dialogs

    Every time I go to use Photoshop CS3 Extended (and I've heard this problem also exists in CS4), the Help (F1) dialog inevitably pops up repeatedly over and over again.  I searched Google and came up with "out of memory" as the "cause" - I checked Tas

  • ORA-02298 : cannot validate - parent keys not

    Hi, I am trying to create a FK-PK constraints. In the alter table command i am using the caluse: exceptions INTO ... in order to catch all the exception rows . Can you please explain why i am getting this error message ? I am using the following comm

  • Volume control bar

    Have lost the volume control bar on a HP Touchsmart 610,Windows 7 OS. How do I get it back?

  • Compare 'debug deployment​' and 'developme​nt'

    What are the differences between the debug deployment and the development version? I read the short text about the debug deployment version but this isn't enough for me. Is it possible to do 'skip' and 'run selected steps'? Or is there somewhere a ni