2007 Jan 10 8:20 AM
==================================
PERFORM get_spool_number USING sy-repid
sy-uname
CHANGING mi_rqident.
=====================================
FORM get_spool_number USING f_repid
f_uname
CHANGING f_rqident.
DATA:
lc_rq2name LIKE tsp01-rq2name.
CONCATENATE f_repid+0(8)
f_uname+0(3)
INTO lc_rq2name SEPARATED BY '_'.
SELECT rqident FROM tsp01 WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
f_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR f_rqident.
ENDIF.
ENDFORM." get_spool_number
Field list without INTO clause is not allowed . allowed. . allowed. .
is the error i m getting when i activate it..
what is the error in select query....
2007 Jan 10 8:23 AM
2007 Jan 10 8:23 AM
declare as follows in global data declaration of ur code.
tables tsp01.
2007 Jan 10 8:24 AM
either you can use select * for your qery or
SELECT rqident FROM tsp01 <b>into tsp01</b>-rqident WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
f_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
regards
shiba dutta
2007 Jan 10 8:26 AM
i guess u r missing INTO clause in the select statement
SELECT rqident FROM tsp01 INTO tsp01-rqident WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
f_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
also declare the table as suggested by others
Message was edited by:
Chandrasekhar Jagarlamudi
Message was edited by:
Chandrasekhar Jagarlamudi
2007 Jan 10 8:26 AM
Hi neha,
look at this short example. you have to use an INTO-Field.
*
TABLES: MARA.
data: matnr like mara-matnr.
START-OF-SELECTION.
*
SELECT MATNR FROM MARA UP TO 10 ROWS into matnr.
*
WRITE: / MARA-MATNR, matnr.
*
ENDSELECT.
*
Regards, Dieter
2007 Jan 10 8:28 AM
Neha,
use below code
data : v_temp like tsp01-rqident.
SELECT rqident FROM tsp01 into v_temp WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
f_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
you have to use into variable name in your select statement
reward Pls.
2007 Jan 10 8:29 AM
Hi Neha ,
Declare the table tsp01 in your program using the command
<b>TABLES : tsp01.</b>
Regards
Arun
2007 Jan 10 9:06 AM
Hi,
try this
==================================
PERFORM get_spool_number USING sy-repid
sy-uname
CHANGING mi_rqident.
=====================================
FORM get_spool_number USING f_repid
f_uname
CHANGING f_rqident.
DATA: lc_rq2name LIKE tsp01-rq2name.
CONCATENATE f_repid+0(8) f_uname+0(3)
INTO lc_rq2name SEPARATED BY '_'.
SELECT rqident INTO tsp01-rqident FROM tsp01
WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
f_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR f_rqident.
ENDIF.
ENDFORM." get_spool_number
Make sure that u have declared teh TABLES: tsp01.
Hope thsi solves ur problem.
Reward points and close the thread if ur problem got solved.