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: 

simple QA

Former Member
0 Kudos

select matnr sernr equnr from viser02

into ( i_matnrs-matnr,i_matnrs-sernr,i_matnrs-equnr)

whats wrong?

16 REPLIES 16

athavanraja
Active Contributor
0 Kudos

whats the error you are getting.

i just copy pasted your code and found two issues.

1. remove the space between ( and imatnrs-matnr

2. add endselect.

data: i_matnrs type viser02 .

select matnr sernr equnr from viser02

into (i_matnrs-matnr,i_matnrs-sernr,i_matnrs-equnr) .

endselect .

Regards

Raja

0 Kudos

i made endselect

your suggest dont work

0 Kudos

you have ot give us more info to get better help.

are you getting error message or

the data is not getting populated into the variable

did you copy/paste the code sample i have posted. its a tested one.

Regards

Raja

0 Kudos

i hope u have given spaces before and after ')','('.

what's the error msg??

0 Kudos

into ( i_matnrs-matnr , i_matnrs-sernr,i_matnrs-equnr )

err----comma without precedind ...(SELECT)

0 Kudos

select matnr sernr equnr from viser02

into ( i_matnrs-matnr,i_matnrs-sernr,i_matnrs-equnr )

this dont work again

i am exosted

0 Kudos

give space after ,

0 Kudos

i made

into ( i_matnrs-matnr, i_matnrs-sernr, i_matnrs-equnr )

err again

0 Kudos

select matnr sernr equnr from viser02

into (i_matnrs-matnr,i_matnrs-sernr,i_matnrs-equnr) .

space after <b>into</b>

no space after <b>(</b>

no space before <b>)</b>

or just copy paste the statement above.

Regards

Raja

0 Kudos

i made

- = 'space'

select matnr sernr equnr from viser02

into-(i_matnrs-matnr-,-i_matnrs-sernr-,-i_matnrs-equnr)

i get err

0 Kudos

copy paste your code - the select statement and the declaration for i_matnrs.

i will correct it and post it back here.

Raja

0 Kudos

Rani,

data: i_matnrs type viser02 .

select matnr sernr equnr from viser02

into (i_matnrs-matnr, i_matnrs-sernr, i_matnrs-equnr).

endselect .

This shoulf work, however, if you are looking for dumping the data into a table, the declare i_matnrs as a internal table and APPEND i_matnrs before ENDSELECT.

regards,

Ravi

0 Kudos

select matnr sernr equnr from viser02

into (i_matnrs-matnr , i_matnrs-sernr , i_matnrs-equnr)

where sdaufnr = vbdka-vbeln and

posnr = tvbdpa-posnr.

0 Kudos

hv u solved the query?

0 Kudos

Hi Rani,

select matnr sernr equnr from viser02

into (i_matnrs-matnr , i_matnrs-sernr , i_matnrs-equnr)

where sdaufnr = vbdka-vbeln and

posnr = tvbdpa-posnr.

In the above program code that you have posted, I suppose I_MATNRS is an internal table of VISER02 with header line. I also suppose that the table is VBDPA and not TVBDPA.

You need not have to provide space between the bracket & the character or between comma & character.

Just look at the code that I have modified.

tables: vbdka,vbdpa,viser02.

data: i_matnrs type viser02 occurs 0 with header line.

select matnr sernr equnr

into (i_matnrs-matnr,i_matnrs-sernr,i_matnrs-equnr)

from viser02

where sdaufnr = vbdka-vbeln and

posnr = vbdpa-posnr.

endselect.

This will not give any compilation errors.

Regards,

SP.

Former Member
0 Kudos

use endselect after the select statement.

or extract into internal table.