Application Development and Automation 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: 
Read only

Simple Select Issue.

former_member295881
Contributor
0 Likes
644

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,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
604

write the coding as :

select kunnr ktokd into (v_kunnr , v_ktokd)

from kna1

where kunnr = v_kunnr.

endselect.

3 REPLIES 3
Read only

Former Member
0 Likes
605

write the coding as :

select kunnr ktokd into (v_kunnr , v_ktokd)

from kna1

where kunnr = v_kunnr.

endselect.

Read only

former_member295881
Contributor
0 Likes
604

Thanks a lot Sirini. It worked.

Read only

Former Member
0 Likes
604

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

Rob