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

CX_SY_OPEN_SQL_DB after locking user in SELECT-Clause

former_member310342
Participant
0 Likes
1,274

Hey,

I'm using a select to proof some data. Within the select clause I check for some conditions. If they are not fulfilled the user gets locked.

The user lock is successful but when the debugger gets back to the top of the select it I'm getting a CX_SY_OPEN_SQL_DB exception. When I comment out the function module that locks the user the exception doesn't appear.

EDIT: I'm using the BAPI_USER_LOCK as a RFC Call.

Debugging didn't get me any further. After the first select the debugger jumps back at the top again and then he is already getting the message.

I'm thankful for any hints where this problem comes from.

Regards

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
1,108

I suppose the runtime error behind the exception is DBIF_RSQL_INVALID_CURSOR. The RFC call or the COMMIT WORK closed the cursor open by the SELECT statement (Implicit Database Commits). Select into an internal table and then LOOP at this table.

Regards,
Raymond

Hey,

I'm using a select to proof some data. Within the select clause I check for some conditions. If they are not fulfilled the user gets locked.

The user lock is successful but when the debugger gets back to the top of the select it I'm getting a CX_SY_OPEN_SQL_DB exception. When I comment out the function module that locks the user the exception doesn't appear.

EDIT: I'm using the BAPI_USER_LOCK as a RFC Call.

Debugging didn't get me any further. After the first select the debugger jumps back at the top again and then he is already getting the message.

I'm thankful for any hints where this problem comes from.

Regards

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
1,109

I suppose the runtime error behind the exception is DBIF_RSQL_INVALID_CURSOR. The RFC call or the COMMIT WORK closed the cursor open by the SELECT statement (Implicit Database Commits). Select into an internal table and then LOOP at this table.

Regards,
Raymond

Read only

0 Likes
1,108

Hey,

Thanks Raymond that was pretty easy and works perfectly!

Exception doesn't appear anymore.

Regards