ALV: Edit, change and delete/insert rows

Hi all,
starting from an ALV layout (5 rows) empty and ready for inserting data I can insert data but I select two rows, for example, and by pressing the "delete" icon, after the refresh
CALL METHOD lo_grid->set_selected_rows
EXPORTING
it_row_no = loc_t_nrows
is_keep_other_selections = ''.  "
CALL METHOD lo_grid->refresh_table_display.
I find my new layout without the selected rows but empty.
How can I maintain the data in my layout (passing them to internal tables) to have my layout always up to date?
Thanks for your kind support.
Regards,
      Giovanni

HI
BCALV_EDIT_04  BCALV_EDIT_04 Check these programs.
Cheers
Ram

Similar Messages

  • Insert ,Change and Delete  records  in OO ALV

    Hi All,
    This is regarding the functionlaties  Insert ,Change and Delete records  in OO ALV ,
    I have gone through the threads posted here and checked the standard  program BCALV_EDIT_04,
    but still I am not able to capture the Deleted and Inserted records,
    as  I am new to OO ALV,can some one help me out pls.
    Thanks and regrds,
    Sree.

    Hi Sree,
    A lot of material is available on SDN.
    Please see this link. This link contains good example of insertr, delete records in OOPS ALV.
    [OOPS ALV.|Re: Insert ,Delete & Add a row in ALV;
    May it helps you.
    Regards.
    DS.

  • Disabling 'Change' and 'Delete' buttons in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    I have solved the issue Alhamdulillah by the foll. method:
    1. Copied CL_GOS_SRV_ATTACHMENT_LIST to ZCL_GOS_SRV_ATTACHMENT_LIST
    2. In ZCL_GOS_SRV_ATTACHMENT_LIST there is a method called: CHECK_STATUS. I overwrote with my check;
    on_mode_changed( 'D' ). --- For display
    on_mode_changed( 'E' ). --- For edit mode.
    3. In SGOS tcode, added VIEW_ATTA to point to ZCL_GOS_SRV_ATTACHMENT_LIST
    Regards,
    Fawaz

  • On MacBook Pro, in iPhoto, I can't find the "DON  In MacBook Pro where do I find the "DONE" button to save my editing changes and revert back to my library.

    In MacBook Pro, where is the "DONE" button to save my editing changes and revert back to the iphoto library?

    If you're using the Adjust editing pane there is no Done button. When you done with the editing just click on the Photos button at the top or use one of the arrows at the top to advance to the next photo.  No done button required.
    OT

  • Disabling 'Change' and 'Delete' button in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments  ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    Probably you have uncommented the call to super class when you reimplement the method on child class (z class)
    I just implement the same thing now and it worked for me. Take a look:
    1 - Modify the SGOSATTR table by SM30, just write a Z class (in my case CL_GOS_SRV_ATTACHMENT_CREATE) .
    2 - Create/inheridt a subclass (not a copy) in SE24 of the standard class.
    3 - Implement the method CHECK_STATUS in the z class. Note that the call to method on super class came commented. You only uncomment if you want to also execute a standard code in the super class.
    Here is my code:
    method CHECK_STATUS.
    NOTE - In my real implementation I have uncommented the code below because I want do standard code be executed before my own check.
    *CALL METHOD SUPER->CHECK_STATUS
    EXPORTING
       IS_LPORB  = IS_LPORB
       IS_OBJECT = IS_OBJECT
    IMPORTING
       EP_STATUS = EP_STATUS
       EP_ICON   = EP_ICON
      Check for BUS2012 = Bussinnes Object for Purchase Order
      IF IS_LPORB.TYPEID = BUS2012
      Check authorization and disable create attachment item if the user does not have authority...
    IF IS_LPORB-TYPEID = 'BUS2012'.
    AUTHORITY-CHECK OBJECT 'Z_MM001' ID 'ACTVT' FIELD '01'.
      IF sy-subrc <> 0.
        ep_status = mp_status_inactive.
      ENDIF.
    ENDIF.
    endmethod.
    Regards,
    Alexandre

  • FBE2: BAPI or FM for Changing and Deleting Payment Advice

    Hi,
    I am looking for BAPI or FM for changing & deleting payment advice as we can accomplish from FBE2.
    This is EC 6.0 upgrade issue for not be able to post using CALL TRANSACTION in background mode.
    I tried the below FM's in the Function group  FARMATCH, but all have them have the follwing code to select payment advice Header Table [AVIK].  
    SELECT * FROM AVIK INTO TABLE LT_AVIK WHERE (LT_WHERE) AND
                                                  AVSID LIKE '09%'.    "This is not the case for my requirement
    FARMATCH_CHANGE_PAYMENT_ADVICE               
    FARMATCH_DELETE_PAYMENT_ADVICE               
    I found another set of FM's  REMADV_CHANGE  &  REMADV_DELETE but I am not sure if i can
    achieve the same functionality of change and delete that we can do using FBE2.
    If anyone had similar scenario, Appreicate your feedback.

    Below is a sample code.
    I am able to delete the details....
    Take a look...:)...imp to add wait for few seconds
    REPORT z.
    PARAMETER: vbeln TYPE vbak-vbeln.
    PARAMETERS: fplnr TYPE fplnr.
    DATA: t_zfpla TYPE STANDARD TABLE OF fplavb WITH HEADER LINE.
    DATA: t_zfplt TYPE STANDARD TABLE OF fpltvb WITH HEADER LINE.
    DATA: t_fpla_new TYPE STANDARD TABLE OF fplavb WITH HEADER LINE.
    DATA: t_fpla_old TYPE STANDARD TABLE OF fplavb WITH HEADER LINE.
    DATA: t_fplt_new TYPE STANDARD TABLE OF fpltvb WITH HEADER LINE.
    DATA: t_fplt_old TYPE STANDARD TABLE OF fpltvb WITH HEADER LINE.
    *DATA fplnr TYPE fplnr.
    IF NOT vbeln IS INITIAL.
      SELECT SINGLE rplnr INTO fplnr FROM vbak WHERE vbeln = vbeln.
    ENDIF.
    CALL FUNCTION 'BILLING_SCHEDULE_READ'
      EXPORTING
        fplnr = fplnr
      TABLES
        zfpla = t_zfpla
        zfplt = t_zfplt.
    LOOP AT t_zfpla.
      MOVE-CORRESPONDING t_zfpla TO t_fpla_old.
      t_fpla_old-updkz = 'D'.
      APPEND t_fpla_old.
    ENDLOOP.
    LOOP AT t_zfplt.
      MOVE-CORRESPONDING t_zfplt TO t_fplt_old.
      t_fplt_old-updkz = 'D'.
      APPEND t_fplt_old.
    ENDLOOP.
    BREAK-POINT.
    *CALL FUNCTION 'BILLING_SCHEDULE_SAVE'
    TABLES
       fpla_new = t_fpla_new
       fpla_old = t_fpla_old
       fplt_new = t_fplt_new
       fplt_old = t_fplt_old.
    DATA fpltr TYPE fpltr.
    CALL FUNCTION 'BILLING_SCHEDULE_MAINTAIN'
      EXPORTING
      I_FPLA           =
      I_FPLT           =
       i_upd_fpla       = 'X'
       i_upd_fplt       = 'X'
        i_fplnr          = fplnr
    IMPORTING
      E_DATALOSS       =
      E_UPD_FPLA       =
      E_UPD_FPLT       =
       e_fplnr          = fplnr
       e_fpltr          = fpltr
    TABLES
        fpla_new = t_fpla_new
        fpla_old = t_fpla_old
        fplt_new = t_fplt_new
        fplt_old = t_fplt_old.
    WAIT UP TO 2 SECONDS.

  • 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

  • Need data edit,update and delete in the gridview

    Hi friends,
    I am facing a common problem which everyone already faced but I need to know is there anything new comes with this issue?
    My problem is I want to Edit, Update and Delete data in gridview in multiple column. I can do the edit , update,cancel and delete but what I want is I dont want this button to perform this. I mean when I load data in gridview the data will show in edit mode
    and when I edit any dat, the update will occur instantly in the sql server database. 
    Is there anything new development comes? whatever it is if its ajax or java script or something else please give me detail.
    Thanks for reading my post.
    Regards

    Questions related to ASP.NET should be posted in the ASP.NET forums (http://forums.asp.net ).

  • Adding and Deleting Multiple Rows or Columns

    How do you add or delete more than one row or column at a time.

    Robby! wrote:
    That's a great finding!
    I just wrote a feedback requesting a shortcut like this.
    It is a pity though that they desing it to work only if you select the header of the row/column. It should be enabled to work from within any cell in the table.
    Who wrote such an error ?
    These interesting shortcuts behave flawlessly even if the cursor was in D18 for instance.
    (a) I never saw them in the delivered resources.
    (b) they aren't responding to the OP's question which was about "Adding and Deleting Multiple Rows and Columns"
    Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:39:01)

  • How to find and delete matching row in ADF BC

    Hi,
    I have a table with simple fields and I have created the java class for this entity also
    Person
         - Person_Id (PK)
         - Person_NameI wanted to create an application module method to search for the entity that matches certain name
    but I cant find the code to do this.
    public class AppModuleImpl{
      public boolean deletePersonByName(String personName)
        EntityDefImpl personDef = PersonImpl.getDefinitionObject();
        //How to get all rows and find the matching name then delete the row
        return false;
    }Thanks
    Jdev 11.1.1.5

    Ramandeep Nanda wrote:
    getfilteredRows does that, you can iterate and delete the rows after filtering on any attribute in view object it does not have to be a primary key.Hi Ramandeep,
    I got the idea and I somehow was able to do what I want.
      public boolean deletePersonByName(String personName)
        PersonViewImpl personView = this.getPersonView();
        Row[] matchingRows = personView.getFilteredRows("PersonName", personName);
        if(matchingRows!=null)
          for(Row rowTemp : matchingRows)
            PersonViewRowImpl personRow = (PersonViewRowImpl) rowTemp;
            personRow.remove();
            try
              getDBTransaction().commit();
            }catch(JboException ex)
              throw ex;
        return true;
      }But somehow I got this idea, supposed I have this data
    PersonId          PersonName
    1               MANDER
    2               MANDERRY
    3               JERRYThe code getFilteredRows somehow only perform an 'exact' match but what if I want to delete both of the data
    with PersonName 'MANDER' above.
    My current code only removes the person with name 'MANDER' and not the 'MANDERRY'
    Thanks

  • Will downloading firefox change and delete my current internet?

    i have a apple mac laptop and i want to download firefox for games on facebook but will downloading firefox change and delete my current internet?
    == User Agent ==
    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/533.16 (KHTML, like Gecko) Version/4.1 Safari/533.16

    In short, no.
    You can set Firefox to be the default browser, but this is a free choice.
    Installing Firefox will in no way interfere with other installed browsers.

  • What is difference of truncate/insert and delete/insert ?

    hi all:
    what is difference of truncate/insert and delete/insert ?

    Hi,
    Truncate will truncate the table, which means there is a DDL operation to empty the table. DDL operations cannot be rolled back, but truncate is much faster than delete (because of that reason). If you do not require recovery of the deleted records in case of a failure, then truncate/insert is more optimal than delete/insert. Notice that for truncate to work, you cannot have enabled foreign keys pointing to the table. Truncate will never perform cascaded deletes.
    Hope this explains.
    Mark.

  • Change array size and delete duplicate row

    Hello,
    I am running a program that does a for loop 3 times.  In each loop, data is collected for x and y points (10 in the example provided).  How can I output the array with the 30 points in a simple 2D array (size 2x30)?
    Also, from the array, how do I delete duplicate rows that contain the same x-value? 
    Thanks,
    hiNi.
    Solved!
    Go to Solution.
    Attachments:
    array size.vi ‏10 KB

    Hello,
    THANK YOU for solving my first issue!  Attached is the data set that contains the duplicate entries for the x-axis values.  The y-axis value may be different, but not the x.  I would like to delete the 2nd row that contains the same x-value.
    Here is simple example of my input and desired output:
    IN: 
    28.512000 -115.310532
    28.812000 -86.937660
    29.112000 -116.877052
    29.412000 -87.223625
    29.412000 -111.349045
    30.012000 -86.510780
    30.312000 -112.048187
    OUT:
    28.512000 -115.310532
    28.812000 -86.937660
    29.112000 -116.877052
    29.412000 -87.223625
    30.012000 -86.510780
    30.312000 -112.048187
    I am thinking of comparig the last x-axis value to the current one, and if it is the same, then not parse that row.  The attached VI is as far as I got.
    Any help will be greatly appreciated.
    Thanks,
    hiNi
    Attachments:
    delete duplicate row.vi ‏8 KB
    data.txt ‏1 KB

  • Alv data upload and delete in database table

    hi .
       i have done data save in date base but not update and delete..writen this code..
    form save_data.
      CALL METHOD cont_editalvgd->check_changed_data.
      IF lt_display EQ it_city.
        MESSAGE s002(00) WITH 'No data changed'.
      ELSE.
        CLEAR: gd_answer.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            text_question  = 'Save_data?'
          IMPORTING
            answer         = gd_answer
          EXCEPTIONS
            text_not_found = 1
            OTHERS         = 2.
           delete
        IF sy-subrc EQ 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF ( gd_answer = '1' ). " yes
            lt_display = it_city.
         else.
         MESSAGE s001(00) WITH 'Action cancelled by user' .
         endif.
         endif.
        DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
        MODIFY zmg_city1 FROM TABLE it_city.
    *DELETE  zmg_city1  FROM it_city.
        clear it_city.
        COMMIT WORK.
       else.
         DELETE ADJACENT DUPLICATES FROM it_city.
      IF SY-SUBRC EQ 0.
         DELETE ADJACENT DUPLICATES FROM it_city.
         update zmg_city1 from it_city.
        COMMIT WORK.
      endif.
    *ent rows from it_city
       DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
    endform.                    "save_data
    not working update and delete ...plz say

    hi .
       i have done data save in date base but not update and delete..writen this code..
    form save_data.
      CALL METHOD cont_editalvgd->check_changed_data.
      IF lt_display EQ it_city.
        MESSAGE s002(00) WITH 'No data changed'.
      ELSE.
        CLEAR: gd_answer.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            text_question  = 'Save_data?'
          IMPORTING
            answer         = gd_answer
          EXCEPTIONS
            text_not_found = 1
            OTHERS         = 2.
           delete
        IF sy-subrc EQ 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF ( gd_answer = '1' ). " yes
            lt_display = it_city.
         else.
         MESSAGE s001(00) WITH 'Action cancelled by user' .
         endif.
         endif.
        DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
        MODIFY zmg_city1 FROM TABLE it_city.
    *DELETE  zmg_city1  FROM it_city.
        clear it_city.
        COMMIT WORK.
       else.
         DELETE ADJACENT DUPLICATES FROM it_city.
      IF SY-SUBRC EQ 0.
         DELETE ADJACENT DUPLICATES FROM it_city.
         update zmg_city1 from it_city.
        COMMIT WORK.
      endif.
    *ent rows from it_city
       DELETE ADJACENT DUPLICATES FROM it_city.
       update zmg_city1 from it_city.
    endform.                    "save_data
    not working update and delete ...plz say

  • Updating and deleting multiple rows

    Hi!
    I have a form on a table with report page where I can filter data through columns.
    1. Is it possible to create a button that will delete all the filtered data?
    2. Also, I would like to be able to update any column of the filtered dataset to a certain value (that needs to be input somehow). Is that possible?
    So far I can only update or delete one row at a time, which isn't useful as I sometimes need to change 100 rows at a time with the same value or delete them.
    When I use tabular form, I can't filter rows, but I can delete multiple rows...
    Also if there are similar examples, could you please send me a link; I can't seem to find any.
    I'm using Apex 4.2.2.
    Best Regards,
    Ivan

    Deleting multiple rows - [url https://forums.oracle.com/forums/thread.jspa?threadID=2159983]common question
    Best answered with Martin's example
    http://www.talkapex.com/2009/01/apex-report-with-checkboxes-advanced.html
    Depends how you filter your data. You could identify all your limiting variables, and reverse the where clause in a delete process.
    As for point 2, you can define a button that redirects to the page, and you can defined all the item values you like using the Action link.
    There is likely an example in the supplied package applications.
    Scott

Maybe you are looking for