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: 

problem with select single statement

Former Member
0 Kudos

Hi friends,

Is there any thing wrong with the coding

SELECT SINGLE podate

poamount

vendorinv

vendordes

INTO ( V_podate,

V_poamount,

V_vendorinv,

V_vendordes )

FROM zpo_input

WHERE ponumber = zpo_input-ponumber.

I get a error message Comma without preceding colon (after SELECT ?).

pls suggest me how to do,

Line

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try this..

u have to give space after each comma and the braces

SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO ( V_podate , V_poamount , V_vendorinv , V_vendordes )
FROM zpo_input
WHERE ponumber = zpo_input-ponumber.

24 REPLIES 24

Former Member
0 Kudos

Try this..

u have to give space after each comma and the braces

SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO ( V_podate , V_poamount , V_vendorinv , V_vendordes )
FROM zpo_input
WHERE ponumber = zpo_input-ponumber.

Former Member
0 Kudos

Hi just try this code

<b>

SELECT SINGLE podate

poamount

vendorinv

vendordes

INTO (V_podate, " Just remove the space bt '(' and 'V'

V_poamount,

V_vendorinv,

V_vendordes) " Just remove the space bt 's' and ')'

FROM zpo_input

WHERE ponumber = zpo_input-ponumber.</b>

It will definitely work

If it helps reward with points

Regards Rk

Former Member
0 Kudos

Line,

Just adjust the bracket...Copy the code now.

SELECT SINGLE podate

poamount

vendorinv

vendordes

INTO (V_podate,

V_poamount,

V_vendorinv,

V_vendordes)

FROM zpo_input

WHERE ponumber = zpo_input-ponumber.

Don't forget to reward if useful....

0 Kudos

I get the message like this,

The list "(V_PODATE" after "INTO" is not of the form (f1, ...,fn), or

contains an undefined field. excludes specification of a field list.

Pls correct me

Regards,

Line

0 Kudos

have u also tried givinng spaces after commas

SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO (V_podate , V_poamount , V_vendorinv , V_vendordes)
FROM zpo_input
WHERE ponumber = zpo_input-ponumber.

Former Member
0 Kudos

hi,

wtite in this way

SELECT SINGLE podate

poamount

vendorinv

vendordes

INTO (V_podate,

V_poamount,

V_vendorinv,

V_vendordes)

FROM zpo_input

WHERE ponumber = zpo_input-ponumber.

Former Member
0 Kudos

Hi Line ,

Is there a space after the open bracket ( and before the ).

If yes please remove it.

Regards

Arun

Former Member
0 Kudos

SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO ( V_podate, V_poamount, V_vendorinv, V_vendordes )
FROM zpo_input
WHERE ponumber = zpo_input-ponumber.

after comma one space

regards

shiba dutta

Former Member
0 Kudos

There shouldn't be a spacing in between ( and V_podate, same goes to V_vendordes and )


SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO (V_podate,
V_poamount,
V_vendorinv,
V_vendordes)
FROM zpo_input
WHERE ponumber = zpo_input-ponumber.

Former Member
0 Kudos

Hi,

Try this:

DATA wa TYPE spfli.

SELECT carrid connid cityfrom cityto

FROM spfli

INTO (wa-carrid, wa-connid, wa-cityfrom, wa-cityto).

WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.

ENDSELECT.

Important: note SPACE given specially in INTO clauuse.

Hope this will help.

former_member533584
Contributor
0 Kudos

Hi,

SELECT SINGLE podate

poamount

vendorinv

vendordes

INTO (V_podate, <b>" Delete Space before V_podate</b>

V_poamount,

V_vendorinv,

V_vendordes )

FROM zpo_input

WHERE ponumber = zpo_input-ponumber.

regards,

ananth

Former Member
0 Kudos

Hi..,

When u are using INTO (....)...

The spaces should be in correct order...

check this.. into (mara-matnr, mara-ernam, mara-ersda ).

check the spaces in this statement !!!

