03-31-2009 9:26 AM
Hi guy,
Can any one explain me the difference between the following two definations for packed?(Floor & Ceil)
prod_term TYPE p, "Repair rcv ~ Prod dt (floor)
prod_term2 TYPE p, "Repair rcv ~ Prod dt (ceil)
Thanks.
03-31-2009 9:29 AM
Hi,
floor will give the highest value of the integer.
ceil will give the lowest value of the integer.
Regards,
Pavan
03-31-2009 9:29 AM
hi look at this ....
REPORT zceil_floor .
parameters: p_int type i ,
p_int1 type i .
data: value type p decimals 2 ,
value1 type p decimals 2 ,
value2 type p decimals 2 .
start-of-selection.
value = p_int / p_int1 .
value1 = ceil( value ) .
value2 = floor( value ) .
write:/ 'the actual value is : ' , value .
write:/ 'value using the ceil function : ' , value1 .
write:/ 'value using the floor function : ' , value2 .
03-31-2009 9:29 AM
hi,
Floor and ceil are the two mathematical operations performed in ABAP.
there functionality is as follows.
FLOOR(5.4) = 5 " Greatest integer lesser than the given value
CEIL(5.4) = 6. " Smallest integer greater than the given value
Regards
Sharath
03-31-2009 9:42 AM