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 statement

Former Member
0 Likes
1,179

Hi,

I am getting one error in following select statement

select single land1 name1 from lfa1 into (lv_land1, lv_name1) where lifnr in s_lifnr.

the error is " the list (lv_land1" after "into" is not of the form (f1,...,fn), or contains an undefined field.

Could anybody will tell me what is the error here??

I have declared all the necessary fields.

1 ACCEPTED SOLUTION
Read only

alex_m
Active Contributor
0 Likes
1,008

The select statement is perfect, but the variable u should check, whether its already declared.

8 REPLIES 8
Read only

Former Member
0 Likes
1,008

have u declared lv_land1 and lv_name1

Read only

Former Member
0 Likes
1,008

It seems to compile fine for me.

I think one of these lv_land1, lv_name1 is not declared properly.

Check the spellings

Read only

Former Member
0 Likes
1,008

hi

select single land1 name1 from lfa1 into (lv_land1, lv_name1)

lv_land1, lv_name1 declare these field as

lv_land1 like lfa1-land1.

rgds

Deepak

Read only

0 Likes
1,008

Try omitting all the spaces in the parenthesis

regards,

Panayotis

Read only

Former Member
0 Likes
1,008

Hi neha

Your declaration is wrong inthe select statement u have topass all the values into a single internal table


DATA: BEGIN OF ITAB OCCURS 0,
              LAND1 LIKE LFA1-LAND1,
               NAME1 LIKE LFA1-NAME1,
      END OF ITAB.


select  land1 name1 from lfa1 into ITAB
           where lifnr in s_lifnr.


Rewards if helpfull

Regards

Pavan

Read only

alex_m
Active Contributor
0 Likes
1,009

The select statement is perfect, but the variable u should check, whether its already declared.

Read only

Former Member
0 Likes
1,008

Hi,

Make sure to have a space after (.

Regards,

Rama.Pammi

Read only

Former Member
0 Likes
1,008

hi,

chk this code with ur program.

tables : lfa1.
select-options : s_lifnr for lfa1-lifnr.
data : lv_land1 like lfa1-land1,
        lv_name1 like lfa1-name1.
select single land1 name1 from lfa1 into (lv_land1, lv_name1) where lifnr in s_lifnr.

Regards

Reshma