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: 

Regarding Select Options Ranges....

Former Member
0 Kudos

Hii all,,

Am Giri...

Am wrking on ABAP-HR ....

Presently am generating report on PF for both contract employees and regular employees..

My prblm is tat..

Am taking the personnel number at run time by select options.

suppose..my data is..

Ecode Ename PFnumber Pfbasis

01 sham 01 2000

...........................

..........

1000 ram 1000 5000..

suppose my data is of 1000 records... itzz gving me the correct data for some employees when i give different ranges........but instead of tat it should give the correct data even if i dont give the range also..right...

Can anyone please help me in solving this problem...

itzz quite an urgent ont for me........

Thanking You all..........

With Regards..

Giri

1 ACCEPTED SOLUTION

Former Member
0 Kudos

see the select statement whether it is wrong or not

select-options:s_pernr for pa0002-pernr .

ranges:r_pernr for pa0002-pernr .

loop at s_pernr .

r_pernr-low = s_pernr-low .

r_pernr-sign= 'I'.

r_pernr-options = 'EQ'.

appnd r_pernr .

endloop.

use this r_ranges in the select statement

2 REPLIES 2

Former Member
0 Kudos

see the select statement whether it is wrong or not

select-options:s_pernr for pa0002-pernr .

ranges:r_pernr for pa0002-pernr .

loop at s_pernr .

r_pernr-low = s_pernr-low .

r_pernr-sign= 'I'.

r_pernr-options = 'EQ'.

appnd r_pernr .

endloop.

use this r_ranges in the select statement

Former Member
0 Kudos

May be ur select statement is not working properly pl. check it again.

select-options: s_pernr for PA0001-pernr.

Now when selecting data from database table use s_pernr with IN operator in the where clause of the select statement without considering it's content i.e. 'if not s_pernr[] is initial' this check is not required before the select statement.

Ex:

Select .........

...................

where pernr in s_pernr.

Regards,

Joy.