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 Where condition proble

Former Member
0 Likes
679

Hi Experts....

Iam doing a report , where i need to fetch data from

PA30 and display in ALV format,

with basic conditions like

Emp no within select option

and Start Date and End Date from the parameters .

My problem is if i comment the begda and endda in select option

its fetching data

but if i dont its not populating any values

ie. its not satisfying my begda and endda criteria ...y is it so

my SELECT STATEMENT

========================

Select pernr begda endda rtamt from pa0581

into corresponding fields of table it_pa0581

where pernr in so_pernr and

begda = pr_begda and

endda = pr_endda .

Thankx in advance

Regards

Rachel Arun

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
647

Hi,

try this.

Select pernr begda endda rtamt from pa0581

into corresponding fields of table it_pa0581

where pernr in so_pernr and

begda in pr_begda and

endda in pr_endda .

if you declare parameters in selection screen and if its value is space

then your sy-subrc will fail for select statement.

Hi,

try this.

Select pernr begda endda rtamt from pa0581

into corresponding fields of table it_pa0581

where pernr in so_pernr and

begda in pr_begda and

endda in pr_endda .

if you declare parameters in selection screen and if its value is space

then your sy-subrc will fail for select statement.

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
647

you have to modify the conditions:

...begda >= pr_begda and
endda <= pr_endda .

Read only

0 Likes
647

Hi Eric

Thank u so much for your timely help by responding ....

Regards

Rachel

Read only

GauthamV
Active Contributor
0 Likes
648

Hi,

try this.

Select pernr begda endda rtamt from pa0581

into corresponding fields of table it_pa0581

where pernr in so_pernr and

begda in pr_begda and

endda in pr_endda .

if you declare parameters in selection screen and if its value is space

then your sy-subrc will fail for select statement.

Read only

Former Member
0 Likes
647

HI,

I cannot find anything wrong with ur select statement.Try ou these

1.Check for the selection criteria ur entering values are there ion the infotype

2.Check whether ur table begda,endda fields and the field in the parameter are of same type.