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: 

select is not working!!!!!!!!!!

Former Member
0 Kudos

hi,

my internal table is

data : begin of i_bkpf occurs 0,

xblnr like bkpf-xblnr,

end of i_bkpf.

and my select statement is

select xblnr into table i_bkpf

from bkpf

where blart = p_blart.

loop at i_bkpf.

write : / i_bkpf-xblnr.

endloop.

now there is no output for this statement...there is data int he table against blart inthe table..can anyone correct me ...

thankyou..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

What value is in p_blart?

Your code works fine in our system.

Rob

Message was edited by:

Rob Burbank

7 REPLIES 7

Former Member
0 Kudos

What value is in p_blart?

Your code works fine in our system.

Rob

Message was edited by:

Rob Burbank

0 Kudos

This code works:

TABLES bkpf.

PARAMETERS p_blart LIKE bkpf-blart DEFAULT 'SA'.

DATA : BEGIN OF i_bkpf OCCURS 0,
xblnr LIKE bkpf-xblnr,
END OF i_bkpf.

SELECT xblnr INTO TABLE i_bkpf
FROM bkpf
WHERE blart = p_blart.

LOOP AT i_bkpf.

  WRITE : / i_bkpf-xblnr.

ENDLOOP.

Rob

0 Kudos

Yep me too. What value are you putting into the selection screen parameter?

Regards,

RIch Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Your code works ok for me, I enter "SA" into the parameter field and i get the output. How is your PARAMETER statement defined and what are you putting into that field?

Regards,

Rich Heilman

0 Kudos

hi Rich,

this is my parameter statment:

parameters: p_blart like bkpf-blart.

canu help me in this...

regards,

Challa

BGarcia
Active Contributor
0 Kudos

Hello Challa,

If p_blart is a SELECT-OPTIONS input variable, then the WHERE clause must be like:

where blart IN p_blart.

Best regards,

Bruno Garcia

BGarcia
Active Contributor
0 Kudos

Hey Challa,

Try this

select xblnr into <b>corresponding fields of</b> table i_bkpf

from bkpf

where blart = p_blart.

Regards,

Bruno