Update data immediately when modify !

Hello everyone, I have problem with my list data. My data isn't updated when modified. I have two page :
 1. BookPage contains a list of song
  - XAML code :
<ListView Grid.Column="1"
Name="ListViewSong"
IsItemClickEnabled="True"
ItemClick="SongDetail_Click"
Margin="10,0,0,10"
ContinuumNavigationTransitionInfo.ExitElementContainer="True">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Holding="ListViewItem_Holding" Width="340"
Margin="0,0,0,15">
<FlyoutBase.AttachedFlyout>
<MenuFlyout>
<MenuFlyoutItem Tag="{Binding}" Click="AddToFavorite_Click"
Text="Thêm vào yêu thích..." />
</MenuFlyout>
</FlyoutBase.AttachedFlyout>
<TextBlock TextAlignment="Center"
Text="{Binding ID,Mode=TwoWay}"
FontSize="22"
Foreground="DodgerBlue" />
<TextBlock Foreground="GreenYellow"
TextWrapping="WrapWholeWords"
TextAlignment="Center"
Text="{Binding FullName,Mode=TwoWay}"
FontSize="18" />
<TextBlock
TextAlignment="Left"
FontSize="12"
Text="{Binding Lyric,Mode=TwoWay}"
Visibility="{Binding Lyric,Converter={StaticResource ConvertTextToVisibility}}"
FontStyle="Italic"
TextTrimming="WordEllipsis" />
<TextBlock
Foreground="Silver"
TextAlignment="Right"
FontSize="14"
Text="{Binding Author,Mode=TwoWay}" Margin="0,0,10,0" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
- Class Song code :
public class Song {
public string ID { get; set; }
public string FullName { get; set; }
public string Lyric { get; set; }
public string Author { get; set; }
public string ShortName { get; set; }
public string NoMarkName { get; set; }
- Load data and Bind to ListView:
public static ObservableCollection<Song> ListAllSongs = new ObservableCollection<Song>();
private async void BookPage_Loaded(object sender, RoutedEventArgs e)
// hiện panel progressbar loading
ProgressBarLoading.Visibility = Visibility.Visible;
ProgressBar.IsIndeterminate = true;
await Task.Delay(1000);
App.ListAllSongs = await App.ViewModel.LoadArirang();
// binding data to Pivo Item "Tat ca"
ListViewSong.ItemsSource = App.ListAllSongs;
// binding data to Pivo Item "Yeu Thich"
ListFavoriteSong.ItemsSource = App.FavoriteSong;
// ẩn panel loading
ProgressBarLoading.Visibility = Visibility.Collapsed;
ProgressBar.IsIndeterminate = false;
// cho phep filter
LeftPanelFilter.IsItemClickEnabled = true;
-- Click any song on the List and navigate to SongDetail Page for modifying. After modify , then save and go back to
BookPage  but data not change on the UI.
protected override void OnNavigatedTo(NavigationEventArgs e)
_song = e.Parameter as Song;
this.DataContext = _song;
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
var updateSOng = App.ListAllSongs.SingleOrDefault(s => s.ID.Equals(_song.ID));
updateSOng.FullName = txtNewNameTextBlock.Text;
Frame.GoBack();
How could I do that ?
OmegaVN - Window Phone Application Researching and Development

the song class should implement the INotifyPropertyChanged interface so the UI knows the data has been changed and to update itself.
http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged%28v=vs.110%29.aspx
 I use ObservableCollection - it implement interface INotifyPropertyChanged internal ... .I read this  from the Windows Phone 8.1 Development for Absolute Beginners on Channel9.
"Having said all of that, the Hub App Template does not have any classes the directly
implement INotifyPropertyChanged.  Instead, it uses ObservableCollection<T> (as well as a
custom class, ObservableDictionary) which implements the INotifyPropertyChanged interface
internally.  So, the moral to the story is that, as long as we’re using ObservableCollection<T> to
expose collections of the objects from the ViewModel to the View" -
Windows Phone 8.1 Development for Absolute Beginners – Page 199
OmegaVN - Window Phone Application Researching and Development

Similar Messages

  • Automatically update Data Flow when table column is added

