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

short dump occuring after select

Former Member
0 Likes
862

Hello all

im getting short dump in the following select statement

SELECT val1

UP TO 1 ROWS

FROM yrot_varv INTO l_val1

WHERE name = c_ygts_mmoc_werks

AND val1 = l_werks.

ENDSELECT.

The dump description is as follows :

Short text

Invalid interruption of a database selection.

But the same statement was working earlier . only today we got this problem ...

can any body tell me why im getting short dump in this statement .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
724

Hi,

Are you using old debugger to debug your code? and debug select-endselect most of time gives dump.

In general, do not use SELECT-ENDSELECT loop in your ABAP program. Instead, use internal table to store data.

Thanks,

4 REPLIES 4
Read only

Former Member
0 Likes
724

Hi,

I think you got the dump while debugging the select ...endselect.

Don't debug the select..endselect , system commits and dumps.

SELECT val1

UP TO 1 ROWS

FROM yrot_varv INTO l_val1

WHERE name = c_ygts_mmoc_werks

AND val1 = l_werks.

ENDSELECT.

if ..... <-- start debugging from here ..

endif.

Regards,

Srini.

Read only

0 Likes
724

my problem is solved . problem is only in debugging mode

Read only

Former Member
0 Likes
725

Hi,

Are you using old debugger to debug your code? and debug select-endselect most of time gives dump.

In general, do not use SELECT-ENDSELECT loop in your ABAP program. Instead, use internal table to store data.

Thanks,

Read only

Former Member
0 Likes
724

Hi Pawan

I believe because you are selecting only upto single row, thats why you are getting the dump.

replace your code by:

SELECT single val1

FROM yrot_varv INTO l_val1 WHERE name = c_ygts_mmoc_werks

AND val1 = l_werks.

Upto 1 row may give you error because the select query will run till first row of the table.

if values exists at the first row it will give the result otherwise it will give dump or error.

but Select Single will return only one value present in the table for the where conditions at whichever position it exists.

here l_val1 should be a variable of type yrot_varv-val1 . also name and val1 should be present in table yrot_varv.

c_ygts_mmoc_werks is of type yrot_varv-name.

l_werks is if type yrot_varv-val1.

I hope this will work for you.

Thanks

lalit Gupta