Example of an OO ALV that reflects changes from an editable column...

Hello Experts,
I am currently developing a report wherein I need to add the value entered by the user to
another column. For example, Column A is editable and the user entered the value 100 in a
given cell. I need to add that value(100) to column B. Simple examples would be highly appreciated.
Thank you guys and take care!

Hi use this One.
WA_FIELDCAT-EDIT         = 'X'.
WS_LAYOUT-EDIT_MODE           =  'A'.
      CLASS event_receiver DEFINITION
CLASS EVENT_RECEIVER DEFINITION.
  PUBLIC SECTION.
    METHODS: HANDLE_TOOLBAR_SET
             FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
             IMPORTING E_OBJECT E_INTERACTIVE,
             HANDLE_USER_COMMAND
             FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
             IMPORTING E_UCOMM SENDER,
             DATA_CHANGED_FINISHED
             FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
             IMPORTING ER_DATA_CHANGED.
ENDCLASS.                    "event_receiver DEFINITION
*&       Class (Implementation)  event_receiver
       Text
CLASS EVENT_RECEIVER IMPLEMENTATION.
  METHOD HANDLE_TOOLBAR_SET.
  ENDMETHOD.                    "HANDLE_TOOLBAR_SET
  METHOD HANDLE_USER_COMMAND.
   ENDMETHOD.                    "HANDLE_USER_COMMAND
  METHOD DATA_CHANGED_FINISHED.
    LOOP AT ER_DATA_CHANGED->MT_MOD_CELLS INTO WA_T_MODI.
      READ TABLE IT_FINAL INTO WA_FINAL INDEX WA_T_MODI-TABIX.
      IF SY-SUBRC = 0.
        CASE WA_T_MODI-FIELDNAME.
          WHEN 'INTEREST'.
            WA_FINAL-INTEREST = WA_T_MODI-VALUE.
            WA_FINAL-TOTTDS = WA_FINAL-TDSAMT   + WA_FINAL-SURCHG + WA_FINAL-ECESS + WA_FINAL-HECESS +
                              WA_FINAL-INTEREST + WA_FINAL-OTHERS .
            MODIFY IT_FINAL FROM WA_FINAL INDEX WA_T_MODI-TABIX
              TRANSPORTING INTEREST TOTTDS.
          WHEN 'OTHERS'.
            WA_FINAL-OTHERS = WA_T_MODI-VALUE.
            WA_FINAL-TOTTDS = WA_FINAL-TDSAMT   + WA_FINAL-SURCHG + WA_FINAL-ECESS + WA_FINAL-HECESS +
                              WA_FINAL-INTEREST + WA_FINAL-OTHERS .
            MODIFY IT_FINAL FROM WA_FINAL INDEX WA_T_MODI-TABIX
              TRANSPORTING OTHERS TOTTDS.
        ENDCASE.
      ENDIF.
    ENDLOOP.
    CALL METHOD GV_GRID->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 1
            OTHERS   = 2.
  ENDMETHOD.                    "DATA_CHANGED_FINISHED
ENDCLASS.               "event_receiver
DATA : LCL_OBJ TYPE REF TO EVENT_RECEIVER.
CREATE OBJECT LCL_OBJ.
  CREATE OBJECT CONT
    EXPORTING
      CONTAINER_NAME              = 'CC_ALV'
    EXCEPTIONS
      CNTL_ERROR                  = 1
      CNTL_SYSTEM_ERROR           = 2
      CREATE_ERROR                = 3
      LIFETIME_ERROR              = 4
      LIFETIME_DYNPRO_DYNPRO_LINK = 5
      OTHERS                      = 6.
  CREATE OBJECT GV_GRID
    EXPORTING
      I_PARENT          = CONT
    EXCEPTIONS
      ERROR_CNTL_CREATE = 1
      ERROR_CNTL_INIT   = 2
      ERROR_CNTL_LINK   = 3
      ERROR_DP_CREATE   = 4
      OTHERS            = 5.
  SET HANDLER LCL_OBJ->HANDLE_TOOLBAR_SET     FOR GV_GRID.
  SET HANDLER LCL_OBJ->HANDLE_USER_COMMAND    FOR GV_GRID.
  CALL METHOD GV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
      IS_VARIANT                    = WS_VARIANT
      I_SAVE                        = 'A'
      IS_LAYOUT                     = WS_LAYOUT
      IT_TOOLBAR_EXCLUDING          = IT_FCODES
    CHANGING
      IT_OUTTAB                     = IT_FINAL
      IT_FIELDCATALOG               = IT_FIELD_CAT
    EXCEPTIONS
      INVALID_PARAMETER_COMBINATION = 1
      PROGRAM_ERROR                 = 2
      TOO_MANY_LINES                = 3
      OTHERS                        = 4.
  CALL METHOD GV_GRID->SET_READY_FOR_INPUT
    EXPORTING
      I_READY_FOR_INPUT = 1.
  CALL METHOD GV_GRID->REGISTER_EDIT_EVENT
    EXPORTING
      I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
  SET HANDLER LCL_OBJ->DATA_CHANGED_FINISHED  FOR GV_GRID.
