Skip to Content
author's profile photo Former Member
Former Member

plz chk the code

==================================

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....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:23 AM

    Declare table tsp01.

    like

    Tables: tsp01.

    in ur program

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:23 AM

    declare as follows in global data declaration of ur code.

    tables tsp01.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 08:29 AM

    Hi Neha ,

    Declare the table tsp01 in your program using the command

    <b>TABLES : tsp01.</b>

    Regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2007 at 09: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.