DISPLAY AND DELETE ROW ISSUE

Moderator message: please do not post subject in all capitals
Dear friends
i have created report for transfering data from one database table to another database table i.e. detail table.
after executing Master data list will appear and after clicking on master data record it shows detail data with edit fields where i can enter my own data and after clicking save button i can pass that data to database table and at the same time data goes in display mode. I want that enterd data not to delete bye delete row button please tell me how can i avoid deletion of data.
Thanks
regards
Rohan
Edited by: Matt on Jan 19, 2009 1:51 PM

Hi ,
You csn hide the Delete button so that it will not delete the line...
Please have a look at this example ...BCALV_EDIT_05. You need to append exclude table and pass in the set_table_for_first_display method like below...
  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
  append ls_exclude to t_exclude.
call method g_grid->set_table_for_first_display
       exporting is_layout             = gs_layout
                 it_toolbar_excluding  = lt_exclude
       changing  it_fieldcatalog       = gt_fieldcat
                 it_outtab             = gt_outtab[].
hope this helps you,.
Raj

Similar Messages

  • Insert row and delete row in a table control

    Hi Experts,
    I am using a table control in module pool programming, How can I Insert row and delete row in a table control?
    Thanks in Advance....

    Santhosh,
    Iam using this code..
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    -BEGIN OF LOCAL DATA----
      DATA l_table_name       LIKE feld-name.
    data: p_mark_name type c.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    -END OF LOCAL DATA----
      ASSIGN (p_tc_name) TO <tc>.
    get the table, which belongs to the tc                               *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    delete marked lines                                                  *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
      access to the component 'FLAG' of the table header                 *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
        PERFORM f_save_confirmation_9101.
        IF gv_answer EQ '1'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
          ELSE.
          ENDIF.
        ENDIF.
      ENDLOOP.
    in this code   ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
    this code is not working...

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

  • Loop through result set and delete row

    so here is what I need -
    I have a query that pulls rows from the Database through a stored procedure.(these are properties in an area)
    Before I start looping through the query, I need to check the distance between my current location and the property. If it less than 5 miles, only then should I display that property. The distance in miles will be chosen while submitting the search form.
    So is there a way to delete rows from the result set based on the criteria? Or
    Is there a better way to accomplish this? I am using the the google api to get the latitudes and longitudes. The other issue to keep in mind is the load time.
    Thanks

    You can do this the easy way or the hard way.  Depends on whether your condition that needs to be checked can be expressed in the form of a SQL where clause.  If it can, then do what BKBK suggested, and use a query of query to create a new resultset that only has the rows from the original resultset that don't meet your condition.
    If the calculation of the condition is more complex, then do a CFLOOP over the query and examine each row to see if you want to keep it or toss it.  if you want to toss it, the delete that row - there is a function in CFLIB.ORG called querydeleterow that should help you.  Or, you could just clear out the row's contents and then do the query of query as described in BKBK's post to create a new resultset that doesn't include the blank rows.

  • How can I select and delete rows based on the value in one column?

    I searched through the discussion board, and found a thread on deleting blank rows, but not sure how to modify it to work with my issue.
    I have put together a rather complicated spreadsheet for designing control systems, it calculates parts needed based on check boxes selected in a second spreadsheet.
    Since not all systems require all parts there are many rows that have a 0 quantity value, I would like to select these rows and delete them once I have gone through the design phase (checking off required features on a separate sheet).
    I like the way the other thread I found will gather all the blank rows at the bottom without changing the order of the rows with data in them.
    I don't understand exactly how the formula in the other thread works well enough to modify it to look for a certain column.
    I hope I made myself clear enough here, to recap, I would like to sort the rows based on a zero value in one (quantity) column, move them (the zero quantity rows) to the bottom of the sheet, and then delete the rows with a zero quantity (I can delete them manually, but would like to automate the sorting part).
    Thanks for any help anyone can provide here.
    Danny

    I apologize but, as far as I know, Numbers wasn't designed by Ian Flemming.
    There is no "this column will be auto-destructing after two minutes"
    You will have to use your fingers to delete it.
    I wish to add a last comment :
    if your boss has the bad habit to look over your shoulder, it's time to find an other one.
    As I am really pig headed, it's what I did. I became my own boss so nobody looked over my shoulder.
    Yvan KOENIG (VALLAURIS, France) mercredi 13 juillet 2011 20:30:25
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How to get Inserted and Deleted Rows in ALV

    I have looked at the BC_EDIT* examples but I still can't figure out how to determine which rows were Inserted and Deleted from the ALV list.  Can someone please provide me the code to do this?
    Thanks.
    Sandy

    Hi sandy,
    i dont think you will have issue in inserting a row in ALV because whenever the user done some actions say for eg clicking the pushbutton at the toolbar you could insert the a new row into the ALV.for creating pushbutton you need to use the events TOOLBAR,USER_COMMAND.
    deleting a row may also follow the above procedure.
    Have a look at the demo program
    BCALV_GRID_05
    Cheers,
    Abdul Hakim

  • Problem with creating and deleting row in table

    Hi
    I'm using JDev11.1.1.2.0. I have a table "A" with primary key X -> CHAR(1). I have created Entity and ViewObject (with the primary key X).
    I created an editable Table with CreateInsert and Delete actions.
    When I click Insert, a new record is added and I enter some data. Then I move selection to some other row, and return back to the new row. When I press Delete, It does not delete the new row, but the previous one selected.
    In the console, when I navigate back two the new added record: <FacesCtrlHierBinding$FacesModel><makeCurrent> ADFv: No row found for rowKey: [oracle.jbo.Key[null ]].
    I tried the same scenario with a different table, that has RowID as a primary key and it works correctly.
    Any Idea why this is happening ? I suppose it's connected somehow with the primary key.
    Thanks
    agruev
    Edited by: a.gruev on Nov 26, 2009 9:47 AM

    I changed my entity: unchecked the X column to be primary key added RowID as a primary key. Now it works.
    What's wrong with my CHAR(1) as a primary key ?
    I also tried to add a Refresh button:
      <af:commandButton text="Refresh" id="cb3"/>and in the table add a partialTarget to the button. Now when I add new row and press the Refresh button - then it works.
    So it seems that the problem is when I add new row and enter data, the table is not refreshed and the row is missing it's primary key.
    Any solutions?
    Edited by: a.gruev on Nov 26, 2009 4:18 PM

  • Unused Master Data Display and Deletation

    Hi all,
    To delete any unused master data we have to goto infoobject and execute delete master data.
    Is there any other way to display or delete master data records which is not used anywhere in BW system?
    Because when we are trying to delete master data it is taking long time and lost of resource. Then after also due to other processes are waiting in the system we have to kill that job after 20 to 24 hours.
    Can anybody please guide me through this?
    Regards,
    Rohan Shah

    Hi Rohan,
    You can delete the data in the tables by the way below.(However this is not the ideal approach)
    1. Go to SE14 -> select 'Tables' from Dictionary objects & give table name (e.g. /BI0/SCOMP_CODE) -> Click Edit -> choose the option "Activate and adjust Database" and select "Delete Data".
    On execution, it will delete the data.
    Hope it helps.
    Rgds,
    VA

  • Clear and Delete rows in HFM

    Okay, so I know that the hs.clear will set a value to zero, aka '0' in the database. So I have some code written in the rules file to do this. however, when I trace what's actually stored in the DB, it does not appear to actually delete the rows in the database, just sets all the values to zero. This is fine if you are worried about just the values, but I want the rows out of the DB for performance reasons. Is there something else that needs to be written/executed for this to work?

    HS.Clear actually clears the numbers from the database. You may still see zeros in the cells, because the relevant accounts may have values in previous periods. However, if you observe those cells closely, you may notice that these zeros are displayed in light gray font, which means that the zeros are not actually there. Those "shadow" values in HFM are called "derived" values. I believe that HFM does not actually store these values in the database to save space, however I would not mess with the HFM database tables if I had any suspicions that the zeros are stored.

  • Filtering and Deleting Rows

    I am not very versed in writing syntax, especially in Power Query's "Query Editor". I want to create a filter based on two variables - [Status] (containing "D" or "C") and [LastActivity] (containing dates, but some are 'null').
    I want to remove rows that are just "D" for [Status] and
    "null" for [LastActivity]. (Note: I want to keep the "D"s that have dates in [LastActivity] as well as "C"s that don't have dates in [LastActivity])
    I thought I could use "Table.RemoveRows"?? Not sure.
    I would appreciate any help. Thank you.

    Table.SelectRows effectively expects a description of the rows that you want to keep in the result set. In this case, it says "I want to keep all of the rows where the status is not D or the last activity is not null." According to De Morgan's
    law, this is the equivalent of saying "I want to discard all the rows where the status is D and the last activity is null". It's not magic; it's simple Boolean logic! :)

  • Cannot DELETE rows from LOV on running...is it a bug ??

    One of the features I appreciated in the new version of JHeadstart is that we can now insert, modify and delete rows on LOV (even in the database).
    We have just to check on Lookup properties :
    Multi-row insert allowed
    Multi-row update allowed
    Multi-row delete allowed
    I cheked all of them and on runnig I could insert and update records in LOV.
    When I tried to delete records from LOV the system display information message "nothing to save" and in fact no records were deleted.
    Normally since I checked the delete property it should be possible to delete rows from LOV
    thanks for any Help

    Monta,
    I could reproduce this, it is a bug. Added to the fix list for the next release.
    Thanks for reporting,
    Steven Davelaar,
    JHeadstart Team.

  • 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

  • Set_ready_for_input  and insert row.

    hy guys, i having an issue with an alv oo.
    i have created a button on my toolbar to make my alv editable by using
    if grid->is_ready_for_input( ) EQ 0.
    CALL METHOD grid->set_ready_for_input
        EXPORTING i_ready_for_input = 1.
    and that works fine.
    all the editable fields are in edit mode (all non keywords fields).
    the issue is this, i want the user  to be able to insert a new row.
    When the alv switches to the edit mode, 2 buttons add row and delete row are automatically add to the toolbar.
    But when you have a new row, that row should completely be editable, but in my case the row is non editable.
    so where does the event add rows is triggered? when i'm trying to debug the adding row action, the program never stop, add immediately the row.
    I try to see if the handle data changed was trigged but neither this was triggered.
    How can i make the added to be immediately editable?
    Edited by: EBONGUE ANDRE on May 27, 2010 4:08 PM

    You should also set the EDIT option in your Layout.
        gs_layout-edit = 'X'.
        CALL METHOD g_grid->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout   " <
             CHANGING  it_outtab        = gt_outtab.
    Check program BCALV_EDIT_01.
    Regards,
    Naimesh Patel

  • 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

  • Matrix add and delete

    Hi
    i am developing a indent form in that i placed a matrix.
    can u plz get me some hints of adding rows and deleting rows..
    now i am placing buttons and writing code to do these tasks..

    Hi,
    Dim OCT_Form As SAPbouiCOM.Form
    Dim OCT_Matrix As SAPbouiCOM.Matrix
    OCT_Form = OCT_Application.Forms.Item("FormUID")
    OCT_Matrix = OCT_Form.Items.Item("MatrixUID").Specific
    'To add row in the matrix use
    OCT_Matrix.Addrow()
    'To Delete Row from the matrix use
    OCT_Matrix.DeleteRow()
    Hope this will help you.
    Regards,
    Mahendra
    Edited by: Mahendrakumar on Sep 25, 2008 2:18 PM

Maybe you are looking for

  • Error while posting document

    Hi, While we try to post a payment document for a customer invoice with Spl GL indicator, the system gives an error message - Reference to order is missing. Help does not give any information except the message number - WHT-BR003. Can anyone help me

  • XML Report Publisher - Blank Report Request Parameter

    Hi I have a custom template and custom data definition in Purchasing application. I ran PO Output For Communication and it generated the PDF. Now I want to do Bursting. So, I assigned XML Report Publisher and XML Bursting (both out-of-box programs) t

  • ISU Business Partner Master data Upload using BAPI?

    Hi Experts, I used BAPI "BAPI_ISUPARTNER_CREATEFROMDATA" to upload ISU Business Partner master data. This BPAI is not uploading the following topics: 1. Communication Address like Telephone,extension, email and etc., are not uploading. 2. Middle name

  • New Process type:Is the previous run in the chain still active?

    Hi, Please provide details of the new process type Is the previous run in the chain still active? In SPS 12. Thanks in advance.

  • Strange grey area on right side of every page on IOS

    I'm having a weird problem, when I view this site on iphone/ipad there is a grey, sort of half-transparent area overlapping the outer right area of my site. I can't seem to find what causes this, I'd appreciate any help in this matter. http://neorate