10-20-2008 6:19 AM
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...
10-20-2008 6:53 AM
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.
10-20-2008 6:43 AM
10-20-2008 6:49 AM
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.
10-20-2008 6:53 AM
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.
10-20-2008 7:01 AM
//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.
10-20-2008 7:58 AM
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
10-20-2008 10:19 AM
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