    Hi, I have identical SQL Server databases on Server A and Server B, and I'm trying to create an SSIS package that will update its own Data Flow task when I've added a new column.  
    When I open the SSIS package up in Data Tools after adding the column, I get the following warning: 'The external columns for OLE DB Destination are out of synchronization with the data source columns. The column "TestColumn" needs to be added to
    the external columns.'  So the package know when it's out of sync with the db.  
    Is there a way to automatically update the external columns?
    Thank you!

    There is a Dynamic DTS task commercial product of CozyRock
    Another possibility is to generate an updated version of the package programmatically either with BIML http://www.mssqltips.com/sqlservertip/3124/generate-multiple-ssis-packages-using-biml-and-metadata/
    or via .net code http://msdn.microsoft.com/en-ca/library/ms345167.aspx
    Arthur
    MyBlog
    Twitter

  • Modification Date changes when updating Open With?!?!

    Forgive me if this is mentioned elsewhere. I have been searching these forums and not seen this problem.
    If I do a 'Get Info' on a file in the Finder and change the application it opens with, the Modification Date changes to 'now'. Why in the world would this happen? This is not how 10.3.x worked, and certainly doesn't make any sense since I am not actually modifying the file. I am simply changing the OS's metadata about which app to use. This info isn't even stored in the file itself, as evidenced by burning such an document to a CD or moving it through a network server then opening it on a machine with different default apps for certain extensions.
    Is this just another wacky step backwards in the world of the Apple OS X Finder, or am I missing a way to avoid this?
    PowerMac G5 2.5DP   Mac OS X (10.4.3)  

