‎2006 Jul 19 12:53 AM
Hi,
I am using following code.
event handler for data retrieval
select VENUM VBELN POSNR FROM VEPO into corresponding fields of table T_VEPO
WHERE VBELN = delnumber
AND POSNR = delitemnumber
order by VENUM.
endselect.
I get following error message:
Incorrect nesting: For the statement "ENDSEELCT", there is no open structure introduced by "SELECT".
Please guide me
‎2006 Jul 19 1:10 AM
ENDSELECT IS NOT REQUIRED FOR INTO TABLE SELECTS.
Please mark the topic as closed and award the points.
‎2006 Jul 19 5:11 AM
select VENUM VBELN POSNR FROM VEPO into corresponding fields of table T_VEPO
WHERE VBELN = delnumber
AND POSNR = delitemnumber
order by VENUM.
<b>endselect.</b>-----> not required.
if u used FOR INTO TABLE SELECTS than end select is not required.
‎2006 Jul 19 4:46 AM
As Neil has mentioned, the endselect statement is used only when selecting data from the database into a structure or work area.
In the case you have shown, you are selecting the data into an internal table and hence Endselect is not required.
‎2006 Jul 19 5:12 AM
hi
good
write like this
wrong->
select VENUM VBELN POSNR FROM VEPO into corresponding fields of table T_VEPO
WHERE VBELN = delnumber
AND POSNR = delitemnumber
order by VENUM.
endselect.
right->
select VENUM VBELN POSNR FROM VEPO into corresponding fields of table T_VEPO
WHERE VBELN = delnumber
AND POSNR = delitemnumber
order by VENUM.
thanks
mrutyun
‎2006 Jul 19 5:38 AM
hi
in this case endselect is not required.
if u use 'INTO table' then Endselect is required.
Naveen