‎2010 Sep 27 7:40 AM
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 .
‎2010 Sep 27 7:52 AM
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,
‎2010 Sep 27 7:46 AM
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.
‎2010 Sep 27 7:56 AM
‎2010 Sep 27 7:52 AM
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,
‎2010 Sep 27 8:04 AM
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