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: 

Syntax Error..

Former Member
0 Kudos

Hi Friends, Good morning to Everyone...

Actually am BW Consultant... I dont even Knew alphabets in ABAP..

Am having an syntax error like this

Error : Comma without preceding colon (after SELECT ?).

14 REPLIES 14

Former Member
0 Kudos

Hi,

just before this error statement,there is a yellow button click on that it will be corrected.

regards,

pankaj singh

Former Member
0 Kudos

Can you send me the code so that i can able to say......

0 Kudos

Hi. Thx for Replying!!!

In Our Bw.. We will write routines.. We will have predefine Program which will by

Default like this...

<u><i><b>DEFAULT PROGRAM:-</b></i></u>

PROGRAM UPDATE_ROUTINE.

$$ begin of global - insert your declaration only below this line -

  • TABLES: /BIC/MZ2CNEWMAT.

DATA: DIV(2),CUS(10),DIVCUS(12).

*

$$ end of global - insert your declaration only before this line -

FORM compute_key_field

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

USING COMM_STRUCTURE LIKE /BIC/CS8Z2SDOPI

RECORD_NO LIKE SY-TABIX

RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING RESULT LIKE /BIC/VZ2SDBPRIMT-BILL_DATE

RETURNCODE LIKE SY-SUBRC

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

  • result value of the routine

RESULT = .

  • if the returncode is not equal zero, the result will not be updated

RETURNCODE = 0.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.

$$ end of routine - insert your code only before this line -

*

ENDFORM.

So, I have written Code like this.... in ROutine...

<u><i><b>WRITEN PROGRAM:</b></i></u>

PROGRAM UPDATE_ROUTINE.

$$ begin of global - insert your declaration only below this line -

  • TABLES: /BIC/MZ2CNEWMAT.

<b>DATA: DIV(2),CUS(10),DIVCUS(12).</b>

$$ end of global - insert your declaration only before this line -

FORM compute_key_field

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

USING COMM_STRUCTURE LIKE /BIC/CS8Z2SDOPI

RECORD_NO LIKE SY-TABIX

RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING RESULT LIKE /BIC/VZ2SDBPRIMT-/BIC/Z2CDIVCUS

RETURNCODE LIKE SY-SUBRC

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

<b>SELECT SINGLE O~DIVISION N~SID_0CUSTOMER FROM /BIC/MZ2CNEWMAT AS O INNER JOIN /BIC/DZ2SDBPRIM3 AS N

ON O~/BIC/Z2CNEWMAT = N~SID_Z2CNEWMAT

INTO ( DIV, CUS</b> ).

<b>CONCATENATE TEMP CUS INTO DIVCUS</b>.

  • result value of the routine

<b> RESULT = DIVCUS.</b>* if the returncode is not equal zero, the result will not be updated

RETURNCODE = 0.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.

$$ end of routine - insert your code only before this line -

*

ENDFORM.

KIndly help me.. Answering getz appreciated.. Itz Urgent..

Cheerz,

ALURI

0 Kudos

Hi Alluri,

SELECT SINGLE ODIVISION NSID_0CUSTOMER FROM /BIC/MZ2CNEWMAT AS O INNER JOIN /BIC/DZ2SDBPRIM3 AS N

ON O/BIC/Z2CNEWMAT = NSID_Z2CNEWMAT

INTO ( DIV, CUS ).

Take out the space after into statement. INTO (DIV,CUS)

Reward Points if it is helpful.

Regards,

Kiran I

0 Kudos

<b>SELECT SINGLE ODIVISION NSID_0CUSTOMER INTO (DIV, CUS)FROM /BIC/MZ2CNEWMAT AS O INNER JOIN /BIC/DZ2SDBPRIM3 AS N

ON O/BIC/Z2CNEWMAT = NSID_Z2CNEWMAT.</b>

Former Member
0 Kudos

when use Into , this kind of errors u will get .

check this sample sytax.

DATA:  carrid   TYPE scarr-carrid, 
       carrname TYPE scarr-carrname. 
       CARRNAME LIKE SCARR-CARRNAME, 
SELECT carrid carrname 
       INTO (carrid, carrname) -->No SPACE
       FROM scarr. 
  WRITE: / carrid, carrname. 
ENDSELECT.

Former Member
0 Kudos

U can find yellow button with tool tip text 'Correct Errors', if u press that, ur error will get rectified.

Former Member
0 Kudos

pls send the select query

regards

shiba dutta

former_member404244
Active Contributor
0 Kudos

Hi Aluri,

what might have happened is that there is some problem in select query...

may be while passing values to the variables.Please check the code....is it like this

select matnr werks from marc into ( v_matnr, v_werks )

endselect.

so just give some space in the variables as above and check....

regards,

nagaraj

Former Member
0 Kudos

tables: pa0001.

data begin of itab occurs 0.

include structure pa0001.

data end of itab.

Start-of-selection.

select * from pa0001 into table itab.

This is the sample program to use the Select statement..if u want more precise answer then give me ur code and wht u want to do..

reward points

Former Member
0 Kudos

hi use like this

DATA: carrid TYPE scarr-carrid,

carrname TYPE scarr-carrname.

<b>* </b> CARRNAME LIKE SCARR-CARRNAME,

SELECT carrid carrname

INTO (carrid, carrname) <b>"No SPACE</b>

FROM scarr.

WRITE: / carrid, carrname.

ENDSELECT.

uncommend * the (CARRNAME LIKE SCARR-CARRNAME).

regards

Usman

Message was edited by:

Usman Sheriff

Former Member
0 Kudos

u would have used query like this

select field1 field2 from table into (itab1,itab2)

this error may be due to no space between the open bracket or space in the open bracket .

check tht.

if not copy the code & send it.

former_member404244
Active Contributor
0 Kudos

Hi,

the problem is in select query don't give space..

SELECT SINGLE ODIVISION NSID_0CUSTOMER FROM /BIC/MZ2CNEWMAT AS O INNER JOIN /BIC/DZ2SDBPRIM3 AS N

ON O/BIC/Z2CNEWMAT = NSID_Z2CNEWMAT

INTO ( DIV, CUS ).WRITE LIKE THIS (DIV, CUS).

REGARDS,

NAGARAJ

Former Member
0 Kudos

try to remove the space

SELECT SINGLE ODIVISION NSID_0CUSTOMER FROM /BIC/MZ2CNEWMAT AS O INNER JOIN /BIC/DZ2SDBPRIM3 AS N

ON O/BIC/Z2CNEWMAT = NSID_Z2CNEWMAT

INTO (DIV, CUS).

regards

shiba dutta

Message was edited by:

SHIBA DUTTA