Skip to Content
Oct 04, 2019 at 02:36 PM

update table fails in background since many jobs trying to execute same update command.


Hello All,

I have a function module having update statement, and i tried to execute the same FM from 2 sessions by keeping breakpoint at update statement.

In first session record updated in table, for second session sy-subrc = 4, since there is same record available in table.

for second session also record should be inserted into table with count increasing(we have count field in table as keyfield)

Actually i have taken two sessions as example, in real time there are N number of sessions...

Could any one give effective solution.... i dont want to miss any record.

Ex :

the table looks like this :




Insert into XYZ values WA_XYZ

At same time(12:00:00) different jobs are trying to insert records in XYZ. in this case Some times there are chances that WA_XYZ would have same records, so one will be inserted and one will be rejected.. But i dont wanted to lose any record. so there is one field in table called serial..

there is field called count, it will increase when same record tries to insert.. when time changes(12:00:01) count will start from zero.

Many Thanks,

Praneeth Ch.