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

Closing a cursor.

Former Member
0 Likes
1,356

Hi Friends,

In the execution of a standard SAP Function Module one of my programs is generating a dump stating the reason of

SAPSQL_CURSOR_ALREADY_OPEN.

How can I close this cursor and again run the program. Or can the Basis guys delete them.

Thanks and Regards,

Arunava

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
903

Hi,

This is cause of you are trying to open a cursor that is already open. Check the code that is giving the problem. Put the logic as Open cursor then close it before opening it again.

Or work with the original one do not open it again.

Regards,

amit

3 REPLIES 3
Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
903

Have you tried CLOSE CURSOR statment in your program?

Read only

ulrich_koch
Explorer
0 Likes
903

Hello Arunava,

an open cursor is nothing that is persistent on the database. The short dump just means that an OPEN CURSOR statement is executed twice in a program. This is a programming error.

Best regards

Ulrich

Read only

Former Member
0 Likes
904

Hi,

This is cause of you are trying to open a cursor that is already open. Check the code that is giving the problem. Put the logic as Open cursor then close it before opening it again.

Or work with the original one do not open it again.

Regards,

amit