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

DBIF_RSQL_SQL_ERROR Runtime error due to Deadlock.

Former Member
0 Likes
1,157

Hello Everyone,

We have a custom program which updates the status of Work Orders using the standard function STATUS_UPDATE.

The program is giving dump when ever it is run saying "ORA-00060: deadlock detected while waiting for

resource". I was not sure what the problem is and so checked the notes. I found SAP Note: 970434 to be relevent for this case. I am not sure though, can anyone please help me out if this is the correct SAP note ? Please let me know if you need any more details.

-


How to correct the error

-


The exception must either be prevented, caught within the procedure

"STATUS_UPDATE"

"(FUNCTION)", or declared in the procedure's RAISING clause.

To prevent the exception, note the following:

Database error text........: "ORA-00060: deadlock detected while waiting for

resource"

Internal call code.........: "[RSQL/UPDT/JEST ]"

Please check the entries in the system log (Transaction SM21).

You may able to find an interim solution to the problem

in the SAP note system. If you have access to the note system yourself,

use the following search criteria:

-


"DBIF_RSQL_SQL_ERROR" CX_SY_OPEN_SQL_DBC

"SAPLBSVU" or "LBSVUU01"

"STATUS_UPDATE"

-


-


Information on where terminated

-


The termination occurred in the ABAP program "SAPLBSVU" in "STATUS_UPDATE".

The main program was "ZPM_MATAVAIL_CHK ".

The termination occurred in line 140 of the source code of the (Include)

program "LBSVUU01"

of the source code of program "LBSVUU01" (when calling the editor 1400).

Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in

the

procedure "STATUS_UPDATE" "(FUNCTION)" but was not handled locally, not

declared in the

RAISING clause of the procedure.

The procedure is in the program "SAPLBSVU ". Its source code starts in line 7

of the (Include) program "LBSVU$01 ".

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
973

in your program, are you enqueing and dequeing properly? Trying to update same row multiple times?

Read only

0 Likes
973

Actually my logic of program is very simple, i am just pulling out all the work orders,

then in a loop using the function material_availability_check i am checking if the materials are available for the workorder.

Then based on the output above i am just updating the Work order status using status_update.

I do not think there is any chance of deadlock here. Its one work order status at a time in the loop.

Read only

0 Likes
973

If you do a where used list for this FM, you'll see that after each call to it, the calling progrram may do a

COMMIT WORK AND WAIT

Why not try that?

Although, it might be better to find a lock object for the status and lock and unlocke it before and after the update.

Rob

Edited by: Rob Burbank on Mar 3, 2011 3:19 PM

Read only

0 Likes
973

Inside the function update_status after teh update function commit and wait is already written as the last step of the fn.

This program has been running fine for months, suddenly it has started giving this dump.

Read only

0 Likes
973

Do you mean i need to queue and dequeue ? How to find the table or object on which we will have to do it?

can you give me some directions for the same?

Read only

Former Member
0 Likes
973

Hello Kumar,

I checked the note 970434. It does not seem to be relevant for your issue since it is to correct the data inconsistency in Quality Notifications due to termination in FM "STATUS_UPDATE".

Based on the description you have provided and your subsequent post, what I understand is the program was working fine earlier. Assuming that there was no change done in the program, I am suspecting that there could be some other reasons such as issue with DB server or multiple jobs running simultaneously causing mass data updates. I would suggest to look at these aspects.

Regards,

Amit