Application Development 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: 

CX_SY_OPEN_SQL_DB after locking user in SELECT-Clause

former_member310342
Participant
0 Kudos

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

raymond_giuseppi
Active Contributor

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

2 REPLIES 2

raymond_giuseppi
Active Contributor

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

0 Kudos

Hey,

Thanks Raymond that was pretty easy and works perfectly!

Exception doesn't appear anymore.

Regards