Edited by: VipulKumar Darji on Oct 20, 2010 11:29 AM

Similar Messages

  • The application detected an error that prevents changes from being saved.

    Hi. I'm having this problem almost all the time when I do some color correction.
    "The application detected an error that prevents changes from being saved. To avoid losing your work, quit Final Cut Pro."
    Any ideas why this is happening?
    I'm on a 2010 Mac Pro running latest Mavericks and latest FCP X.
    I already removed FCP X, and all the effects I have installed. But still the issue persists.
    Thanks.

    That could have happened. I can't remember though.
    Is there any work around?
    I currently only have 1 open library and 1 event on it. If I move or copy that event into a new library, would that in theory work?
    Thanks for the help so far.

  • How to find all those list of SAP standard and custom objects that are changed from a specific point of time

    Hi all,
    Please let me know the process to track or find all the SAP Standard and custom objects. that got changed from a specific point of time.
    Is there any function module or any table where this change log is maintained.?
    I just only need the details ,wheather that SAP standard or Custom object has got changed or not.
    Thanks in advance

    Hi RK v ,
    I really don't know what your actual requirement is , but if you want to know the objects as per the modification , then transport request will be much help to you .
    Have a look into table E070 and E071 .
    Regards ,
    Yogendra Bhaskar

  • IPhoto Not Reflecting Changes From Photoshop

    Does anyone have any advice or guidance as to why changes I'm applying in Photoshop Elements 4 are not showing up in iPhoto 6.0.2 - particularly the modified file size after I've applied sharpening or other adjustments? The Finder knows that the file is now twice as large, but iPhoto continues to show the "old" size...
    Thanks in advance for any information.
    -Darren

    Hi Darren,
    Are you using PS Elements as the external editor as set up in iPhoto Preferences? If not, then that is your problem.
    Editing photos in another application
    You can do many editing tasks in iPhoto, such as rotating and cropping a photo, changing a color photo to black and white, adjusting exposure and contrast, and reducing red-eye. If you want to make other changes to a photo, you can open it in another image-editing application, such as Adobe Photoshop.
    To edit photos in another application:
    Set your preferences to open photos in another application when you double-click them or click the Edit button. (See Related Topics below.)
    Double-click the photo to open it in the application.
    Edit the photo and save it using the same name and file format.
    The changes you made to the photo will be visible when you return to iPhoto.
    IMPORTANT: When you double-click a RAW-format photo, iPhoto creates a copy of the photo in JPEG format, which opens in the other application. To edit the photo in its original RAW format, drag the photo from the iPhoto window to the Finder, and then use the other application to open it. (If you previously used iPhoto to edit the RAW photo, select the photo and choose Photos > Revert to Original before dragging it to the Finder. This way, you can edit the photo using its RAW data in the other application.) If you want to import the photo back into iPhoto, you must first save it as a JPEG or TIFF file.

  • Change URL of Edit column and Title column link that appear on AllItems.aspx

    Hi there,
    In the below snapshot. I am trying to change the URL of the Edit column and Title Column. By default when click on Edit Icon on each item, it opens the EditForm.aspx for that item. Similary by clicking on title of an item, it opens DispForm.aspx.
    I need to change it to my custom forms, CustomEditForm.aspx and CustomDispForm.aspx . Could anybody please suggest if it can be done by any Jquery or using SPD
    I know I can change the default forms from SPD.
    I don't want to change the default forms. Because for some users I need to show them default forms. for some users I need to show custom forms.
    Many Regards,
    Khushi
    Khushi

    Hi Alex - I understand that I need to identify users. I have the following script for that. But Where should i write so that redirection applies to all the condition items in AllItem.aspx 
    function IsGroupMember(GroupName)
    var isGroupMember = false;
    $().SPServices({
    operation: "GetGroupCollectionFromUser",
    userLoginName: $().SPServices.SPGetCurrentUser(),
    async: false,
    completefunc: function(xData, Status) {
    if($(xData.responseXML).find("Group[Name='" + GroupName + "']").length == 1)
    isGroupMember = true;
    else
    return isGroupMember;
    Khushi

  • TCodes that have changed from 4.7 to ECC 6

    Hi,
    We are planning a upgrade from 4.7 to ECC6. Is there any readily available list of:
    1) Transaction Codes that have undergone a change from 4.7 to ECC 6?
    2) transactions that have become obsolete?
    Regards
    Peter

    Thanks Gautham for the prompt response.
    That means that I can only come to know of the changed TCodes after I upgrade and not before that? Or can I look at this table in any other company's ECC 6 system and get the data?
    Will company specific cutomisation have any bearing on the changes done by SAP to the std TCodes?
    Also does this table give the complete list of changed TCodes?  Also is there any table, FM etc which also gives what has been changed in these TCodes?
    Peter

  • Why can't I type in my new word doc that I changed from PDF?

    I need help! I can't type in my word doc that I converted from PDF.

    You may have visited a website that has disabled the location bar.<br />
    Try to open a new window to see if that gives you a working location bar.<br />
    If that works then close the not working window and close and restart Firefox to see if that stays.<br />
    * http://kb.mozillazine.org/Prevent_websites_from_disabling_new_window_features
    * http://kb.mozillazine.org/JavaScript#Advanced_JavaScript_settings

  • Problems with ALV - Excel after changing from 640 to 710

    Hi all,
    first i have to say, that i have tried to set this thread in the SAPGUI-Forum,
    but i didn't get any answers, therefore i try it here.
    I have changed our SAPGUI from 640 to 710. Now i get problems
    with ALV-GRID display.
    When i change the output to EXCEL-Inplace i get the Error-Message:
    0K000
    View cannot be switched: Product is not installed or integration is not active.
    In 640 i don't have any problems. We have ECC6.
    When i use GUI710 and SAP 4.6C i don't have any problems.
    Simple Test is possible with SE16N and change ALV output to excel-inplace.
    Can anybody help?
    Thanks.
    Regards, Dieter

    Hi Dieter,
    we had a similar problem who we resolved installing path the GUI710_1-10002995.EXE.
    Have you tried to install the patch?
    Bye
    Giovanni Mortati

  • Library alerts dont reflect changes from all users

    We have weekly alert setup for document changes made to a site but not everyone's changes are getting reflected in the email that shows up. How would I go about troubleshooting that?
    Free computer help and tips http://www.onlinecomputertips.com

    THere are so many possibilities, may help to know more about how your library is set up...
    For instance - Versioning (major/minor) & or Content Approval?  Draft Item Security? Permissions of those getting alerts (are they contributors, approvers, full control)?How many times are items being updated during the week?  IS it possible
    only the last changes are showing, or that those receiving the alerts don't have access to drafts, and are therefore only seeing "published" changes vs saved?  Have you tried setting up an "immediate" alert and seeing if they get notified on
    every change or on certain ones?  There are just so many things that come into play, more info is needed. 

  • Can I reclaim the broken part, that was changed, from Apple store?

    Hello All,
    I am an apple customer since 11 years and for the first time, I am sad to say, I had the worst experience at the Apple Store Fiordaliso in Milan, Italy.
    I have had problems with my screen (zig-zag and then at restart white screen), which was not exactly the best timing in the middle of Fashion Week work etc... so I took the computer to the apple store Fiordaliso to check it out. The first guy (lets call him Mario) runs a diagnostic on it which looks like the attached image below, where I saw that the RAM the HDD the CHARGING and maybe THE BATTERY might have issues.
    Then Mario tells me its the motherboard. Hm... but not according to the diagnostics. So when he leaves I catch another guy (call him Luigi) and he runs the diagnosics again, comes up with the same result and tells me the RAM is fine, its just not apple RAM but accepted, the HDD might be the issue and probably its electricity supply. I ask him if he is sure if its not the motherboard, and Luigi says, that no, he doesnt think so. his solution would have costed me 38€ plus tax. What Mario told me costed 487€... I liked Luigi more...
    Anyway, My computer was taken in by Luigi for repair. But later in the evening Mario calls me and says he has detected the issue and will change the motherboard. I asked him about what happened with Luigi's diagnosis??? He says he ran a test again and its the motherboard. Having no choice, since I needed the computer ASAP, I told him okay, but I want the broken motherboard back! He says ok and hangs up.
    Today I went to the Apple Store Fiordaliso to pick up the computer. And Mario came out, gave me the computer and the bil but no broken part. When I asked him where is it, he started to say this and that, that APPLE CANT GIVE BACK THE BROKEN PIECE BECAUSE IT IS THEIR POLICY. After a long italian (means pointless) argument, Mario tells me that he cn change the parts back as they were NOW and give me back the computer as it was. I said, no I simply want the piece, thats all. I have asked for the manager, who told me the same thing and repeated it about 10 times. eventually I told them "okay, guys this is weird, just show me the piece then and I leave". By then MArio has disappeared entirelly, not to be seen again and the manager left me as well, waiting for about 30 minutes, then I caught him when he finally reappeared for a second. He called a technician (at this point I didnt believe even their questions nor gender). This technician (lets call him Benito) starts very smooth, repeats the EXACT same sentences I have heard so far until the point when he said, I cant have the broken part back because it is already in China for refurbishing. I asked him, how is that possible, since Mario told me only an hour before that he can change it back right now, no exlanation just loud talks and HE is getting agressive, to the point that he reaches over the table, takes my computer away and says, that I have two options: I pay and leave with the co puter or the computer stays. I kind lost it right there and took the computer back, when a civil policeman standing behid us and watching the story, intervened. Luckily he found it weird hiself, but of course he didnt make much difference at the end. I have agreed to pay the 478€ and tried to force some kind of an agreement out of the italians, but no use. I needed my computer back desperately...
    As a last word the policeman forced Benito to at least give me some point which I could prove to myself that the switch has been done. Benito said, if my home wireless network does not recognises my computer then they have done they job properly and the motherboard has been changed.
    Now I am home. My home internet connected automatically...
    Anyone has any idea what can I do about it now??? How can I find out what are (were) the original parts of my computer? Can or would Apple help me with this issue?? I have never had any problems with Apple but this was extreme and I feel totally just laughed in the face.
    Thanks for the help in advance
    cheers
    Adam

    You will have to restore the new iPhone to erase all the data that is still on it. Usually, the seller does this before the transaction. But after you restore the iPhone, you will be able to use it as if you bought it from apple that same day.
    Try arranging a meeting with the seller before paying though, just to be sure the thing works fine. If it works fine for him, it will work just as good for you.

  • Reflecting changes from one production DB to another production DB

    Hi,
    I have a central production database(A) and 3 other small production databases(B,C,D).I need to copy all the changes which occur in B,C and D into A every day.What will you suggest is the best way to do so?Just a thought ,can we do export/import between B-A,C-A,D-A or should we do a export/import into the test database for A and then another export/imp onto the main production database A.
    Any guidance on this will be highly appreciated.
    Thanks,
    Somd

    There are several ways to implement this, depending on your database edition (Standard or Enterprise) and version.
    You can use streams, replication, and home-made solutions of different flavors: using dblinks, expdp/impdp, etc.
    The tables on B,C,D are not modified on A ?.
    The data to be extracted from B,C,D is unique in all databases or you will need to decide between many similar records (by pk) which is the valid one to insert into A and discard the others ?
    Supposing the simplest scenario, where your application is sharding data across different databases (which makes them unique globally) and it is a small set of records every day, and you want to copy manually that data to A, then could be valid to do an export from each database B,C,D and then load each one into A, because you won't have conflicts with the data to be loaded.
    As you can see, the solution will depend on the complexity of your scenario.
    You can find on OTN a good guide to data replication: http://www.oracle.com/technetwork/database/features/data-integration/default-159085.html
    Regards.

  • HT1338 My MacBook Pro is running OSX 10.6.8.  I understand that to change from Mobile me to the Cloud I need to run 7.1.  There are no updates outstanding.  After reading this update page, I do not know what to do next to get to 7.1, or am I ok with curre

    I am trying to move from Mobile me to The Cloud which requires version OSX 7.1.  My version is 10.6.8 and is fully updated using the instructions provided on how to perform the transfer to the Cloud.  What do I do next to get to the 7.1?

    Welcome to Apple Support Communities.
    If your computer meets the minimum requirements, you can purchase and download OS X 10.7 'Lion' from the Mac App Store online. It is also available on a flash drive at about double the price of the download.
    http://www.apple.com/macosx/
    Specs, minimum hardware requirements, and upgrade paths for OS X 10.7 'Lion' are also listed here:
    http://www.apple.com/macosx/specs.html
    Even though Lion runs in 2GB system RAM, 4GB or more is highly recommended.
    Also be aware that Apple recently announced the next version of OS X, 10.8, called 'Mountain Lion', but no firm date for availability, other than 'coming this summer.'
    http://www.apple.com/macosx/mountain-lion/

  • Applications view changes from Icons to Column

    I've gone into applications and checked icon view. All worked well til a month or so ago. When I went in to apps. I noticed it was in column view. I switched it back to icon view, then shut down. Next day, same thing. Apple couldn't give me a resolution. It's not really a big deal, since I'm not in there much, but it would be nice to know what the problem is. Any suggestions?

    Ok, I tried that. The terminal did nothing so I added sudo in front of the pasted text mv /Applications/.DS_Store ~/.Trash/DS_Store and I got a sort of warning with three points ( one was something about with great knowledge comes great power, another was respect others, something like that.) Then it prompted me to enter my password. I did, the screen did nothing, like you typed, and then I went to empty the trash but the trash was empty. I tried to do it again, but nothing. Am I missing something. When you type "run" you mean enter it in the line where the command prompt is and then press enter, or am I doing it wrong? Thanks for your reply, and I'm going to log out and try again.
    Bob

  • Finder: Changing from thumbnail view to column view takes me back to the root folder.

    Hi,
    I was hoping someone could help me with this as it's getting a bit tedious having to re-navigate back to the folder I was in. This problem is only occuring when I am working from an external NAS Drive.
    I need to switch between thumbnail view and column view regularly, but whenever I change from thumnails to column - finder jumps back to the root folder, meaning I have to work my way back to where I was.
    I can't figure out how to stop this happening! It doesn't happen when changing from column to thumbnails, only the other way round..
    Thanks for any suggestions!
    Sarah.

    Hi Barney,
    Thanks for your reply Unfortunately though I already use AFP on the NAS drive and still have the problem, so it seems this is an issue with both AFP and CIFS..

  • Change the tax code at order header level that reflect the change in all it

    Dear consultant,
    Change the tax code at order header level that reflect the change in all items lines under this order
    Facts:
    Define tax code,
    Assign it to bill & ship to customers,
    I do all setup in oracle receivable guide for defining tax
    Examples: I navigate to order management to create order
    First I select the customer and order type after that I navigate to tab line
    I enter the item in the first line the tax code coming by default
    I enter the second items line also the tax code coming by default etc three ,four, five until line 40
    Now I want to change the tax code for all items but not by enter and change it in each line? No,
    I want the way that I change Tax Code at order header after that the change is reflect in all items line
    Business Impacts:
    Suppose I create order include 40 items , I want to change the tax code that coming by default , that require me to enter in each line to change tax cod 40 times ,this not logic and not acceptable from my customer

    Hi,
    The defaulting rules apply only for the first time when you are adding new lines on to the Sales Order. Respective field vaues will be defaulted from the SO header level.
    In case, if you want to update all the 40 lines for Tax Code in one shot, then please select all the lines on the sales order, try Mass Change.
    (Navigation: Tools->Mass Change).
    Regards,
    Hemanth

Maybe you are looking for