How to create new or delete the existing row in the grid....

hi my friends...
i am developing report using Reuse_alv_grid_display...
my requirement is... At runtime
          1.  i may create new row on the grid (empty row inwhich  i may enter the data).
          2.  i may delete a existing row in the grid
          3.  i may edit the existing data...
then i have to trace the modification in the grid in one internal table...
how can i get into this.....
note:
i have some idea to edit the existing record in the grid and trace those modification,
but i don't know abt how to create new or delete the existing row....
can you give me some idea...

Hi deva,
write a class which implemets these methods
CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
To handle the toolbar on alv
     handle_toolbar
       FOR EVENT toolbar OF cl_gui_alv_grid
          IMPORTING e_object e_interactive,
To handle the buttons on the alv grid
     handle_user_command
       FOR EVENT user_command OF cl_gui_alv_grid
       IMPORTING e_ucomm.
endclass.
Now Implement these methods.
CLASS lcl_event_receiver IMPLEMENTATION.
To handle the toolbar on alv
  METHOD handle_toolbar.
   DATA ls_toolbar  TYPE stb_button.
    CLEAR gs_toolbar.
    MOVE 3 TO gs_toolbar-butn_type.
    APPEND gs_toolbar TO e_object->mt_toolbar.
    CLEAR gs_toolbar.
    PERFORM icon_create USING 'ICON_INSERT_ROW' gs_toolbar-icon.
    MOVE text-010 TO gs_toolbar-function.
    MOVE text-012 TO gs_toolbar-quickinfo.
    MOVE ' ' TO gs_toolbar-disabled.
    APPEND gs_toolbar TO e_object->mt_toolbar.
    CLEAR gs_toolbar.
    PERFORM icon_create USING 'ICON_DELETE_ROW' gs_toolbar-icon.
    MOVE text-011 TO gs_toolbar-function.
    MOVE text-013 TO gs_toolbar-quickinfo.
    MOVE ' ' TO gs_toolbar-disabled.
    APPEND gs_toolbar TO e_object->mt_toolbar.
  ENDMETHOD.
   METHOD handle_user_command.
In this form, check the function code(e_ucomm has the function code), based on that do the required action.
as i said yesterday(i.e for appending a row, deleting a row, modifying a row)
    PERFORM user_command USING e_ucomm.
  ENDMETHOD
endclass.
Before calling the alv method, create a object of this class.
DATA :
      gref_event_receiver  TYPE REF TO lcl_event_receiver,
      gv_tables_alv          TYPE REF TO cl_gui_alv_grid.
      CREATE OBJECT gref_event_receiver.
      SET HANDLER   gref_event_receiver->handle_user_command
                    FOR gv_tables_alv.
      SET HANDLER   gref_event_receiver->handle_toolbar
                    FOR gv_tables_alv.
check this program for event handling, it is the similar way
demo_abap_objects_events
Hope u understood this.
Regards,
Prasant
reward if helpful

