12-19-2006 5:59 AM
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 ?).
12-19-2006 6:01 AM
Hi,
just before this error statement,there is a yellow button click on that it will be corrected.
regards,
pankaj singh
12-19-2006 6:01 AM
12-19-2006 6:12 AM
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
12-19-2006 6:18 AM
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
12-19-2006 6:18 AM
<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>
12-19-2006 6:02 AM
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.
12-19-2006 6:03 AM
U can find yellow button with tool tip text 'Correct Errors', if u press that, ur error will get rectified.
12-19-2006 6:03 AM
12-19-2006 6:04 AM
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
12-19-2006 6:05 AM
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
12-19-2006 6:06 AM
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
12-19-2006 6:07 AM
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.
12-19-2006 6:15 AM
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
12-19-2006 6:16 AM
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