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

Error with Select in ABAP

Former Member
0 Likes
1,394

Hi All,

I am using the following query, zzglvstid and zzglvrole are primary keys for the table zfi_glv_notf.

Data: w_test_name type tdname-zfi_glv_notf

SELECT tdname FROM zfi_glv_notf

INTO w_text_name

WHERE zzglvstid = w_group_status

AND zzglvrole = w_role.

ENDSELECT.

When I do and extended program check it says " SELECT TDNAME HAS AN EMPTY BODY", I don't why.

Can any one help me in getting it through ...(do not want to use "#EC *)

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
832

Hi ram,

is not

Data: w_test_name type zfi_glv_notf-tdname.

???

how this table is declarated??

Regards

Allan Cristian

Read only

Former Member
0 Likes
832

From your SELECT it feels that TDNAME is a structure whose value you are trying to pass to a variable W_TEST_NAME. Please make correction in W_TEST_NAME declaration and it should solve your problem.

ashish

Read only

Former Member
0 Likes
832

Hi

First corrrect the DATA decleration...

it should be like <b>tablename - field name</b>

<b>Data: w_test_name type zfi_glv_notf-tdname</b>

SELECT tdname FROM zfi_glv_notf

INTO w_text_name

WHERE zzglvstid = w_group_status

AND zzglvrole = w_role.

ENDSELECT.

<b>Reward Points if it is helpful.</b>

Thanks & Regards

ilesh 24x7

Read only

Former Member
0 Likes
832

Why is there no code between your

SELECT tdname FROM zfi_glv_notf

INTO w_text_name

WHERE zzglvstid = w_group_status

AND zzglvrole = w_role.

<b>*Code ????</b>

ENDSELECT.

Read only

Former Member
0 Likes
832

If you're not selecting into a table, you don't need the ENDSELECT statement, but your select statement should be SELECT SINGLE

Read only

Former Member
0 Likes
832

Hi Ram ,

It means that body of SELECT and ENDSELECT is empty, you should have written some logic here.

Check your program again , you can replace it by SELECT or SELECT SINGLE.

Read only

0 Likes
832

Check the original date of this post.

Rob