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 : comma without preceding colon

Former Member
0 Kudos
1,993

Hi,

I am using the following select query inside the loop and it is displaying syntax error:

comma without preceding colon ( after Select ? )

Can anybody suggest what could be an issue...

SELECT SINGLE RUECK

RMZHL

IEDD

AUFNR

STOKZ

STZHL

FROM AFRU INTO ( L_RUECK, L_RMZHL, L_IEDD, L_AUFNR, L_STOKZ, L_STZHL )

WHERE RUECK IN S_RUECK AND

AUFNR = WA_ZSCPRT100 AND

STOKZ = SPACE AND

STZHL = 0.

WA_AFRU-RUECK = L_RUECK.

WA_AFRU-RMZHL = L_RMZHL.

WA_AFRU-IEDD = L_IEDD.

WA_AFRU-AUFNR = L_AUFNR.

WA_AFRU-STOKZ = L_STOKZ.

WA_AFRU-STZHL = L_STZHL.

APPEND WA_AFRU INTO T_AFRU.

CLEAR WA_AFRU.

CLEAR : L_RUECK,

L_RMZHL,

L_IEDD,

L_AUFNR,

L_STOKZ,

L_STZHL.

Any suggestions will be apprecaited!

regards,

Kittu

1 ACCEPTED SOLUTION

Former Member
0 Kudos
181

Hi Kittu ,

I have checked the code and modified a bit , now it is working fine --

DATA : l_rueck TYPE afru-rueck,
         l_rmzhl TYPE afru-rmzhl,
         l_iedd TYPE afru-iedd,
         l_aufnr TYPE afru-aufnr,
         l_stokz TYPE afru-stokz,
         l_stzhl TYPE afru-stzhl.

SELECT SINGLE rueck
rmzhl
iedd
aufnr
stokz
stzhl
FROM afru INTO (l_rueck, l_rmzhl, l_iedd, l_aufnr, l_stokz, l_stzhl) " Modified
WHERE rueck IN s_rueck AND
aufnr = wa_zscprt100 AND
stokz = space AND
stzhl = 0.

wa_afru-rueck = l_rueck.
wa_afru-rmzhl = l_rmzhl.
wa_afru-iedd = l_iedd.
wa_afru-aufnr = l_aufnr.
wa_afru-stokz = l_stokz.
wa_afru-stzhl = l_stzhl.

APPEND wa_afru into t_afru.
CLEAR wa_afru.
CLEAR : l_rueck,
l_rmzhl,
l_iedd,
l_aufnr,
l_stokz,
l_stzhl.

Regards

Pinaki

5 REPLIES 5

Former Member
0 Kudos
181

Please press F1 on SELECT.

Rob

ThomasZloch
Active Contributor
0 Kudos
181

APPEND WA_AFRU INTO T_AFRU.

should be

APPEND WA_AFRU TO T_AFRU.

Also, remove spaces between the brackets and the field names in the select.

Thomas

Edited by: Thomas Zloch on Jun 3, 2009 5:41 PM, right before Rich's post, honestly!

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
181

Remove the spaces after the ( and before the ) in this line.

FROM AFRU INTO (L_RUECK, L_RMZHL, L_IEDD, L_AUFNR, L_STOKZ, L_STZHL)

Regards,

Rich Heilman

Former Member
0 Kudos
182

Hi Kittu ,

I have checked the code and modified a bit , now it is working fine --

DATA : l_rueck TYPE afru-rueck,
         l_rmzhl TYPE afru-rmzhl,
         l_iedd TYPE afru-iedd,
         l_aufnr TYPE afru-aufnr,
         l_stokz TYPE afru-stokz,
         l_stzhl TYPE afru-stzhl.

SELECT SINGLE rueck
rmzhl
iedd
aufnr
stokz
stzhl
FROM afru INTO (l_rueck, l_rmzhl, l_iedd, l_aufnr, l_stokz, l_stzhl) " Modified
WHERE rueck IN s_rueck AND
aufnr = wa_zscprt100 AND
stokz = space AND
stzhl = 0.

wa_afru-rueck = l_rueck.
wa_afru-rmzhl = l_rmzhl.
wa_afru-iedd = l_iedd.
wa_afru-aufnr = l_aufnr.
wa_afru-stokz = l_stokz.
wa_afru-stzhl = l_stzhl.

APPEND wa_afru into t_afru.
CLEAR wa_afru.
CLEAR : l_rueck,
l_rmzhl,
l_iedd,
l_aufnr,
l_stokz,
l_stzhl.

Regards

Pinaki

Former Member
0 Kudos
181

Hi,

Thank you for your quick response!

I apprecaite your suggestions...

I forgot to declate the varaibles... L_RUECK, L_RMZHL, L_IEDD, L_AUFNR, L_STOKZ, L_STZHL

Issue is Fixed!

Regards,

Kittu