deadlock is related to locking
if 2 or more applications are involved and trying in the same luw doing select and update - and this for both appl, you usually get a deadlock, because luw 1 is waiting for luw2 and vice versa
luw1 luw2
select select
update update
update1 -> wait update2
update2 -> wait update1
this is detected by system and latest luw is forced
such cases should be handled :
- in different luw
- doing select .. for update (and getting ulock instead of slock) preventing select 2 to come in