After the first bracket and first variable there should not be any space and .. after the variable and comma no space should be there !! .

reward if it helps u...

sai ramesh

Former Member
0 Kudos

hi,

is this table "zpo_input" defined by u.

then check it.

SELECT SINGLE podate poamount vendorinv vendordes INTO (V_podate,V_poamount,V_vendorinv,V_vendordes) FROM <DB table>

WHERE ponumber = zpo_input-ponumber.

Former Member
0 Kudos

just copy and paste this


SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO (V_podate, V_poamount, V_vendorinv, V_vendordes)
FROM zpo_input
WHERE ponumber = zpo_input-ponumber.

only one space after the comma no gap between brackets..

regards

shiba dutta

Former Member
0 Kudos

Remove the space between bracket and V and also give space ion your where condition

Thnks

0 Kudos

Hi Tried,

All the ways but i am unable to correct,

The list "(V_PODATE" after "INTO" is not of the form (f1, ...,fn), or

contains an undefined field. excludes specification of a field list.

Regards,

Line

0 Kudos

check if u have declared all the 4 fields

V_podate , V_poamount , V_vendorinv , V_vendordes

also double click on that error and check if it occurs on the select statement only

0 Kudos

Hi Line ,

One reason for this can be that you have not defined the varaibles used in the select statement , so please make please check if you have defined all the variables V_podate,V_poamount,V_vendorinv, V_vendordes .

Please check and if it still does not work , please paste your code here this would help us to identify the problem better,

Regards

Arun

0 Kudos

Thanx for all ur response here is my code below

DATA : v_ponumber like zpo_input-ponumber,

v_podate LIKE zpo_input-podate,

v_poamount LIKE zpo_input-poamount,

v_vendorinv LIKE zpo_input-vendorinv,

v_vendordes LIKE zpo_input-vendordes.

v_ponumber = zpo_input-ponumber.

SELECT single podate

poamount

vendorinv

vendordes

INTO (V_podate, V_poamount, V_vendorinv, V_vendordes)

FROM zpo_input WHERE ponumber = v_ponumber.

Pls correct the above code,

Regards,

Line

0 Kudos

Hi Line ,

Unfortunately i was nto able to figure out the error in your code.

I have a similar code and it seems to be working fine , anyway i am pasting the code below

DATA : V_MATNR type MATNR ,
       V_WERKS TYPE WERKS_d.

SELECT SINGLE MATNR WERKS
INTO (V_MATNR, V_WERKS)
FROM MARC
WHERE MATNR = 'ARB'.

Could you please again save the program and try to activae the program and see if it gives the same error.

Regadrs

Arun

0 Kudos

Hi,

first check it whether zpo_input is a data dictionary table.

v_ponumber = zpo_input-ponumber. is wrong.

correct like this

DATA : v_ponumber like zpo_input-ponumber,

v_podate LIKE zpo_input-podate,

v_poamount LIKE zpo_input-poamount,

v_vendorinv LIKE zpo_input-vendorinv,

v_vendordes LIKE zpo_input-vendordes.

v_ponumber = 'XXXXXX'.

SELECT single podate poamount vendorinv vendordes INTO (V_podate, V_poamount, V_vendorinv, V_vendordes) FROM zpo_input WHERE ponumber = v_ponumber.

0 Kudos

i also cant find any error in the code except

tables : zpo_input.

in the begining...

regards

shiba dutta

0 Kudos

Dear Friends,

<b>I got it !</b> thanx for ur communication, I will suitable reward u all.

Regards,

Line

Former Member
0 Kudos

i dont know why it is not giving you the error.


data v_pono like zpo_input-ponumber.

v_pono = zpo_input-ponumber.
SELECT SINGLE podate
poamount
vendorinv
vendordes
INTO (V_podate, V_poamount, V_vendorinv, V_vendordes)
FROM zpo_input
WHERE ponumber = v_pono.


now copy and paste this code and tell us which error it is giving?

just change in the where condition..

regards

shiba dutta

Message was edited by:

SHIBA DUTTA