    This is not how 10.3.x worked, and certainly doesn't make any sense since I am not actually modifying the file.
    Actually, I am using "Panther" now, and can confirm that changing the application to be used to open an individual file through "Get Info" does in fact change the modification date.
    When the "Change all" button is used, the modification date of other files of that type won't be affected by this change since that modification is presumably made somewhere in the "Launch Services" database to set the "default" application to be used for that file type. Perhaps this is what you were thinking of.
    However, for that first file (or any file changed individually), the file is in fact modified, and the "Open with" information is stored with the file, in its "resource fork". Usually, a 'usro' resource (specifying the application) and an 'icns' resource (for the app's custom icon for that file type) are added. You can try this yourself - drag any image from Safari.app to the "Desktop" and open the info window for that image - such images usually don't have a "resource fork". Make note of the file's size, then change the "Open with" application. You should immediately see an increase in the file's size (to account for the addition of the "resource fork") accompanied by an update of the file's modification date to reflect this modification.

  • [svn] 4706: When handling the damageEvent make sure _contents gets updated with the potentially modified contents of the textFlow .

    Revision: 4706
    Author: [email protected]
    Date: 2009-01-28 07:58:30 -0800 (Wed, 28 Jan 2009)
    Log Message:
    When handling the damageEvent make sure _contents gets updated with the potentially modified contents of the textFlow. Either the contents or the style of the text flow, or both could have triggered the damage event.
    QE Notes:
    Doc Notes:
    Bugs: SDK-18749
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18749
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • After updating an older intel macbook to Snow Leopard and ilife 11, Software Update says everything is up to date, but when I try to open iPhoto, it tells me I have to update to the latest version, what can I do?

    after updating an older intel macbook to Snow Leopard and ilife 11, Software Update says everything is up to date, but when I try to open iPhoto, it tells me I have to update to the latest version, what can I do?

    Download 9.1 and 9.2.3 updates and install them

  • How to update data when primary key is set through for update cursor

    Dear friends,
    I have tried to update data in the table through forms using cursor for update and i have given the plsql i have used please help me where i do mistake.
    DECLARE CURSOR EMP IS
    SELECT EMPNO,EMPNAME,FATHERNAME,COMMUNITY,SEX,BILLUNIT,BIRTHDATE,RLYJOINDATE,RETIREMENTDATE
    FROM PRMAEMP WHERE BILLUNIT=:CTRL.BILLUNIT AND SERVICESTATUS='SR'ORDER BY DESIGCODE,SCALECODE
    FOR UPDATE;
    BEGIN
    GO_BLOCK('EMP_DETAILS');
    SYNCHRONIZE;
    FOR I IN EMP
    LOOP
    I.BILLUNIT:=:EMP_DETAILS.BILLUNIT;     
    I.EMPNO:=:EMPNO;
    I.EMPNAME:=:EMPNAME;
    I.FATHERNAME:=:FATHERNAME;
    I.COMMUNITY:=:COMMUNITY;
    I.SEX:=:SEX;
    I.BIRTHDATE:=:BIRTHDATE;
    I.RLYJOINDATE:=:RLYJOINDATE;
    I.RETIREMENTDATE:=:RETIREMENTDATE;
    DOWN;
    END LOOP;
    COMMIT;
    END;
    your help is needed immediately

    DECLARE CURSOR ABC IS
       SELECT EMPNO,
              EMPNAME,
              FATHERNAME,
              COMMUNITY,
              SEX,
              BILLUNIT,
              BIRTHDATE,
              RLYJOINDATE,
              RETIREMENTDATE
    FROM PRMAEMP
    WHERE BILLUNIT=:CTRL.BILLUNIT
    AND SERVICESTATUS='SR'
    ORDER BY DESIGCODE,SCALECODE
    FOR UPDATE OF COMMUNITY;
    V_EMPNO           PRMAEMP.EMPNO%TYPE;
    V_EMPNAME         PRMAEMP.EMPNAME%TYPE;
    V_FATHERNAME      PRMAEMP.FATHERNAME%TYPE;
    V_COMMUNITY       PRMAEMP.COMMUNITY%TYPE;
    V_SEX             PRMAEMP.SEX%TYPE;
    V_BILLUNIT        PRMAEMP.BILLUNIT%TYPE;
    V_BIRTHDATE       PRMAEMP.BIRTHDATE%TYPE;
    V_RLYJOINDATE     PRMAEMP.RLYJOINDATE%TYPE;
    V_RETIREMENTDATE  PRMAEMP.RETIREMENTDATE%TYPE;
    BEGIN
       GO_BLOCK('EMP');
       SYNCHRONIZE;
       OPEN ABC;
       LOOP
          FETCH ABC INTO .... /*yOU NEED TO MENTION YOUR VARIABLES HERE*/;
          UPDATE PRMAEMP
          SET BILLUNIT= :EMP.BILLUNIT,
              EMPNO= :EMPNO,
              EMPNAME= :EMPNAME,
              FATHERNAME= :FATHERNAME,
              COMMUNITY= :COMMUNITY,
              SEX= :SEX,
              BIRTHDATE= :BIRTHDATE,
              RLYJOINDATE= :RLYJOINDATE,
              RETIREMENTDATE= :RETIREMENTDATE
          WHERE CURRENT OF ABC;
          EXIT WHEN ABC%NOTFOUND;
       END LOOP;
       CLOSE ABC;
    END;
    COMMIT;
    END;Cheers
    Sarma.

  • My MacKeeper says iPhoto is out of date.  When I try to update the App Store says I need IOS 10.9 or later.  I have 10.7.5 and when I check for updates my Mac says the software is up to date.  How do I solve this problem??

    My MacKeeper says iPhoto is out of date.  When I try to update it, the App Store says I need IOS 10.9 or later.  I have 10.7.5 and when I check for updates my Mac says the OS software is up to date.  How do I solve this problem??

    1. First step to solving the Problem: Trash MacKeeper. It's a pile of trash that does far more harm to your computer than good.
    https://discussions.apple.com/docs/DOC-3691
    2. What version of iPhoto do you have? (iPhoto Menu -> About iPhoto)

  • Hi, I have just loaded Lightroom 5 from the disc onto my Mac.  every time i try and launch the application, it goes to the registration/licence window.  i have input the data five times already.  When Lr5 launches the update window appears, when i try to

    Hi, I have just loaded Lightroom 5 from the disc onto my Mac.  every time i try and launch the application, it goes to the registration/licence window.  i have input the data five times already.  When Lr5 launches the update window appears, when i try to do anything the following message comes up: - An error occrred when attempting to change modules.  What do i need to do to fix this?

    Masher please use the uninstaller located in the Applications/Utilities/Adobe Installers folder.  Once Photoshop Lightroom is removed then please download Lightroom 5.5 from Adobe - Lightroom : For Macintosh : Adobe Photoshop Lightroom 5.5 and reinstall.

  • If I update from ios 5.0.1 to 5.1.1 will I lose my map data? When I updated to 5.0 I lost all my GPSHD Motion X data - 25 Gbytes.

    If I update from IOS 5.0.1 to 5.1.1 will I lose all my GPSHD Motion X map data? When I updated to IOS 5.0.1 I lost about 25GBytes of map data because Itunes will not back up my GPSHD map data.

    I havn't used that app, but you shouldn't lose any data by updating to 5.1.1 from 5.0.1.
    You can make sure you have a backup before updating.
    If you run into problem with that app only or want to ask the app developers, check out the Motion X-Support site.

  • Cant delete ibooks bookmarks , says "no title" and a date, happened when I updated to

    Cant delete ibooks bookmarks , says "no title" and a date, happened when I updated to iOS 8.1.2, help driving me crazy!

    Using iTunes on your computer, open Preferences (under the leftmost item in iTunes menu).  Choose "Devices" on top.  Find your backup listed there, highlight it, and select "Delete Backup".

  • TS2771 After updating my software my apps open and close immediately when selected

    After updating my ipod software my apps open and close immediately when selected.

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Restore from backup. See:
    iOS: How to back up
    Restore to factory settings/new iPod

  • Running OX 10.7.4 and can't open iPhoto 9.0 window keeps popping up saying to update software then when try to update it says software is up to date

    Running OX 10.7.4 and can't open iPhoto 9.0 window keeps popping up saying to update software then when try to update it says software is up to date

    What version of iPhoto do you have (9.0 is the original version from a couple of years ago - you should be way past that - at least 9.1 - probably 9.2 - maybe 9.3)
    Download the 9.1 update and install - http://support.apple.com/kb/DL1322
    LN

  • Update Data From DBGrid

    Hi All,
    I'm trying to write a program to update the DB informations.
    For example, an Invoice Maintenance program that involve 2 tables,
    Invoice Header and Invoice Details. I load the Invoice Details
    records from db table to a DBGrid for user update and call a PHP
    program using mx:HTTPService to write the updated data to db.
    I would like to know how can I check the dbGrid that only
    modified rows will pass to the HTTPService to updating? Or I need
    to pass all rows one by one to HTTPService and update the records
    one by one? Also is it only possible to pass one row every time
    when I call the httpService or I can pass the whole dbGrid and
    extract row by row in the php program?
    If this problem can be solved I think I can complete the
    system without any big problem (except printing ;-) )
    Thanks a lot!
    Wilson

