How to undo the changed record!

Hi
I have edit a record in my form (haven't been saved). Now, I want to undo the changes on my record. How can I do that?
Thanks
null

lenyhu,
Since get_item_property always returns a varchar2 value, your line:
.. rowidtochar(get_item_property(:system..is the cause of the error.
I'm not exactly sure why do you want to use rowids, when you can copy the database value back into the item.
Please take a look at the code below, which you can copy to the When-Button-Pressed trigger of your UNDO button:
declare
l_first_item varchar2(100);
l_last_item varchar2(100);
l_curr_item varchar2(100);
l_curr_block varchar2(30);
begin
l_curr_block := :system.cursor_block;
l_first_item := l_curr_block | |'.'| | get_block_property(:system.cursor_block, first_item);
l_last_item := l_curr_block | |'.'| | get_block_property(:system.cursor_block, last_item);
go_item(l_first_item);
l_curr_item := :system.cursor_item;
while l_curr_item <> l_last_item loop
copy(get_item_property(l_curr_item, database_value), l_curr_item);
go_item(get_item_property(l_curr_item, nextitem));
l_curr_item := :system.cursor_item;
end loop;
record_property(:system.cursor_record, l_curr_block,
status,
query_status);
go_item(l_first_item);
end;I believe this code is 100% generic.
Please, don't forget to change the UNDO button's Mouse Navigate and Keyboard Navigable properties both to NO.
If you have any problems understading my code, just ask.
Hope this helps,
Pedro
null

Similar Messages

  • Swing .............how to undo the changes made by user

    Hi,
    i have created a form in swing asking for the related information from user whose value i m taking in jformetted textfield.
    now i have placed two buttons there.
    one is Apply and second is Cancel.
    when user pressed Apply button all the changes made by the user must be set where as if user clicks cancel button all the changes made by user should be undo to previously set value.
    can anybody help me how this can be done and what code should i write in action performed method
    thanks in advance
    plz reply

    thanx.
    one more thing
    In my application,there is one Button called Option when u clicked on it.It opens up one internal frame where user is asked to asked to fill some parameters.
    1) Now how can i restrict user to create one more internal frame unless first one is closed.
    2) suppose i clicked option button and it opens up internal frame where i can set the parameters and closed it.If i again click on option then i want the parameter to have wht i just set.
    3) and how can pass those parameters value to my main frame from where i m calling internal frame
    Plz reply
    Edited by: neel007 on Mar 11, 2009 8:02 PM

  • How do I copy and paste to my mac and undo the change attributes like I do withmy iPad. I cannot shake my mac?

    How do I copy and paste to my mac and undo the change attributes. On my ipad I can shake it and undo the change attributes but not sure how to do this on the imac? Example Excel to email and undo changes?

    Thanks for the information....It did not work,....
    I am copying information from Excel and posting it into Lotus
    It works fine in word and other application, just not in Lotus notes...
    Any other ideas?

  • How to use the change log in ODS to track Delta change?

    People say that historical data (like Delta change) in ODS can be tracked in the Change Log.  How to use the change log to track historic data?
    Thanks

    Kevin
    See if it helps
    Every ODS object is represented on the database by three transparent tables:
    Active data: A table containing the active data (A table)
    Activation queue: For saving ODS data records that are to be updated but that have not yet been activated. The data is deleted after the records have been activated.
    <b>Change log: Contains the change history for delta updating from the ODS Object into other data targets, such as ODS Objects or InfoCubes for example.</b>
    An exception is the transactional ODS object, which is only made up of the active data table.
    The tables containing active data are constructed according to the ODS object definition, meaning that key fields and data fields are specified when the ODS object is defined. Activation queue and change log are the same in the table’s structure. They have the request ID, package ID and the record number as a key.
    Data base structure changes
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/d53ec3efdc9b47a9502c3a4565320c/frameset.htm
    Hope this helps
    Thnaks
    Sat

  • How to create the change document functionality for a dependent objects?

    May I please know how to create the change document functionality for a dependent objects?
    I have done it follow the same process as for business process objects. But when i try to test it in BOBT, there is no records under "FIELD_CHANGE_WITH_FILTER". It seems the change hasn't been recorded.
    If the way I did to create change document for dependent object is correct, please also kindly advise the possibilities for why there is no record during testing.
    thanks in advance.

    I also have some doubts about the business object.In this case,one abstract BO hase a subnode wihich is root extended.I added the change document for this node under the category "root_extended" and then tested the function in BOBT.I got some error message "can't find the root key".Shall i redefine the method /BOFU/IF_CDO_CREATION~IS_CDO_CREATION_ACTIVE so as to solve the problem?
    Thx.

  • How can we get changed records in delta in case of numeric pointer

    Deall All,
    Thanks to all of you gurus i have been able to Get delta update for my query.
    There is one last issue how can i include changes records in my delta update when i am using numeric pointer for data selection.
    or
    It can only be doen by time stamp.
    can you explain me details of using time stamp.
    Thanks & regards,
    Gaurav Sood

    Dear Gaurav,
    Here we have three options for delta updation:
    Time Stamp:   If we want to update change in the records with respect to the time interval then this option is selected.
    Calend. Day:   If we want to update change in the records with respect to day to day basis then this option is selected.
    Numeric Pointer:  If we want to update in case of record which is completely new with respect to Field name then we use this option.
    And we have got some settings like:
    Safety Interval upper limit:
    This field is used by Data Sources that determine their delta generically using a repetitively-increasing field in the extract structure.
    The field contains the discrepancy between the current maximum when the delta or delta init extraction took place and the data that has actually been read.
    Leaving the value blank increases the risk that the system could not extract records arising during extraction.
    Example: A time stamp is used to determine the delta. The time stamp that was last read is 12:00:00. The next delta extraction begins at 12:30:00. In this case, the selection interval is 12:00:00 to 12:30:00. At the end of extraction, the pointer is set to 12:30:00.
    A record - for example, a document- is created at 12:25 but not saved until 12:35. It is not contained in the extracted data but, because of its time stamp, is not extracted the next time either.
    For this reason, the safety margin between read and transferred data must always be larger than the maximum length of time that it takes to create a record for this DataSource (with a time stamp delta), or it must display an interval that is sufficiently large (for determining delta using a serial number).
    Safety Interval Lower Limit
    This field contains the value taken from the highest value of the previous delta extraction to determine the lowest value of the time stamp for the next delta extraction.
    For example: A time stamp is used to determine a delta. The extracted data is master data: The system only transfers after-images that overwrite the status in the BW. Therefore, a record can be extracted into the BW for such data without any problems.
    Taking this into account, the current time stamp can always be used as the upper limit when extracting: The lower limit of the next extraction is not seamlessly joined to the upper limit of the last extraction. Instead, its value is the same as this upper limit minus a safety margin. This safety margin needs to be big enough to contain all values in the extraction which already had a time stamp when the last extraction was carried out but which were not read. Not surprisingly, records can be transferred twice. However, for the reasons above, this is unavoidable.
    Data Source Is Real-Time Enabled
    The 'real time enabled' indicator determines whether a delta-enabled Data Source can be used as a supplier of data for a real-time daemon.
    And there are two options provided like
    1)     New Status for changed records:
    If you select this option each record to be loaded delivers the new status for the key figures          and characteristics. DataSources with this delta type can write to ODS objects or master data tables.
    2)     Additive Delta:
    The key figures for extracted data are added up in BW. Data Sources with this delta type can supply data to ODS objects and Info Cubes.
    Hope this helps u..
    Best Regards,
    VVenkat..

  • How we can load change record in cube.

    Hi,
         How we can load change record in cube, (delta)
         i need step by step in sap BI 7.0.

    Hi Nitin
    I hope you are asking about delta loads, if your datasource supports deltas then you can do only changed records from source to cube. To see the details goto ROOSOURCE table in ECC and find.
    For further help search in SDN and help.sap.com, you can find n number of postiings about the same.
    Thanks
    Reddy

  • How to re-query changed record in multi-row block after update in a called form

    Hi,
    I have a form that I use to perform searches, which is a multi-record block.
    The user can navigate to a record, press a button on call another form which provides
    more detail, and allows update of the record.
    If the user changes it, and returns to the original search form, how can I re-query the
    changed record to update the fields on the search form.
    Is there a way other than to re-query the
    whole block - a built-in to just update on record if it's changed on the database.
    If not, can I use globals to pass back the data (since only a few fields are updatable),
    and change the record without effecting its forms status.
    Many thanks
    Bernie

    BD,
    I haven't managed to look at a solution yet, but the block is a large multi-row block,
    with an ORDER BY, and since it can return a large number of records, there is a short
    delay. I was hoping there was a way of just
    re-querying the one record, which was displayed
    in the second form for update.
    I'll give the query a go, or might try and pass back some globals with the update values.
    By the way, DML Return Value is an excellent feature, but only works against Oracle 8.
    It basiclly adds the RETURNING clause to any DML statement (see SQL manual), so that if
    a trigger changes/adds values you didn't provide, it will return them back to you
    so the values in your form are correct.
    I use a trigger on the DB to populate history fields (create/update,who/when) and
    the PK sequence. Using this feature, those values are returned to the block and displayed.
    Regards
    Bernie

  • How to Delete the condition record in CRM

    HI,
    Can you please help me how to delete the condition record from condition table in CRM.
    Please explain the usage of FM CRMXIF_CONDITION_SEL_DELETE with examples.
    I have also read the documention of the function module. How to use this FM for custom defined condition table.
    (this is the code given in Documentation)
    DATA-OBJECT_REPRESENTATION         = 'E'
    DATA-SEL_OPT-CT_APPLICATION              = 'CRM'
    DATA-SEL_OPT-OBJECT_TASK                    = 'D'
    DATA-SEL_OPT-RANGE-FIELDNAME        = 'PRODUCT_ID'
    DATA-SEL_OPT-RANGE-R_SIGN                  = 'I'    (Including)
    DATA-SEL_OPT-RANGE-R_OPTION           = 'EQ'
    DATA-SEL_OPT-RANGE-R_VALUE_LOW  = 'PROD_1'
    Thanks
    Shankar

    Hi Shankar,
    I am using the same CRMXIF_CONDITION_SEL_DELETE function module to delete condition record present in CRM.
    But it is giving me below error in the return table of the FM after i run the program. Can you please correct me if I am doing any thing wrong?
    Error in  lt_return: SMW3     CND_MAST_SEL_DEL_EXT_VALIDATE     CND_M_SD
    code:
    ls_range-fieldname = 'PRODUCT_ID''.
    ls_range-R_SIGN = 'I'.
    ls_range-R_OPTION = 'EQ'.
    ls_range-R_VALUE_LOW = '123456'.
    APPEND ls_range TO lt_range.
    MOVE lt_range TO ls_entry-SEL_OPT-range.
    ls_data-SEL_OPT-object_task = 'D'.
    ls_data-SEL_OPT-ct_application = 'CRM'.
    ls_data-object_representation = 'E'.
    CALL FUNCTION 'CRMXIF_CONDITION_SEL_DELETE'
      EXPORTING
        DATA          = ls_date
    IMPORTING
       RETURN        = lt_return
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      IMPORTING
        return = lt_ret.
    Edited by: Saravanaprasad Nadar on Jul 7, 2010 1:27 AM

  • How to restrict the change access in CRM for OLTP orders

    Hi Guru's,
    Please let me know  how to restrict the change access in CRM for the orders that are created in ECC. The ECC orders will only for display in CRM but not for change,
    We have  the orders that are  created in ECC, it will flows to CRM and should restrict the access to get in to the change mode in CRM but as of now CRM  system is allowing change mode for ECC orders and ending up with errors.
    Is there any additional middleware parameter that needs to be added to SMOFPARSFA table to get this functionality! Please advice! Thank your for your help.
    Regards
    Suneel

    Hi.
    You can use the PFCG role to control if the user is able to create, change, delete or only display a business transaction type.
    Regards.

  • How to restrict the last record and not moving to next reocrd

    1) how to restrict the last record and not moving to next reocrd.
    2) Also for the F6 key(for new record).

    When you are on the last record, next-record will create a new one, so that my question is do you want to forbid new record creation.
    Francois

  • How to handle the control records in case of file to idoc scenario.

    Hi All,
    can you please clarify me how to handle the control records in case of file to idoc scenario.

    Hi,
    In File to Idoc scenario even though you selected apply control record values from payload and you are not getting those correct values which you have provided in the mapping.
    Also check the checkboxes Take sender from payload and Take receiver from payload along with the Apply control record values from payload checkbox
    Regards
    Seshagiri

  • How to see the change logs for billing document

    Dears,
    Could you please how to see the change logs for billing document.
    My client is using ECC 6.0 & if i use VF03 > Environment > changes > does not show the changes i had made.
    Thanks in advance
    Ranjan

    hello, friend.
    you should be able to see changes done after the initial creation and saving, by going thru Environment > Changes.  try it again, and this time make sure that changes were done to the billing document prior to posting to accounting.
    normally, when configuration of Billing is done correctly, there will be little or no instances of changing anything in the Billing document,  as saving the document after creation will post this to Accounting.  of course, inclusion of a posting block in the billing type will provide you the opportunity for changes. 
    regards.

  • How to get the Change node in Production Server!!!!!

    Hi Guys,
    Kindly let me know how to get the Change node in Production Server for the Transaction Code Pe03 for generating the Acknowledgement No for the year 2008 .
    Plz provide me the steps how to get the Change Node for Acknowledgement No so tat i can get the configuration done.
    Regards
    Ansuman Mohanty.

    Hi Mr!
    If you want to generate the e-file feature 40ACK, do it in our Customization client box (Golden box) & save the request & move to Quality & production.
    Still if you need to workout only in Production, than with the help of Basis people you can get the Production change mode for 5 to 10 min time & can generate it. But mostly Basis people wont give us change mode for Production box ... with ur request they can do..try it.
    Did u collected 4 quarter TAN no's for 2008 Quarter...if not collect it & generate it at a time.
    All the best:-)
    Kind Regards,
    Saisree.S

  • No IDOC's for the change record in child and CUA systems.

    Hi,
    The user profile was modified and  assigned roles and profiles on so and so date by someone as it is showing in the change record of the user in the child system with a batch user id.
    I have search the IDOC's with respective of the child system, date & time but I didnu2019t find any IDOC with respective of the above criteria.
    So kindly help me out is there a way I can find the information as who changed the user profile via CUA system....
    Thanks for your help...
    Thanks & Regards
    Sukumar. V

    Release:
    700   Master & Child
    SP level
    Can i know for which area you need it...
    BASIS
    0015   Master
    0013   Child
    Netweaver
    0016   Master
    0015   Child..
    Please let me know if you need any further info....
    SV

