Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

multiple updates on a database - concurrent updates

Former Member
0 Likes
352

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

1 REPLY 1
Read only

former_member156446
Active Contributor
0 Likes
293

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