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

simple QA

Former Member
0 Likes
1,642

select matnr sernr equnr from viser02

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

whats wrong?

16 REPLIES 16
Read only

athavanraja
Active Contributor
0 Likes
1,614

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

Read only

0 Likes
1,614

i made endselect

your suggest dont work

Read only

0 Likes
1,614

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

Read only

0 Likes
1,614

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

what's the error msg??

Read only

0 Likes
1,614

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

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

Read only

0 Likes
1,614

select matnr sernr equnr from viser02

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

this dont work again

i am exosted

Read only

0 Likes
1,614

give space after ,

Read only

0 Likes
1,614

i made

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

err again

Read only

0 Likes
1,614

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

Read only

0 Likes
1,614

i made

- = 'space'

select matnr sernr equnr from viser02

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

i get err

Read only

0 Likes
1,614

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

i will correct it and post it back here.

Raja

Read only

0 Likes
1,614

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

Read only

0 Likes
1,614

select matnr sernr equnr from viser02

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

where sdaufnr = vbdka-vbeln and

posnr = tvbdpa-posnr.

Read only

0 Likes
1,614

hv u solved the query?

Read only

0 Likes
1,614

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.

Read only

Former Member
0 Likes
1,614

use endselect after the select statement.

or extract into internal table.