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

problem with select single statement

Former Member
0 Likes
2,183

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
Read only

Former Member
0 Likes
2,159

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
Read only

Former Member
0 Likes
2,160

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.

Read only

Former Member
0 Likes
2,159

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

Read only

Former Member
0 Likes
2,159

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....

Read only

0 Likes
2,159

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

Read only

0 Likes
2,159

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.

Read only

Former Member
0 Likes
2,159

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.

Read only

Former Member
0 Likes
2,159

Hi Line ,

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

If yes please remove it.

Regards

Arun

Read only

Former Member
0 Likes
2,159

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

Read only

Former Member
0 Likes
2,159

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.

Read only

Former Member
0 Likes
2,159

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.

Read only

Former Member
0 Likes
2,159

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

Read only

Former Member
0 Likes
2,159

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

Read only

Former Member
0 Likes
2,159

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.

Read only

Former Member
0 Likes
2,159

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

Read only

Former Member
0 Likes
2,159

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

Thnks

Read only

0 Likes
2,159

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

Read only

0 Likes
2,159

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

Read only

0 Likes
2,159

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

Read only

0 Likes
2,159

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

Read only

0 Likes
2,159

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

Read only

0 Likes
2,159

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.

Read only

0 Likes
2,159

i also cant find any error in the code except

tables : zpo_input.

in the begining...

regards

shiba dutta

Read only

0 Likes
2,159

Dear Friends,

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

Regards,

Line

Read only

Former Member
0 Likes
2,159

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