Similar Messages

  • How to create new genius playlists from existing music in library?

    I tried the genius button for creating lists from existing music in my library. The problem is that it continues to show the first list created no matter what song I highlight then hit the genius button. Genius works fine for creating lists I can purchase online, but not new ones from my own music.

    This is the iTunes for Mac forum.
    As you are running Windows you will probably get a better response from posting in the iTunes for Windows forum:
    http://discussions.apple.com/category.jspa?categoryID=150

  • How to create new playlist. File option greyed out

    The create playlist option is greyed out in the File menu. How do I create I new playlist? What is wrong with the new version?

    Hi;
    How to create new alertlog file. Does it require the DB bounce?Oracle will automatically create a new alert log file whenever the old one is deleted and you dont need to bounce db
    For details see:
    http://orafaq.com/wiki/Alert.log
    Regard
    Helios

  • How to create New Work Center

    Dear Experts
                      How to create New Work Center?, what are all the inforamtions  need while creating workcenter.
    Regards
    Rajakarthik

    Hi,
    In addition to the above post, you need to identify that:
    1. Whether you need separate activity types and cost center for the newly created work center. These details are entered in the Costing View of the Work Center.
    If these are required then use KL01 to create new activity, KP26 to define the activity price.
    If required create cost element using T Code KA01 and Cost Center using KS01.
    Take help from the CO guy on this.
    2. Also  you need to ask the concerned about the operating times for the wor center. That is Start time and End time of WC. It is used for capacity evaluation and scheduling of the orders. It is maintained in the capacity view (Bottom left Button in the view).
    this view will also contain the details regarding the calendar, to be assigned to the work center, if needed. Collect details for this requirement. Also you can assign a different calendar to WC apart from factory calendar.
    3. Find out whether this WC will be operating in shifts or not. Accordingly maintain the details.
    Hope it is useful for you.
    Revert for clarifications
    Regards,
    Rohit.

  • How to create new valuation modifier OBYC

    Hi Friends,
    I need to have new  Valuation modifier  in OBYC.
    How to create new valuation modifier,Please help to know the path.
    Thanks in advance for great hlp.
    RAMAN.

    If I understand Your requirement that You need to give the Account Modifier Like GBB ?
    i.e you need to do different Valuation Grouping code.
    then go to
    SPRO > Materials Mangemtn > Account Determination > Account Determination Without Wizard > Group together Valuation Areas.
    Then when you go to OBYC and Choose the Transaction / Event Ket pop up will ask you to enter the Chart of account
    latter
    under Rules
    you will find Account Modifier , Valuation class and Account Posting key as per your selection you can do.

  • In iPhoto 11, I know how to create new libraries.  I do not know how to split my existing large library into the new ones.

    In iPhoto 11, I know how to create new libraries.  I do not know how to split my large existing library into the new libraries?

    You need to use the iPhoto Library Manager.
    (66928)

  • Create a new bookmark under an existing bookmark in the tree

    I have a script to search through a time sheet report for the pages without the string "Employee Signature" and to then create new bookmarks under the existing bookmarks in the tree.
    So far the script will execute the book marks for the pages in the time sheet report without the string "Employee Signature".
    At the last bookmark executed it will insert a new child bookmark before the following console error appears.
    this.bookmarkRoot.children[(m + 1)] is undefined
    19:Console:Exec
    TypeError: this.bookmarkRoot.children[(m + 1)] is undefined
    19:Console:Exec
    of 128
    If someone can please advise where the script is going wrong it will be very much appreciated.  The script is as follows:
    var ckWords; // word pair to test
    var bFound = false; // logical status of found words
    // loop through pages
    for (var m = 0; m < this.numPages; m++ ) {
       bFound = false; // set found flag to false
       numWords = this.getPageNumWords(m); // number of words on page
       // loop through the words on page
       for (var j = 0; j < numWords-1; j++) {
          // get word pair to test
          ckWords = this.getPageNthWord(m, j) + ' ' + this.getPageNthWord(m, j + 1); // test words
          // check to see if word pair is 'Employee Signature' string is present
          if ( ckWords == "Employee Signature") {
             bFound = true; // indicate found logical value
             break; // no need to further test for this page
          } // end Employee Signature
       } // end word loop
       // test to see if words not found
       if(bFound == false) {
            var nLastSub = this.bookmarkRoot.children[(m+1)].children.length-1;
            this.bookmarkRoot.children[m+1].children[nLastSub].execute();
    this.bookmarkRoot.children[m+1].children[nLastSub].createChild("Employee Signature Reqd", "this.pageNum = " + (m+1));
        } // end not found on page  
    } // end page loop
    Thank you

    I need to place a new bookmark underneath the existing bookmarks for the pages that do not contain the words "employee signature".
    I am not sure how to refer to the existing bookmark on those pages.
    Tried to revise the script, and now all of the new bookmarks are created underneath all of the existing bookmarks for every page in a continuous loop.
    I need a new single bookmark underneath the exisiting bookmarks on the pages that do not contain the words "employee signature".
    Can you please help?
    var ckWords; // word pair to test
    var bFound = false; // logical status of found words
    // loop through pages
    for (var m = 0; m < this.numPages; m++ ) {
       bFound = false; // set found flag to false
       numWords = this.getPageNumWords(m); // number of words on page
       // loop through the words on page
       for (var j = 0; j < numWords-1; j++) {
          // get word pair to test
          ckWords = this.getPageNthWord(m, j) + ' ' + this.getPageNthWord(m, j + 1); // test words
          // check to see if word pair is 'Employee Signature' string is present
          if ( ckWords == "Employee Signature") {
             bFound = true; // indicate found logical value
             break; // no need to further test for this page
          } // end Employee Signature
       } // end word loop
       // test to see if words not found
       if(bFound == false) {
    for (var i=0; i < this.bookmarkRoot.children.length; i++)
            var nLastSub = this.bookmarkRoot.children[i].children.length-1;
            this.bookmarkRoot.children[i].children[nLastSub].execute();
    this.bookmarkRoot.children[i].children[nLastSub].createChild("Next Page", "this.pageNum = " + (m+1));
        } // end not found on page  
    } // end page loop

  • My friend gave me ipod touch with all his accounts, i created new accounts but when i went on the appstore and tried to update apps installed by him,i was asked his account's password! i dont know his password.how can i use my account to update apps?

    my friend gave me ipod touch with all his accounts, i created new accounts but when i went on the appstore and tried to update apps installed by him,i was asked his account's password! i dont know his password.how can i use my account to update apps?

    You can't.  Apps and really all content purchased/downloaded through one Apple ID is forever tied to that Apple ID.  In the case of Apps they will always request that Apple ID to update as they are licensed to that Apple ID.
    In reality, the Apps were licensed to that Apple ID by the developer.  And cannot simply be given away to you for you to use.
    He should have wiped the iPod clean so you could set it up for your use without any of his accounts or purchased content as you are not really licensed to any of those Apps.
    Your friend should have followed this support document before giving the iPod to you:
    What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support

  • How to create new actions ? in the interaction record screen

    Hi all,
    I'm working with the IC web client.
    In the interaction record screen the is a link to actions.
    But how to create new actions ? schedule actions ?
    Component "ICCMP_BT_INR"
    View "InrHeaderViewSet"

    Hi Eran,
    Gret is absolutely right ..The actions are transaction type specific and can be attached along in the customizing as mentioned above by gret , these can then be tested in the SAP gui first for their scheduled and start conditions and then in the ICWC.
    There is no special settings for actions in ICWC if they are there in your transaction they will come in the ICWC.
    Hope this helps
    Regards
    Raj

  • HT1351 Can you take the music off the existing library on the ipod and sync it to a new itunes library?? and if so how do you do this???

    Can you take the music off the existing library on the ipod and sync it to a new itunes library?? and if so how do you do this???

    See this excellent User Tip from another forum member turingtest2 on how to recover content from your iPod back into iTunes.
    https://discussions.apple.com/docs/DOC-3991
    B-rock

  • How do you move a track region in Garage Band to a new starting point without altering the existing length of the track?

    How do you move a track region in Garage Band to a new starting point without altering the existing length of the track? Thanks.

    What exactly are you trying to do? You can drag any region by grabbing it in the middle of the upper area with the highlighted name of the region. However, if you move it towards the end of the track, the length of the track will get longer, to accommodate the extra part of the region. DO you want to speed up the region, to shorten it or do you want to trim it? You can simply grab the right margin of the region and drag it, to make the region shorter.

  • I have new music I am adding to my itunes.  My ipod has the existing music from my itunes.  I want to delete the existing music from the ipod and only select the new music just imported into itunes be sync'd on to my ipod?

    I have new music I am adding to my itunes.  My ipod has the existing music from my itunes.  I want to delete the existing music from the ipod and only select the new music just imported into itunes be sync'd on to my ipod?

    Open itunes, connect ipod, select what you want to sync ( in the music tab)  sync.

  • I used time machine to restore on a formatted MAC. Now the HDD space has reduced by 100GB but I cannot see any of the files. How do I find and delete those 100GB data from the HDD?

    I used time machine to restore on a formatted MAC. Now the HDD space has reduced by 100GB but I cannot see any of the files. How do I find and delete those 100GB data from the HDD?

    dglenn9000 wrote:
    I created a new user account just to see if it was my user Library or if there was something wrong with my system. And the new user account is doing most of the same things so I will need to do a full restore anyway.
    Not necessarily. I'd suggest downloading and installing the "combo" update. That's a combination (thus the clever name) of all the updates to Leopard since it was first released, so installing it should fix anything that's gone wrong since then, such as with one of the normal "point" updates. Info and download available at: http://support.apple.com/downloads/MacOS_X_10_5_8_ComboUpdate Be sure to do a +Repair Permissions+ via Disk Utility (in your Applications/Utilities folder) afterwards.

  • How can I edit or delete a custom label in the contacts list on iOS 7 on iPhone 4S ?

    How can I edit or delete a custom label in the contacts list on iOS 7 on iPhone 4S ?

    Alfre311 wrote:
    I've been trying to find a way to do this since I updated to IOS 7, and I've just found the solution/explanation, even tho is a bit heavy to carry out.
    IOS 6 creates custom labels and save them giving you the option to delete them.
    IOS 7 creates custom labels but don't save them, so there is no need to have the option to delete them.
    But here comes the problem, if you have some custom labes saved in you Iphone / Ipad with IOS 6 and you update it to IOS 7, the device will keep those labels saved, but you wont be able to delete them.
    I realized this by going to contacts on Icloud. There those labels that I had on my devices weren't there. So simply restoring your device and configuring it as a new one to later sync your Icloud Contacts, will solve the problem.
    I know this post is old, but I might just try this with iOS 8. I have outdated custom labels that annoy me, because I still seem them in the list as options. If I get desperate enough, I may try your solution.

  • How to create new page in wlp in runtime

    hi,
    How to create portal pages in run time (not at the admin console) give an option to the end users to create pages and configure it.
    Thanks
    Manu

    Hi Manu
    1) Can we entitle the page created to display to some users.
    You mean the "Page(s)" created by the End User when he clicks on Customize link. If so, note that this page will be available ONLY to that user. There is no other special entitlements to be assigned to. Because every user who customizes desktop will have his own set of Books/Pages/Portlets in the backend Portal Database schema. BUT if you want to set Entitlements to the Pages created by the Adminstrator, then YES, you can always set Entitlements to that Page, so that only specific set of Users, Roles (users belong toRoles) can access those Pages.
    2) Can we change the hyperlink of the page to some other external page.
    I am not clear with this question. When we create a Page from WorkshopIDE or Portal Admin Console or through DVT, first thing is, this page will have a unique page definition label. Now assume this page is part of some Book. So When this portal (or deskop) is rendered, Portal Framework Look and Feel files, will iterate through list of all Books and for each Book list of all Pages and construct the Menu(s) which are nohting but Hyperlinks. During this process, the hyperlink will be appended with the definition labels of each Page etc which is retrieved from Database (or .portal xml file incase of filemode). So you cannot change the hyperlink to point to someother page. Worst case, if you really want, then you need to modify the portal framework menu rendering code, to change the urls for specific page. Say PageA should be reidrected to PageB. So in your custom menu rendering code, when you hit the PageA, there check for page def label of PageA and if it matches, then add a different page def label say for PageB definition label. This is complex, but can be achieved. But my very first question is why do you want to do this and what is your exact usecase.
    Note that you can always generate dynamically Links for any Portal Pages using render url tags or APIs (PostbackURL, GenericURL etc). You can have this kind of code in any JSP or Pageflows.
    PostbackURL homeURL = PostbackURL.createPostbackURL(request, response);
    homeURL.addParameter(PostbackURL.PAGE_LABEL_PARAM, "page_card_services_1"); //page_card_services_1 is a page def label of some other page that I want to redirect to
    3) Can we integrate the page creation to the BPEL workflow.
    BPEL Workflow is nothing but a WebServices. Using CustomCode, this may be possible. One way I can think of is like this. First you need to have code/logic in some Pageflow or utility class to call BPEL Workflow. As mentioned first you need to create a WebServices client JAR for this BPEL WebServices. Then add this jar to the web-content/web-inf/lib folder. Then in pageflow or utility class, get the Service, Port and invoke process method on this BPEL and pass some input parameters. Now BPEL will do some internal processing and will return the page definition labels in the response XML object based on input parameters. Then in the Pagelfow or utility class, from this response object, extract page def label and use the above code snippet to redirect to that page. This should work.
    4) is there a way allow users to create new portlets from ucm and add content to the portlets.
    When we allow customization for end users, usually they can choose from list of Look and Feels, create or edit Books/Pages. They cannot create Brand New Portlets. From existing list of Portlets, they can add or remove them from any Page. NOW, if you use latest WLP 10.3.2, you can consume WebCenter ADF Portlets using WSRP. Also I guess there is a plug in for UCM with WLP 10.3.2. I did not work in this area so do not have full details. But assume that you already have some UCM Portlets integrated into your portal application by adminstrator. Then End User can choose to add these UCM Portlets to the pages that he cretaes. NOW coming to the content of the Portlets, this is something you can handle through Portlet Preferences. Considerr default out of box WLP original pageflow portlets. You can have some search criteria in a content portlet. This search criteria can be modified using Edit icon ie. Portlet Preferences. So user can customize the search criteria and get the results he is interested in.
    Thanks
    Ravi Jegga

Maybe you are looking for

  • Iphone map issue

    Since updating my iphone 4 to IOS5 maps only shows the council area you are in, not the actual suburb

  • N96 - too much music, cant choose ring tone

    is it me, or do they need to change the software slightly to not look for all music when you want to choose a ring tone in a profile setting... i have over 2000 music files and its impossible to find a ring tone youve uploaded to it, or one of the pr

  • GR for Low Price Material

    Dear All, My Client dont want to make PO for the Value less than Rs 500.For that he wants to make the direct Gr of Good & Bill pass for that afterward. If I do with 501 without PO then there will be an entry in GR IR account at the time of GR.then Ho

  • Mass cancellation of students booked to events - Modules

    Is there a provision for mass cancellation of students booked to events and if so how is it done?.Similarly for modules.

  • How do i find my ical data

    i have looked in the application support folder but there are lots of files there.....if i need to restore that data....where do i get it?? thanks so much.