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: 

select statement

Former Member
0 Kudos

Hi,

Can any one tell me what is the wrong in this statemnet?

select single ktgrm prodh into (g_ktgrm g_prodh)

from mvke where matnr = p_matnr.

cheers

kaki

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

',' is missing..

select single ktgrm prodh into <b>(g_ktgrm<b>,</b> g_prodh)</b>

from mvke where matnr = p_matnr.

Sri

Message was edited by: Srikanth Pinnamaneni

10 REPLIES 10

Former Member
0 Kudos

Hi,

',' is missing..

select single ktgrm prodh into <b>(g_ktgrm<b>,</b> g_prodh)</b>

from mvke where matnr = p_matnr.

Sri

Message was edited by: Srikanth Pinnamaneni

0 Kudos

No,

Still it is giving errors.

kaki

0 Kudos

Hi,

What is the error that you are getting?

Can you post the entire code?

It shows no syntax errors for me here..

Sri

0 Kudos

Parameter: p_matnr like mara-matnr.

data: g_ktgrm like mvke-ktgrm.

data: g_prodh like mvke-prodh.

select single ktgrm prodh into (g_ktgrm, g_prodh)

from mvke where matnr = p_matnr.

iam getting "statement is not accessible" error

kaki

Message was edited by: Kaki R

0 Kudos

Hi,

First of all I think it is normally a warning message.

Secondly, it seems you have this code in your program outside/after a subroutine (after FORM..ENDFORM).

If it is a report then change it to appropriate place like START-OF-SELECTION or END-OF-SELECTION etc..

OR if you want it inside a subroutine then do it accordingly.

Check your code once or paste the entire code if it is not still clear to you..

Hope this helps..

<b>NOTE: If your issue is solved then close the post..</b>

Sri

Message was edited by: Srikanth Pinnamaneni

0 Kudos

Hi,

No space between , and g_prodh.

Parameter: p_matnr like mara-matnr.

data: g_ktgrm like mvke-ktgrm.

data: g_prodh like mvke-prodh.

select single ktgrm prodh into (g_ktgrm,g_prodh)

from mvke where matnr = p_matnr.

It is not giving any error to me.

0 Kudos

hi,

write<b> start-of-selection</b> before the select statement.

it will solve the problem.

you may be having either some form above this, or some class declared, in such case u must write start-of-selection if u want it into start-of-selection or else which ever event you want your code to be

(end-of-selection, etc).

regards,

manohar.

0 Kudos

Hi,

I tried folowing code in my system and its giving me result without any warnings.

data: g_ktgrm like mvke-ktgrm.
data: g_prodh like mvke-prodh.
data: p_matnr like mvke-MATNR.
p_matnr = 'COUPON'.
select single ktgrm prodh into (g_ktgrm, g_prodh)
from mvke where matnr = p_matnr.

write: / g_ktgrm, g_prodh.

0 Kudos

thanks for all replies

points allowted

kaki

Former Member
0 Kudos

HI,

Are u getting this error 'comma without preceding colon(after select?).'

if yes then you might given some space between open braces and g_ktgrm.

check it out once.

REGARDS,

MANOHAR.