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

select statement

Former Member
0 Likes
615

hi,

Iam retreiving cust.number, first name nd last name with respect to last name using table kna1.

like

select cust.no firstname lastname into table itab from kna1 where lastname = usergiven last name.

this does not retreives any data. though on the table the user given last name exist .

can anyone tell me what could be the problem.

Regards,

Phyrose.

4 REPLIES 4
Read only

Former Member
0 Likes
590

Convert your last name to Capital before querying the table

This should solve the problem

Read only

Former Member
0 Likes
590

HI,

Have u given the correct parameter name for user given last nam.

Hw do y get the User given LAst Name.

Regards,

Padmam.

Read only

varma_narayana
Active Contributor
0 Likes
590

hi Camila.

This may be bcoz of the UPPERCASE / Lower case.

<b>TRANSLATE V_LASTNAME TO UPPER CASE.</b>

select KUNNR NAME1 <b>UPPER( name2 )</b> into table itab from kna1 where name2 = V_LASTNAME.

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo

Read only

Former Member
0 Likes
590

Don't select on NAME1 and NAME2. these are in mixed upper and lowere case. Instead use the fields created for this purpose - MCOD1 and MCOD2. They are already in upper case.

Rob