Hello All
We are implemententing a standard-cum-customized solution for Task and Resource Management in selecting tasks. The process here is selecting the best tasks available for the user and locking these tasks using ENQUEUE_ETLTKPLE for task pool table (LTKPL).
The above process of picking the tasks is initiated by a RF device and in our integration testing we realized that if 3/4 people sign in and try to perform the tasks, the system enters in a deadlock in trying to get the lock and dumps. The following the code which enqueues a task:
....Lock Task........................................................
CALL FUNCTION 'ENQUEUE_ETLTKPLE'
EXPORTING
locat = i_locat
taski = i_taski
collect = trmgcx
_scope = '3'
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
CALL FUNCTION 'FLUSH_ENQUEUE'
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
e_subrc = sy-subrc.
IF sy-subrc <> 0.
Empty container
CALL FUNCTION 'RESET_ENQUEUE'.
ENDIF.
ENDIF.
Any help to resolve the above would be great appreciated.
Thanks
Sunil Achyut