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: 

Error in Select Statement " Comma Without Preceding Colon"

Former Member
0 Kudos
236

Helo Gurus.

This is my select query :

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO ( L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER , L_FAXNUMBER , L_POSTCODE1 , L_STRSUPPL1 , L_REGION )

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

But i am getting error as " Comma Without Preceding Colon"

How to correct this?

Points are assured !!!

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos
82

just copy and paste....please mind the spaces..

data : l_addrnumber type AD_ADDRNUM,

L_STREET type AD_STREET,

L_HOUSENUM type AD_HSNM1,

L_CITY2 TYPE ad_CITY2 ,

L_TELNUMBER TYPE AD_TLNMBR1,

L_FAXNUMBER TYPE AD_FXNMBR1,

L_POSTCODE1 TYPE AD_PSTCD1 ,

L_STRSUPPL1 TYPE AD_STRSPP1,

L_REGION TYPE REGIO.

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER , L_FAXNUMBER , L_POSTCODE1 , L_STRSUPPL1 , L_REGION)

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

reward if help full

15 REPLIES 15

Former Member
0 Kudos
82

hi

copy it

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER , L_FAXNUMBER , L_POSTCODE1 , L_STRSUPPL1 , L_REGION)

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

if not working paste full code

Aditya

Former Member
0 Kudos
82

Hi Anay,

I dont think tht there is some error in your query firstly wht u need to do is c the line number where it is showing tht error and just chek the declaration lines whether any where u hav missed the full stop. mostly u might hav missed the fullstop or comma while declaration. thts it!

Hope u get the solution from this /

Regards,

Sana.

reward points if found helpfu;!

Former Member
0 Kudos
82

Hi,

Try the corrected code.

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET,L_HOUSENUM,L_CITY2,L_TELNUMBER,L_FAXNUMBER,L_POSTCODE1,L_STRSUPPL1,L_REGION)

FROM ADRC.

Regards,

Ballack.

Reward Points if helpful.

JozsefSzikszai
Active Contributor
0 Kudos
82

hi Anay,

pls. take care about spaces:

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION)

no space between ( and L_STREET. Similarly no space between L_REGION and )

hope this helps

ec

former_member708410
Contributor
0 Kudos
82

COPY AND PASTE THIS QUERY.

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION)

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

Edited by: Vodka on Mar 26, 2008 9:59 AM

Former Member
0 Kudos
82

Hi

This is because of the , used in the statement adjust it properly

dont place blank between , and field

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO ( L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION )

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

Regards

Shiva

Former Member
0 Kudos
82

Hi,

remove de spaces in into clause

SELECT SINGLE
street
house_num1
city2
tel_number
fax_number
post_code1
str_suppl1
region
INTO (l_street,l_housenum,l_city2,l_telnumber,l_faxnumber,l_postcode1,l_strsuppl1,l_region)
FROM adrc
WHERE addrnumber = l_addrnumber.

Former Member
0 Kudos
82

Hi.

Its still not working.

If there is only one field in select statement, then its working fine,

But not for multiple fields.

Former Member
0 Kudos
82

Hi Anay Kulkarni ,

find the modified code with out syntax error.....

START-OF-SELECTION.      

SELECT SINGLE STREET 
              HOUSE_NUM1 
              CITY2 
              TEL_NUMBER 
              FAX_NUMBER 
              POST_CODE1 
              STR_SUPPL1 
              REGION
           INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION)
           FROM ADRC 
*           INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION)
WHERE ADDRNUMBER = '23453'.

Dont forgot to Reward me points .....

All the very best....

Regards,

Sreenivasa sarma K.

former_member708410
Contributor
0 Kudos
82

Hi ANAY,

Just try this one,

COPY AND PASTE THIS QUERY.

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION)

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

Former Member
0 Kudos
82

Guys,

I have tried everything.

But still the same error.

I am writing this query in Smartform -> Global Definitions->Initialisation

former_member708410
Contributor
0 Kudos
82

Hi ANAY,

First,

Declare these fields

L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION

in GLOBAL FIELD of the smartform.

Then,in the INITIALISATION TAB under Input parameters

give those fields.

Then

COPY AND PASTE THIS QUERY.

IT WILL WORK

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER, L_FAXNUMBER, L_POSTCODE1, L_STRSUPPL1, L_REGION)

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

Reward if helpful

Regards

Vodka.

dhruv_shah3
Active Contributor
0 Kudos
82

Hi write the query as:



SELECT SINGLE land1 regio FROM kna1 INTO (kna1_land1,kna1_regio)
WHERE kunnr = vbpa_kunnr_o.

HTH

Regards,

Dhruv Shah

former_member181995
Active Contributor
0 Kudos
83

just copy and paste....please mind the spaces..

data : l_addrnumber type AD_ADDRNUM,

L_STREET type AD_STREET,

L_HOUSENUM type AD_HSNM1,

L_CITY2 TYPE ad_CITY2 ,

L_TELNUMBER TYPE AD_TLNMBR1,

L_FAXNUMBER TYPE AD_FXNMBR1,

L_POSTCODE1 TYPE AD_PSTCD1 ,

L_STRSUPPL1 TYPE AD_STRSPP1,

L_REGION TYPE REGIO.

SELECT SINGLE

STREET

HOUSE_NUM1

CITY2

TEL_NUMBER

FAX_NUMBER

POST_CODE1

STR_SUPPL1

REGION

INTO (L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER , L_FAXNUMBER , L_POSTCODE1 , L_STRSUPPL1 , L_REGION)

FROM ADRC

WHERE ADDRNUMBER = l_addrnumber.

reward if help full

Former Member
0 Kudos
82

hi,


SELECT SINGLE 
STREET 
HOUSE_NUM1 
CITY2 
TEL_NUMBER 
FAX_NUMBER 
POST_CODE1 
STR_SUPPL1 
REGION
INTO 
*(L_STREET, L_HOUSENUM, L_CITY2, L_TELNUMBER , L_FAXNUMBER , L_POSTCODE1 , L_STRSUPPL1 , L_REGION )*
*FROM ADRC*
 
*WHERE ADDRNUMBER = l_addrnumber.*

regards,

pankaj