Application Development 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: 

query, where clause not working.

Former Member
0 Kudos

Hi,

Query is:

select vbeln posnr matnr

from vbap

into table it_ivbap.

it_ivbap is internal table. i got records when i executed this query.

gave a where clause

select vbeln posnr matnr

from vbap

into table it_ivbap

where vbeln = '5049'.

it is not returning any records. i tried with all the possile values of vbeln

what I am doing wrong.

Thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

Hello,

Change like this,


select vbeln posnr matnr
from vbap
into table it_ivbap
where vbeln = '0000005049'. " Check here

Regards,

vasanth

Former Member
0 Kudos

Hi,

VBELN is the 10 charecters field, so whenever you use the where clause you need to provide the total length, so use the ZEROS before that number to execute that query

Regards

Sudheer

Former Member
0 Kudos

Thank you so much.