2008 Mar 26 1:58 PM
Hi .
In a standard program, a timeout is occuring because of this statement:
SELECT SINGLE FOR UPDATE * FROM NRIV WHERE
OBJECT = NRIV-OBJECT
AND SUBOBJECT = NRIV-SUBOBJECT
AND NRRANGENR = NRIV-NRRANGENR
AND TOYEAR = NRIV-TOYEAR.
When i checked the table NRIV, there were only 2000 entries in it.There is only 1 row which corresponds to the condition.This leads me to believe that the select single for update * is causing the timeout and not the volume of the db table.
What exactly does it mean and how can i correct it?
Hi .
In a standard program, a timeout is occuring because of this statement:
SELECT SINGLE FOR UPDATE * FROM NRIV WHERE
OBJECT = NRIV-OBJECT
AND SUBOBJECT = NRIV-SUBOBJECT
AND NRRANGENR = NRIV-NRRANGENR
AND TOYEAR = NRIV-TOYEAR.
When i checked the table NRIV, there were only 2000 entries in it.There is only 1 row which corresponds to the condition.This leads me to believe that the select single for update * is causing the timeout and not the volume of the db table.
What exactly does it mean and how can i correct it?
2008 Mar 26 2:05 PM
Hi,
Check the Index settings of Table with ur BASIS team might be due to incorrect index which could cause TIMEOUT dump.
Regards,
Balakumar.G
Reward Points if helpful.
2008 Mar 26 2:10 PM
Hi,
The DB lock created from a SELECT SINGLE FOR UPDATE will be released only after a COMMIT WORK.
Please check in SM12
a®
2008 Mar 26 2:12 PM
Hello,
The 'FOR UPDATE' addition on the SELECT will set write protection for NRIV. Anytime a table needs to be locked there is the possibility that two or more processes will be fighting for that table at the same time. This could cause the timeout in your case and eventually a deadlock.
Hope that helps a little.
Regards
Greg Kern
2008 Mar 26 2:15 PM
An exclusive lock can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE. The SELECT command is used in this case only if all primary key fields in logical expressions linked by AND are checked to make sure they are the same in the WHERE condition. Otherwise, the resulting set is empty and sy-subrc is set to 8. If the lock causes a deadlock, an exception occurs. If the FOR UPDATE addition is used, the SELECT command circumvents SAP buffering.
Regards,
Santosh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |