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

Error: Invalid interruption of a database selection

Former Member
0 Likes
1,546

Hi,

When i execute the below code, the output is displayed without any problem.

<b>tables lfa1.

select * from lfa1 order by lifnr.

write / lfa1-lifnr.

endselect.</b>

But however when i debug this piece of code, i get an error as below.

ShrtText - Invalid interruption of a database selection

Runtime Errors - DBIF_RSQL_INVALID_CURSOR

Exceptn - CX_SY_OPEN_SQL_DB

Can anybody help me with the reason for the occurence of this problem.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,033

Hi Vijay,

Just go through the following link:

As Sooness pointed out, SELECT-ENDSELECT dumps only the first time. Try re-executing it and it will work fine.

Meanwhile, it is always better to use INTO TABLE OF instead of SELECT-ENDSELECT, as this minimizes database hits.

Regards

Anil Madhavan

6 REPLIES 6
Read only

Former Member
0 Likes
1,033

u cannt debug SELECT-ENDSELECT.

Regards

Peram

Read only

dev_parbutteea
Active Contributor
0 Likes
1,033

Hi,

select .. endselect. dumps the first time only when in debugging mode!

Regards,

Sooness

Read only

Former Member
0 Likes
1,033

HI,

you cannot put break point inside SELECT and ENDSELECT.

Because system will miss the cursor index.

Regards,

Naveen

Read only

Former Member
0 Likes
1,033

Hi

The reason may be You put a break-point between SELECT and ENDSELECT..It will always gives you a Shortdump because you are trying to interrupt an SQL statement. Take out the Breakpoint from the middle of select endselect and try it somewhere else in the program. This time your debugger will work perfectly.Otherwise if you want to use Debugger in between the Select and Endselect use it after an appending.

Reward All Helpfull answers....

Read only

Former Member
0 Likes
1,034

Hi Vijay,

Just go through the following link:

As Sooness pointed out, SELECT-ENDSELECT dumps only the first time. Try re-executing it and it will work fine.

Meanwhile, it is always better to use INTO TABLE OF instead of SELECT-ENDSELECT, as this minimizes database hits.

Regards

Anil Madhavan

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,033

Hello Vijay

You can debug a SELECT - ENDSELECT loop but you have to use <b>F6 </b>(and not F5) for step-by-step debugging.

Regards

Uwe