Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select - endselect

I would like to create select -endselect construction and print every processed record

select HASH

from UPS_HASH

INTO table t2.

*

write t2-hash.

*

Endselect.

But the system generates the following error :

For the statement Endselect , there is no open structure introduced by select.

Can somebody help me

Tags:
replied

Hi Comandante,

You have not written the correct syntax. Please see the below correct syntax Table should not be used there.

select HASH
from UPS_HASH
INTO  t2.
*
write t2-hash.
*
Endselect.

Instead of this why dont you try with the internal table like below.

select HASH
from UPS_HASH
INTO table t2.
loop at t2.
write t2-hash.
  
endloop.

This will increase the performance aswell.

Thanks,

Chidanand

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question