Application Development 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: 

Error with Select in ABAP

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi ram,

is not

Data: w_test_name type zfi_glv_notf-tdname.

???

how this table is declarated??

Regards

Allan Cristian

Former Member
0 Kudos

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

former_member387317
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Check the original date of this post.

Rob