Skip to Content
0

CX_SY_OPEN_SQL_DB after locking user in SELECT-Clause

Feb 08, 2017 at 12:49 PM

49

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raymond Giuseppi
Feb 08, 2017 at 02:09 PM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hey,

Thanks Raymond that was pretty easy and works perfectly!

Exception doesn't appear anymore.

Regards

0