Maybe you are looking for

  • Is There A Way To Use Tango On Iphone 3? And Suntanning With Iphone?

    Hi I have an Iphone 4 new as of a month and alot of my friends have the regular IP3 and I was wondering if there was a way around so they can use Tango for video calling. Also I bring my phone in with me into a lying suntan bed for 20 minutes at a ti

  • Getting error while deleting rows from the database using the View Object

    Hi All, I am using jdev 11.1.1.4.0. I am removing the rows from the database using viewobject( quering the viewobject to find the records i want to delete). I am using vo.removeCurrentRow(0). Before this statement I am able to get the rows I want to

  • How to install fonts ?

    i  bought the  font  colection on the app store  and i  cant  figure out how  to get  it to show up in illustrator  it tells  me to save  but i  did that  to were it wanted to witch was  documents  and im  unable to see them in my list of choises .

  • Powerbook Printing to a WinXP PC with Shared printer issue

    I've recently made the switch for my laptop to a Powerbook G4 and am very very happy with it. There is only one thing that I cannot seem to get working though. I have a Canon i950 Photo Printer hooked up to my desktop XP machine via USB and have it s

  • My itunes card won't pay my outstanding balance

    I have an outstanding balance on itunes. I purchased an itunes card to pay it off, but when I redeemed the card, it just posted to my account instead of paying it off.