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: 

range in the selection screen

Former Member
0 Kudos

Hi,

How can we know the number of values inputed in the selection screen of a select-option(no interval)...

thank you...

regards,

mae

6 REPLIES 6

naimesh_patel
Active Contributor
0 Kudos

You can use the <b>describe</b> statment to get that number:

Like:


tables: bkpf.

select-options: s_date for bkpf-budat.


start-of-selection.
 describe table s_date lines sy-index.
 write: sy-index.

Regards,

Naimesh Patel

0 Kudos

hi,

ehat if i have a value in my range..a,b,c,d,e,f,a,b and c...

how will i caount it that a,b and c will be count as 1..i mean if there is a same value in the field it will juct be counted as 1..

in the example above..the number of data in the reange will be counted as 6 not 9 because a,b and c are inputed twice so i just ned to caount it as 1.

thank you...

regards,

mae

0 Kudos

Why would you have the same value as an INput value in your selection screen twice.

Shreekant

0 Kudos

because sometimes the users inputed it twice..

does it affect the number of value in the range?

thank you...

regards,

mae

0 Kudos

Ok..

Do like:

REPORT  ZTEST_NP.

TABLES: BKPF.

SELECT-OPTIONS: S_DATE FOR BKPF-BUDAT.

START-OF-SELECTION.
  SORT S_DATE.
  DELETE ADJACENT DUPLICATES FROM S_DATE.
  DESCRIBE TABLE S_DATE LINES SY-INDEX.
  WRITE: SY-INDEX.

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi Naimesh Patel,

Thank you, it's a lot of help...

regards,

mae