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 not Returning Value

Former Member
0 Likes
1,027

Hello Everybody

I have a problem.

When I am using select statement its not returning anything even it is true.

****************************************************************************************

data : rand type ZRAND,

it_book type TABLE OF zcof_booking.

set parameter id 'zcof_booking-random' field zcof_booking-random.

MOVE wa_booking-random to rand.

select * from zcof_booking into TABLE it_book where random = rand.

****************************************************************************************

if I am giving a value instead of rand variable then its returning values.

But when I am using rand variable its not returning anything even both

the types are same.

2 REPLIES 2
Read only

Former Member
0 Likes
560

HI,

Can you please elaborate your query,,


data : rand type ZRAND,
it_book type TABLE OF zcof_booking.

set parameter id 'zcof_booking-random' field zcof_booking-random.  
 "{color:red} what is this set parameter is doing here{color}
MOVE wa_booking-random to rand.      
"{color:red} How the value is comming to wa_booking-random{color}

select * from zcof_booking into TABLE it_book where random = rand.

Please debugg through the program and check wether you are passing any values to rand

Thanks,

Anmol.

Edited by: anmol112 on Nov 16, 2010 3:43 PM

Read only

Former Member
0 Likes
560

If zcof_booking-zrandom has a conversion exit, make sure the variable in the WHERE (rand) is left-filled with the correct number of leading zeroes.

Rob