    Using the edit events, I would store a list of the item
    indexes that have been changed. Then use that list to return and
    build an xml string, and post it to the server via HttpService.
    Tracy

  • HT203421 i buy a macbook air with my friend and i changed the apple id also.at first i can update the application but now its impossible to update the application.when i clock to update it shows the id of my fren andsomebody do you have idea to solve this

    i buy a macbook air with my friend and i changed the apple id also.at first i can update the application but now its impossible to update the application.when i clock to update it shows the id of my fren andsomebody do you have idea to solve this problem.

    The first thing to do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You — not the previous owner — must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    1. You don't own another Mac.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the previous owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    2. You do own another Mac.
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to create a bootable USB device and boot the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can boot from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    Once booted in Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    After partitioning, quit Disk Utility and run the OS X Installer. You will need the Apple ID and password that you used to upgrade. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    Then run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.

  • How to trigger pop-up window in report and update data base from report

    Hi All,
    I have a requirement, in a report output list to trigger a pop up window with some rejection codes corresponding to each sales order when i select from the output list. Also i need to update data base by selecting one of the rejection code in the pop-up window list for that sales order. Can any one please let me know how to achive this.
    Also, i have check boxes for each record in the output list. Also, i have added one more check box as "Select All'. When select 'Sleect All' check box , all check boxes need to be checked, how to achieve this. PLease let me know.
    Thanks in advance.
    Regards,
    Rajesh

