ALV refresh with the Old Data

Hi All,
I have a question with OO ALV. I have an Editable ALV output which contains around 10 fields. In the output the User can Edit/Insert/Delete the Records, and on the application tool bar I have a button (CHANGE)by which the user can swtich between the change and display mode of ALV.
Once the ALV list is displayed, when the user click on change the output is open for Editing. Lets say the user deletes the record, and again clicks on the change(which should take to display) by giving the message "Changes made will be lost" and the old data should get displayed.
The logic i followed is,
1. displayed the ALV.
  CALL METHOD gr_grid->set_table_for_first_display
    EXPORTING
      it_toolbar_excluding = gt_exclude
      is_layout            = gs_layout
    CHANGING
      it_fieldcatalog      = pt_fieldcat
      it_outtab            = pt_outtab[].
2. when I click on the change button, the ALV is set for Edit using
        CALL METHOD gr_grid->set_ready_for_input
          EXPORTING
            i_ready_for_input = 1.
lets say, now the record in the output is deleted, and I clicked on Change again, which should take me to display with the old data.
can you help me in displaying the old data.

It works good for me.
I copied the program BCALV_EDIT_01 to Z program and add the required logic. Backup of the table after the ALV display
    gt_backup = gt_outtab.
Refreshing the ALV table display in the perform SWITCH_EDIT_MODE
*§3.Use IS_READY_FOR_INPUT to fetch current substate of editable cells.
  IF g_grid->is_ready_for_input( ) EQ 0.
*§4.Use SET_READY_FOR_INPUT to switch between the substates.
    CALL METHOD g_grid->set_ready_for_input
                     EXPORTING i_ready_for_input = 1.
  ELSE.
*------ ADD Begin
    message I398(00) with 'Data not saved.!'.
    gt_outtab = gt_backup.
    g_grid->refresh_table_display( ).
*------- ADD end
    CALL METHOD g_grid->set_ready_for_input
                     EXPORTING i_ready_for_input = 0.
  ENDIF.
Regards,
Naimesh Patel

