‎2008 Jun 23 9:15 AM
hi Gurus,
i have a Remote enabled Function module which updates a Zee table. This function module is called by many systems(more than 15 systems) at the same time.
My problem is, how do i maintain consistency of the data being updated?
is Lock Tables concept going to help me in any way. please suggest a possible solution.
Rambo
‎2008 Jun 23 9:16 AM
you need to create a lock object and handle.. them before updating the data...
* 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.Edited by: Jay Sadaram on Jun 23, 2008 1:21 AM