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

Simple Select Issue.

Hello experts,

Iu2019m trying to write a simple select but canu2019t make it working. All Iu2019m trying to do is to get values from KNA1 into 2 variables as follows.

select kunnr ktokd into v_kunnr v_ktokd

from kna1

where kunnr = v_kunnr.

endselect.

When I check SAP says u201CV_KTOKDu201D is not expected. However when I do the same code for 1 variable it work fine.

select kunnr into v_kunnr

from kna1

where kunnr = v_kunnr.

endselect.

Can please somebody correct my mistake.

Thanks a lot in advance,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 10, 2010 at 09:21 PM

    write the coding as :

    select kunnr ktokd into (v_kunnr , v_ktokd)

    from kna1

    where kunnr = v_kunnr.

    endselect.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 10, 2010 at 09:30 PM

    Thanks a lot Sirini. It worked.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 10, 2010 at 10:00 PM

    Zero - this was an extremely basic question. One that could have been solved by pressing F1 on SELECT. please see and before posting.

    Rob

    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.