Similar Messages

  • Page is not refreshing with the correct data.

    Hello experts,
    I have an unusual situation and I'm not sure why it is happening. We have 3 instances and the error is occurring in one of them.
    So here is the issue:
    1) I created a custom extended controller for a customer site form to check the character length of address lines 1 and 2.
    2) User creates a new contact under customer site. On the contact creation page, the contact information is entered and click Apply.
    After the contact has been created, the application directs you back to the customer site page.
    3) On the customer site page, the user clicks Apply again. The custom extended controller runs and then it takes you back to the customer site page.
    4) Now the page has some other address that is not in anyway related to the customer.
    5) I checked in the back end and the address is associated to hz_parties.party_id = -1.
    If I remove the custom controller the page refreshes with the correct address information. What I am baffled is that it is only happening in 1 of the 3 instances (all using Release 12.1.3).
    I already asked the dba to bounce middle tier/apache, cleared the cache and it is still having the same issue.
    Anyone have any idea why this is happening?

    Here's the custom controller code:
    package xbol.oracle.apps.ar.cusstd.acctSite.webui;
    import java.io.PrintStream;
    import oracle.apps.ar.cusstd.acctSite.webui.ArAcctSiteOverviewCO;
    import oracle.apps.fnd.framework.*;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.jbo.Row;
    public class XXF5ArAcctSiteOverviewCO extends ArAcctSiteOverviewCO
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    System.out.println("Running extended controller processRequest......");
    super.processRequest(oapagecontext, oawebbean);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    System.out.println("Running extended controller processFormRequest......");
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    String s = oapagecontext.getParameter("event");
    System.out.println((new StringBuilder()).append("Event: ").append(s).toString());
    System.out.println((new StringBuilder()).append("OkButton: ").append(oapagecontext.getParameter("OkButton")).toString());
    if(oapagecontext.getParameter("Save") != null || oapagecontext.getParameter("Apply") != null)
    System.out.println("Start of validation");
    OAApplicationModule AddressAM = (OAApplicationModule)oaapplicationmodule.findApplicationModule("HzPuiAddressAM");
    if(AddressAM == null)
    throw new OAException("Error: Stale Data - The requested page contains stale data. This error could hav" +
    "e been caused through the use of the browser's navigation buttons (the browser B" +
    "ack button, for example)."
    , (byte)0);
    System.out.println((new StringBuilder()).append("HzPuiAddressAM: ").append(AddressAM).toString());
    OAViewObject AddressVO = (OAViewObject)AddressAM.findViewObject("HzPuiLocationVO");
    System.out.println((new StringBuilder()).append("HzPuiLocationVO: ").append(AddressVO).toString());
    if(AddressVO == null)
    throw new OAException("Error: Stale Data - The requested page contains stale data. This error could hav" +
    "e been caused through the use of the browser's navigation buttons (the browser B" +
    "ack button, for example)."
    , (byte)0);
    Row AddressRow = AddressVO.getCurrentRow();
    System.out.println((new StringBuilder()).append("AddressRow1: ").append(AddressRow).toString());
    if(AddressRow == null)
    AddressRow = AddressVO.last();
    System.out.println((new StringBuilder()).append("AddressRow2: ").append(AddressRow).toString());
    String Address1 = (String)AddressRow.getAttribute("Address1");
    String Address2 = (String)AddressRow.getAttribute("Address2");
    System.out.println((new StringBuilder()).append("Address1: ").append(Address1).toString());
    System.out.println((new StringBuilder()).append("Address2: ").append(Address2).toString());
    int length1 = 0;
    if(Address1 != null)
    length1 = Address1.length();
    int length2 = 0;
    if(Address2 != null)
    length2 = Address2.length();
    System.out.println((new StringBuilder()).append("Address length1: ").append(length1).toString());
    System.out.println((new StringBuilder()).append("Address length2: ").append(length2).toString());
    if(length1 > 35 || length2 > 35)
    OAApplicationModule PurposeAM = (OAApplicationModule)oaapplicationmodule.findApplicationModule("HzPuiAccountSiteAM");
    OAViewObject PurposeVO = (OAViewObject)PurposeAM.findViewObject("HzPuiCustSiteUsesVO");
    int BPcount = PurposeVO.getRowCount();
    System.out.println((new StringBuilder()).append("Business Purpose Row Count: ").append(BPcount).toString());
    Row PurposeRow1 = PurposeVO.getFirstFilteredRow("SiteUseCode", "SHIP_TO");
    System.out.println((new StringBuilder()).append("Ship_to row: ").append(PurposeRow1).toString());
    System.out.println((new StringBuilder()).append("Length1: ").append(length1).append(" Length2: ").append(length2).append(" Ship_to row: ").append(PurposeRow1).toString());
    if(PurposeRow1 != null)
    System.out.println("Throwing exception.");
    System.out.println("Before SuperPFR2");
    super.processFormRequest(oapagecontext, oawebbean);
    System.out.println("After SuperPFR2");
    OAException ErrorMessage = new OAException("WARNING: Ship_To sites address lines 1 and/or 2 have more than 35 characters.", (byte)3);
    OADialogPage dialogPage = new OADialogPage((byte)1, ErrorMessage, null, "", null);
    dialogPage.setOkButtonItemName("OkButton");
    dialogPage.setOkButtonToPost(true);
    dialogPage.setPostToCallingPage(true);
    dialogPage.setOkButtonLabel("OK");
    oapagecontext.redirectToDialogPage(dialogPage);
    } else
    System.out.println("SuperPFR3");
    super.processFormRequest(oapagecontext, oawebbean);
    } else
    System.out.println("SuperPFR4");
    super.processFormRequest(oapagecontext, oawebbean);
    System.out.println("End of validation");
    } else
    System.out.println("SuperPFR5");
    super.processFormRequest(oapagecontext, oawebbean);
    public XXF5ArAcctSiteOverviewCO()
    }

  • Hi...i bought the new iphone 4 and would like to ask how can i transfer all my data from my old iphone to the new one?  If I will do "synchronization" through itunes with the old phone and the plug in the new one will that be the case?

    Hi...i bought the new iphone 4 and would like to ask how can i transfer all my data from my old iphone to the new one?  If I will do "synchronization" through itunes with the old phone and the plug in the new one will that be the case?

    Follow the instructions in this article to transfer your info: iPhone: Transferring information from your current iPhone to a new iPhone

  • Hello, I got a new computer with the old harddisk. Can't play my itunes music because not authorised. Apple ID is very old e-mail adress that doesn't exist anymore. When chose for secret question brth date seems wrong. Can't reach anyone!!!

    Hello, I got a new computer with the old harddisk. Can't play my itunes music because not authorised. Apple ID is very old e-mail adress that doesn't exist anymore and I forgot the password (5 years old??). When chose for secret question birth date seems wrong. Tried everything. I need to make a new apple-id but cannot connect the music that I bought under my old name to my new name. Can't reach anyone!!! Automatic FAQ system is of no help. What to do?

    That doesn't help me. For itunes it brings me to the express lane which doesn't help because my case is not in it. It's all standard procedure things. I understand those but my situation is different. The combination of a passport forgotten and an non-existing email adress (and birth dates that are not correct or not accepted). What I need is my password emailed to another email adress than the original one because that no longer exists.

  • Changed my ID but the Iphone 4 continue with the old ID name and does not syncronize. How can I change it in my Iphone so I can continue to use all my data stored like contacts and notes?

    Changed my ID but the Iphone 4 continue with the old ID name and does not syncronize. How can I change it in my Iphone so I can continue to use all my data stored like contacts and notes?

    Do you mean through iCloud?  You need to go to settings > iCloud and "delete account" and then sign in with the newly named account.  You'll want to do similar for facetime, messages, and store.

  • HT204053 i changed my email address (apple id) on my pc, but now my ipad is asking me for my password with the old email address...and not accepting the old or new password.how do i change it/sync it?

    I changed my email address (apple id) and password on my pc, but now my ipad mini icloud is asking me for my  icloud password with the old email address and not accepting the old one or the new one..how do i change it / sync it?

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iDevice, then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, and your old ID is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How to view the old data in a column if that column is dropped or rename

    Using workspace manager I am not able to track the old data of a column which is dropped.
    I have tried by using import and export features that Workspace manager have.. But import is not working properly in this case. And savepoint option is work with DML operation not with DDL.So, I want help in this matter
    Thanks In Advance

    No way even in 10g. You should build another DB and import your exported data.
    then you can get data from this new DB.
    SQL>create table t5 as select object_id,object_name,created from all_objects where rownum<20;
    Table created.
    SQL>select  current_scn from v$database;
    CURRENT_SCN
    7724122625
    SQL>desc t5
    Name                                      Null?    Type
    OBJECT_ID                                          NUMBER
    OBJECT_NAME                                        VARCHAR2(30)
    CREATED                                            DATE
    SQL>alter table t5 rename column OBJECT_ID to oid;
    Table altered.
    SQL>desc t5
    Name                                      Null?    Type
    OID                                                NUMBER
    OBJECT_NAME                                        VARCHAR2(30)
    CREATED                                            DATE
    SQL>alter table t5 drop column created;
    Table altered.
    SQL>desc t5
    Name                                      Null?    Type
    OID                                                NUMBER
    OBJECT_NAME                                        VARCHAR2(30)
    SQL>select * from t5 as of scn 7724122625;
    select * from t5 as of scn 7724122625
    ERROR at line 1:
    ORA-01466: unable to read data - table definition has changed

  • My iTunes account no longer has everything on my iPod-5th gen. I want to put everything on my iPod on my iTunes on my new laptop without losing new purchases that are on the iTunes account or the old data on the iPod.

    My iTunes account no longer has everything on my iPod-5th gen. I want to put everything on my iPod on my iTunes on my new laptop without losing new purchases that are on the iTunes account or the old data on the iPod.

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • I bought a new computer, and i have transfered everything using home share, file transfers, etc.. yet still when i go to sync, itunes tells me ipod can only be synced with one computer... is there a way to retire the relationship with the old computer?

    i bought a new computer.  the itunes app allows for home shareing, file transfers, etc.. but i want to discontinue the syncing with the old computer and sync my ipod touch now only on my new system... but i cant seem to disconnect that old relationship at all.. when i try to syncit says that my ipod is already synced with another computer, do i want to discontinue that and only use the new informationon this computer?  i dont want to do that yet because it doesnt seem like everything has come over, and i am afraid of losing songs that i downloaded from cds, etc..

    if you don't want to sync it because you don't think that everything has been transferred then i would check first if you can, before you commit to used only the data from your new computer.
    though, im not sure if this is true, but i think that when you sync your ipod to a new computer it will take the items from your ipod and put it on itunes, like when you purchase something on your ipod and it gets automatically transfered, but don't take my word for it.

  • TS1474 I synced my iphone to an older computer, and the iphone data was replaced by the old data from the computer. How do I get my newer data back?

    I synced my iphone with an older computer to update the computer, but the iphone ended up with all the old data (phone numbers, etc).  How do I get the newer data back?

    Connect to iTunes on the computer you usually Sync with and Restore...
    http://support.apple.com/kb/HT1414

  • My 2 TB Time Capsule's memory is full because it will not automatically delete old files as it is supposed to, so it is giving me zero backup of my two computers now.  How can this be fixed so my Time Capsule deletes the old data and saves the new?

    My 2 TB Time Capsule’s memory is full because it will notautomatically delete old files as it is supposed to, so it is giving me zerobackup of my two computers now. How can this be fixed so my Time Capsule deletes the old data and savesthe new?
    Neither my local computer consultant nor I have been ableto change any of the settings in Time Machine to correct this problem.  Working with the choices in the TimeMachine, there does not appear that there is any way to change the frequency ofthe backups either, so, after a year has elapsed, the time capsule is full, andmy only choice appears to be to erase all the current data on the Time Capsuleand start over, something that I do not want to at all let alone repeat on anannual basis.  My questions are:
    What can be done to have my Time Capsule delete old filesas it is supposed to do, so it has memory available to allow my computers toback up? 
    Is this a software problem that can be fixed online or isdoes this require a mechanical fix of defective hardware?

    How much data is being backed-up from each Mac?  (see what's shown for Estimated size of full backup under the exclusions box in Time Machine Prefs > Options).
    Is there any other data on your Time Capsule, besides the backups?
    Most likely, there just isn't room.  Time Machine may be trying to do a very large (or full) backup of one or both Macs, and can't.  Since it won't ever delete the most recent backup, there has to be enough room for one full backup plus whatever it's trying to back up now, plus 20% (for workspace).
    Also see #C4 in Time Machine - Troubleshooting for more details.

  • I recently installed an Airport Extreme 802.11N that I bought in May 2013. It replaced an Airport Extreme 802.11N that I bought in July 2007. My USB printer (Lexmark E350d) worked fine with the old Airport, but the printer won't work with the new one.

    I recently installed an Airport Extreme 802.11N that I bought in May 2013. It replaced an Airport Extreme 802.11N that I bought in July 2007. My USB printer (Lexmark E350d) worked fine with the old Airport, but I'm having trouble with the new one. When I try to print, I get a USB Waiting message on the printer, and when I force a page to print by pressing Go on the printer, I get a page that says ERROR: syntaxerror OFFENDING COMMAND: true.  . . .cvt . . . fpgm . . . x . . .lglyf . . . <..J head . . .     STACK: / [    -mark-   /sfnts I’ve tried shutting down the printer and disconnecting it and the Airport, but that doesn’t help. I reset the settings on the printer. I upgraded the Airport firmware and removed, reinstalled, and upgraded the Lexmark printer driver. After I upgraded the firmware and printer driver, a few pages printed correctly, but then I got the same syntax error page as before. Any suggestions for getting the printer to work correctly?

    Use a powered USB hub between the AE and the printer.. the usb port does sometimes have issues.
    Try deleting the printer in the Mac and reinstall it.. the change in AE can represent effectively a change of printer.. it is important to make sure that is all up to date.
    Beyond that.. USB printers.. ughhh! Consider for two toners you can go and buy a proper network printer.

  • I changed my itunes password only and now I can't update any of the apps I downloaded using the old password. I tried signing in with the old password with no luck. Can someone help please?

    I changed my itunes password only and now I can't update any of the apps I downloaded using the old password. I tried signing in with the old password with no luck. Can someone help please?

    Have you signed out of your iTunes account on the device/computer that you are using and signed back in with the updated password ? That should 'refresh' the account on it, and you should be able to use the account's new password to download updates to its apps

  • Help!! Trying to writing an array to a file without having to rewrite the old data every time.

    Hey Everyone,
    I have a vi that takes a 2D array and writes it to an xml file. The purpose for this is to characterize the pathloss through a dowkey 10x10 matrix at varies frequencies. I use this program to create a look-up table for the switch matrix so when I conduct one of my automated tests I can obtain an accurate measurment. The problem with this is I am taking about 299 data points per switch matrix combination leading me to over 32000 data points in the look-up table. The reason I use xml is because each data point needs a header so I can parse through the look-up table with another one of my vi's when I need that pathloss. What I am trying to fix is that when my vi writes to a file it writes one array at a time to save memory space. When it writes it rewrites the old data then the new data. As the number of data points increase so does the lag time to write to the file. By the time I am done it takes about five hours to fully write to the file. Does anyone know of a way to write continuesly write to a file without having to rewrite all of the old data? Attached is my vi for writing to the file, my vi for searching through the file, and an example of one of my look-up tables.
    Thanks,
    Dustin
    Solved!
    Go to Solution.
    Attachments:
    Find Array_TestStand.vi ‏22 KB
    Write to XML.vi ‏21 KB
    Pathloss_Array_tests.zip ‏149 KB

    dlovell wroteoes anyone know of a way to write continuesly write to a file without having to rewrite all of the old data?
    The only way to do that is to only append to the end of your file.  This would probably require some rewriting of your header information.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • TS3988 i changed my apple id email and when i sign into iCloud on my phone it still comes up with the old email and my password isn't working for it?

    i changed my apple id email and when i sign into iCloud on my phone it still comes up with the old email and my password isn't working for it?

    Try going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

Maybe you are looking for

  • ADF Application gets auto refreshed

    Hi i have my ADF application deployed in one of the weblogic clustered server. There are four weblogic managed cluster. In my application i am reading a csv file and performing some user operation with OIM. It is taking much time around more than 5 m

  • Syncing issues with 6th gen Nano

    Hi, Not sure this should be an iTunes specific question of a Nano 6G one, I plumped for this one anyway. My Nano seems to have problems fully syncing playlists of either kind. I am trying to sync a handful onto it and having the following issues. 1)

  • SQ01 Query

    Hello All, These are the steps i am taking to Build a query but i am still having a problem Generating it, SQ02- Create- Title- Table Join Using Basis Table- Table Name- Green Check. Add Tables- Insert Tables- Check Link Connection- Green Back Check.

  • Signature Schemas/Status values with Signature schemas need to be locked?

    I am tying to assign a signature schema to multiple values in a single status schema.  If I assign a signature schema to a status it automaticaly locks the document into that status so that no further changes to status can be made.  I need to have a

  • How to stop the output panel from displaying

    Hi, in CS5 (ancd CS3-4) how do I stop the "Output" panel from showing up automatically each time I test the movie using the Command+Enter keys? I know I have an error but it's a network error which does not effect my clip. it's annoying! Thanks Mic