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

select single * statement

Former Member
0 Likes
697

Hi everyone,

I have the follwing two codes .The first one works fine but the second one gives me an error.

Please let me know what is the error.

1)The below code works fine

loop at itab.

select single * from zxyz

where zorder = itab-zorder.

if zxyz-id is initial.

---

endif.

endloop.

2)This one doesn't work

select single * from zac

where userid = sy-uname.

if sy-subrc eq 0.

-


endif.

Iam getting this error please let me know

The INTO clause is missing at select, or the from addition at either DELETE,INSERT,MODIFY OR UPDATE IS MISSING.

Thanks in advance.

Deepthi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

Hi Deepthi,

You must declare either the table or an work area in your program.

You can do that with either of the below methods:

1. Tables: ZAC. (or)

2. Data: w_zac like ZAC.

Change your select statement to the following when you use the option 2:

select single *

from zac

into w_zac

where userid = sy-uname.

Hope this helps.

Regards,

Sumant.

Message was edited by: Sumant Sura

4 REPLIES 4
Read only

sridhar_k1
Active Contributor
0 Likes
658

Do u have TABLES statement for table ZAC in the program?

Read only

Former Member
0 Likes
658

can u give the complete code

Read only

Former Member
0 Likes
659

Hi Deepthi,

You must declare either the table or an work area in your program.

You can do that with either of the below methods:

1. Tables: ZAC. (or)

2. Data: w_zac like ZAC.

Change your select statement to the following when you use the option 2:

select single *

from zac

into w_zac

where userid = sy-uname.

Hope this helps.

Regards,

Sumant.

Message was edited by: Sumant Sura

Read only

0 Likes
658

Thanks everyone.

I got that fixed. I some how forgot to mention the tables statment.

Thanks again.