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: 

find missing value

Former Member
0 Kudos

hi all,

i have a small prob i.e. in selection screen user enters a period range and i calc. the stock for it. is the period in the given range is missing in the table i need to perform some action.

suppose range is 2 to 5 and 4th period is missing then how shld i find that .

thanx...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

in the selection screen take a range of type i.

OR

u can make a domain with fixed value range. and use it in the Select-options..

Suppose u make a domain period in se11(yperiod) and set the fixed values say 1,2,3,4....

now use

SELECT-OPTIONS: PERIOD FOR YPERIOD.

In this way u can select a range and also individual values.

i think this may help u.

6 REPLIES 6

Former Member
0 Kudos

not a single reply...?

why so...?

Former Member
0 Kudos

Hi Nilesh,

Select Options data is stored in an internal table with fields, SIGN,OPTION,LOW,HIGH, i think by looking into these table we can know what values are excluded.

comment on it.

Regards

Kumar M.

Former Member
0 Kudos

in the selection screen take a range of type i.

OR

u can make a domain with fixed value range. and use it in the Select-options..

Suppose u make a domain period in se11(yperiod) and set the fixed values say 1,2,3,4....

now use

SELECT-OPTIONS: PERIOD FOR YPERIOD.

In this way u can select a range and also individual values.

i think this may help u.

Former Member
0 Kudos

//in the given range is missing in the table i need to perform some action.

Ok ur sel screen range is 1-5

and stock table entries are 1 , 2 , 5

As u say 3,4 is missing in ur stock table.

compare the two tables (selection range table ).. with ur selection key (as in range ) and filter out the missing . if that is the case ..

you can perfom the action of missed out entries .

Br,

Vijay.

Former Member
0 Kudos

Hi Nilesh,

go through following code...

data: begin of itab occurs 0,

empid type i,

name(20) type c,

address(40) type c,

end of itab.

data:val1 like itab-empid.

itab-empid = '01'.

itab-name = 'Taneesha'.

itab-address = '1001/11 shalimar garden '.

append itab.

itab-empid = '02'.

itab-name = 'Taneesha1'.

itab-address = '1001/11 shalimar garden '.

append itab.

itab-empid = '04'.

itab-name = 'Taneesha3'.

itab-address = '1001/11 shalimar garden '.

append itab.

select-options:s_empid for itab-empid.

val1 = s_empid-low.

loop at itab where empid in s_empid .

if val1 > s_empid-high.

exit.

endif.

if itab-empid = val1.

write:/ itab-empid ,

itab-name,

itab-address.

elseif itab-empid ne val1.

write:/ 'data not found'.

endif.

val1 = val1 + 1.

endloop.

i hope u will get some help .....

Thanks & Regards

Ashu Singh

Former Member
0 Kudos

Hi

As per my understanding you are saying that if some range is missing in table .

You can handle that in

At Selection-Screen on <Field>

You can check and send message at this point.

Regards

Neha Shukla