    Hi check this code of editable ALV report... I updated the data base with the changes made..in the editable ALV
    *& Report ZJAY_EDIT_ALV
    REPORT zjay_edit_alv.
    * TYPE-POOLS *
    TYPE-POOLS: slis.
    * INTERNAL TABLES/WORK AREAS/VARIABLES
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
    i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
    w_field TYPE slis_fieldcat_alv,
    p_table LIKE dd02l-tabname,
    dy_table TYPE REF TO data,
    dy_tab TYPE REF TO data,
    dy_line TYPE REF TO data.
    * FIELD-SYMBOLS *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
    <dyn_wa> TYPE ANY,
    <dyn_field> TYPE ANY,
    <dyn_tab_temp> TYPE STANDARD TABLE.
    * SELECTION SCREEN *
    PARAMETERS: tabname(30) TYPE c DEFAULT 'MARA',
    lines(5) TYPE n DEFAULT 7.
    * START-OF-SELECTION *
    START-OF-SELECTION.
    * Storing table name
    p_table = tabname.
    * Create internal table dynamically with the stucture of table name
    * entered in the selection screen
    CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
    ASSIGN dy_table->* TO <dyn_table>.
    IF sy-subrc <> 0.
    MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
    LEAVE TO LIST-PROCESSING.
    ENDIF.
    * Create workarea for the table
    CREATE DATA dy_line LIKE LINE OF <dyn_table>.
    ASSIGN dy_line->* TO <dyn_wa>.
    * Create another temp. table
    CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
    ASSIGN dy_tab->* TO <dyn_tab_temp>.
    SORT i_fieldcat BY col_pos.
    * Select data from table
    SELECT * FROM (p_table)
    INTO TABLE <dyn_table>
    UP TO lines ROWS.
    REFRESH <dyn_tab_temp>.
    * Display report
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_structure_name = p_table
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'SET_PF_STATUS'
    TABLES
    t_outtab = <dyn_table>
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    ENDIF.
    *& Form SET_PF_STATUS
    * Setting custom PF-Status
    * -->RT_EXTAB Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZSTANDARD'. "copy it from SALV func group standard
    ENDFORM. "SET_PF_STATUS
    *& Form user_command
    * Handling custom function codes
    * -->R_UCOMM Function code value
    * -->RS_SELFIELD Info. of cursor position in ALV
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    * Local data declaration
    DATA: li_tab TYPE REF TO data,
    l_line TYPE REF TO data.
    * Local field-symbols
    FIELD-SYMBOLS:<l_tab> TYPE table,
    <l_wa> TYPE ANY.
    * Create table
    CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
    ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
    CREATE DATA l_line LIKE LINE OF <l_tab>.
    ASSIGN l_line->* TO <l_wa>.
    CASE r_ucomm.
    * When a record is selected
    WHEN '&IC1'.
    * Read the selected record
    READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
    rs_selfield-tabindex.
    IF sy-subrc = 0.
    * Store the record in an internal table
    APPEND <dyn_wa> TO <l_tab>.
    * Fetch the field catalog info
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = p_table
    CHANGING
    ct_fieldcat = i_fieldcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    * Make all the fields input enabled except key fields
    w_field-input = 'X'.
    MODIFY i_fieldcat FROM w_field TRANSPORTING input
    WHERE key IS INITIAL.
    ENDIF.
    * Display the record for editing purpose
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_structure_name = p_table
    it_fieldcat = i_fieldcat
    i_screen_start_column = 10
    i_screen_start_line = 15
    i_screen_end_column = 200
    i_screen_end_line = 20
    TABLES
    t_outtab = <l_tab>
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    * Read the modified data
    READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
    * If the record is changed then track its index no.
    * and populate it in an internal table for future
    * action
    IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
    <dyn_wa> = <l_wa>.
    i_index = rs_selfield-tabindex.
    APPEND i_index.
    ENDIF.
    ENDIF.
    ENDIF.
    * When save button is pressed
    WHEN 'SAVE'.
    * Sort the index table
    SORT i_index.
    * Delete all duplicate records
    DELETE ADJACENT DUPLICATES FROM i_index.
    LOOP AT i_index.
    * Find out the changes in the internal table
    * and populate these changes in another internal table
    READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
    IF sy-subrc = 0.
    APPEND <dyn_wa> TO <dyn_tab_temp>.
    ENDIF.
    ENDLOOP.
    * Lock the table
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    mode_rstable = 'E'
    tabname = p_table
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    * Modify the database table with these changes
    MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
    REFRESH <dyn_tab_temp>.
    * Unlock the table
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    mode_rstable = 'E'
    tabname = p_table.
    ENDIF.
    ENDCASE.
    rs_selfield-refresh = 'X'.
    ENDFORM. "user_command

Maybe you are looking for