Rounding up the value
Hi Guyz,
if value is : 9.2467
should change to : 9.25
i dont wanna use function module Round.
Plz advise..
Thanks
Hello,
I donot think you need to do anything SAP will automatically round-off.
DATA:
v1 TYPE p DECIMALS 4 VALUE '9.2467',
v2 TYPE p DECIMALS 2.
MOVE v1 TO v2.
WRITE v2.
Hope this helps.
BR,
Suhas
Similar Messages
-
Regarding round off the value in adf table
HI All,
My Requirement:
i have to round off the value after decimal in adf column before saving to data base.
Excample : 1234.67 = 1235
34567.89=34568
34567.34= 34567
i am using jdeveloper 11.1.1.3.0
Please can you give code using converter or any other strategy.
Thanks & Regards,
Madhu1. First of all you asked for rounding off, taking the integer part is not rounding off.
2. As per the documentation
integerOnly boolean Yes Flag specifying whether only the integer part of the value will be formatted and parsed. Default value is false.if i can understand correctly pertains to formatting only.
3. You can create a custom faces converter and add it to faces config.xml http://docs.oracle.com/javaee/1.4/tutorial/doc/JSFDevelop4.html . So that you do not have to write it in code.
4. If only integer is to be allowed why don't you change the data type to long or int instead of number -
Hi All,
I have a requirement where the values should be rounded off. This is based on the currency key and Curreny Decimals i.e. For EUR - 2 decimals.
Now i have value i.e. 389.78 which in turn should be rounded to 390. I used CEIL Function it is worked and rounded to 390. But in other cases i.e. 389.01, it is getting rounded to 390. As per arithmetic, if the value is greater than 5, then the rounding should be done.
Could you please clarify on this.
Looking forward for your quick response on this.
Thanks for your cooperation.
Regards,
Dinesh.Hi All,
This is the code where my values are passed into another work area.
For example. if the curreny key is "CLP" the values is 389.7800. it should be rounded off to 390. In case if it is 389.01, it should be rounded off or not. Actual it should not be as per arthimetic. Please give me ur suggestion which function i can use. I used CEIL but it considers for all roundings. Code which i used to place.
WRITE wa_final_process1-total TO wa_final_mag-p_amount
CURRENCY p_curr DECIMALS p_decip
LEFT-JUSTIFIED NO-GROUPING NO-SIGN.
Looking for ur response.
Thank you.
regards,
Dinesh -
How to avoid round of the value in mapping
Hi!
I am trying to pass in mapping value 999999.999, but XI rounds it to 1000000.
How can I avoid this?
I tried to change types of field in Data Type: string, float, same problem.
Any help appreciated.Hi,
try using this function in message mapping
FormatNum
Converts I according to a pattern that you define using the function properties. The possible patterns are the same as in the Java class java.text.DecimalFormat.
Regards,
Kai -
Double value truncated to two decimal places without rounding the value.
I want to truncate double value to two decimal places without doing the rounding of the value.
Is there any method which can directly do the truncation.There's many ways to achieve this such as using
BigDecimal's setScale method or type-casting. This is
the way I like to do it:double d = -5.239;
d = d > 0 ? Math.floor(d * 100) / 100.0 : Math.ceil(d
* 100) / 100.0;
Your division by 100 may cause an rounding error, because there are numbers which no finite binary representation. That's splitting hairs! I know ;-) -
Formatting amount to 2 decimal places without rounding the value
Hi
My requirement is to format the amount field, when I am using the simple type and setting the format as ###,##0.00 then it is rounding off the value. Foe example say the amount is 3,567.236 in this case it rounds it off to 3,567.24 which I do not want we want the value to display as 3,567.23. Does anyone have any idea how this can be achieved.
Thank you
Regards,
PreetUse the following :
BigDecimal bigDecimalh = new BigDecimal("22.335642");
bigDecimalh = bigDecimalh.setScale(2, BigDecimal.ROUND_DOWN);
Regards,
Himanshu -
Rounding up off values using Different Condition types
Dear All,
There is a requirement from the client where they want to round up the values in all the condition type values.For Example:
ZPR0- 1525
ZCOM(15%)- 228.75(It Should be 229.00)
NBT(Tax2%) 25.93(It Should be 26)
Similarly all the values for the condition should be calculated as the above mentioned scenario .Kindly suggest
Thank You!
Chakradhara1.In V/06 goto the respective conditions type and in rounding rule field maintain A
2.goto pricing procdure in v/08 in calculation type field maintain routine 17 against the condition type s
3.in OB90 maintain 100( rounding unit) against your company code then check the results.
Thanks
Srinu. -
Round the value in different ways
hi all,
I have a column of number datatype and values are
column_number
10923
1253
4326
2003
501
But i want the values should be rounded like this
column_number
11000
1300
4400
2100
600
I want a query for any precision value(as here -2).
Thanks
sanjayselect n, ceil(n/100)*100 r from
( select 10923 as n from dual union all
select 1253 as n from dual union all
select 4326 as n from dual union all
select 2003 as n from dual union all
select 501 as n from dual)
N R
10923 11000
1253 1300
4326 4400
2003 2100
501 600 Flavio
http://oraclequirks.blogspot.com -
SQL for rounding to the nearest value
Hi All,
My Oracle DB version is 10g Release2 and also 11gR1
I have data like below, I need to write a SQL for the below requirement.
ID RANGE_LOW RANGE_HIGH
1 50 55
2 55 60
3 60 63
4 63 77
5 77 84 The requirement is like I need to check a value between the above range low and high then round it to the nearest value.
Say, for example if I have 68 then the value is rounded to 63 else if 74 then 77 else if its in the middle of two values (70) then rounded to the highest value, here its 77.
Please advice.Ashu_Neo wrote:
hi Purvesh,
I think , you didn't check it properly with requirement of posting. Your query needs to be changed a bit. Please verify againYes, I probably missed or overlooked the last line.
Here is the updated solution then:
with data as
select 1 id, 50 low, 55 high from dual union all
select 2, 55, 60 from dual union all
select 3, 60, 63 from dual union all
select 4, 63, 77 from dual union all
select 5, 77, 84 from dual
chk_val as
select &val val from dual
select id, low, high,
val input_value,
case
when val < (low + high)/2
then low
else
high
end round_value
from data, chk_val
where val between low and high;
ID LOW HIGH INPUT_VALUE ROUND_VALUE
4 63 77 70 77 -
Want to round the value can any body suggest
hai all
i want to round the value and store it in on variable
eg:12334.789 as to 123345 it should be stored in some variable
suggest me please
thanks in advance
sinduHi,
You can Use either
FLOOR : Largest integer value that is not greater than 12334.789
or
CEIL: Smallest integer value that is not less than 12334.789
or
TRUNC :Interger part of 12334.789
Eg:
DATA: I TYPE I,
X TYPE P VALUE '12334.789 '.
I = FLOOR( X ). output- 12334
I = CEIL( X ). output- 12335
I = TRUNC( X ). output: 12334
regards
Rakesh -
Hi all
i want to take the values before the .
Is there any F.M?
I declared a variable like currency
Eg: Value is 22,000.74
My output will be 22,000Define a variable that have no Decimals places. Ex:
data : sample type p ."decimals 0.
move '15256.256' to sample.
"sample has value 15256
if you want to use character type. u can
data : index type i.
data : sample type c value '15,256.256'.
data : begin of splitter occurs 0,
word(20),
end of splitter.
split sample at '.' into table splitter.
describe table splitter lines index.
clear sample.
loop at splitter from 1 to index.
concatenate sample splitter-word into sample.
endloop.
condense sample no-gaps.
ibrahim -
Sum the values of a text field in a tabular form using JavaScript
Hi Folks.
OK, I put my hands up. I don't know Java script but I'm picking up the basics and I WANT to learn.
Here's my situation.
I have a tabular form which has lots of Standard Report Columns and ONE text field.
I want to sum the values entered in the text field, real time, using Java Script without the need to have a round trip to the database.
I'm guessing this will involve some kind of loop. Once I have that SUM figure I will store it in a hidden item and it will be used for validation when the user submits the form.
If anyone can give me a simple Java Script to do this, or point me in the direction of one, I'd be very grateful.
Many thanks.
Dogfighter.Hi Arie.
Thanks for the link.
That's a great start,
What I've got working so far is the following...
<script type="text/javascript">
function f_calculate_delta(p_this,p_rownum)
var amt = $x(p_this).value;
alert (amt);
var display_item_to_set = 'f08_'+ p_rownum
$x(display_item_to_set).innerHTML = amt
</script>
This is working fine.
Where I'm stuck at the moment is how I can 'get' the value of another cell in the same row. They have all been set up using the APEX_ITEM API with their own unique IDs.
I will continue looking but if you could give me a steer, that would be great.
Many thanks
Simon
PS. APEX 3.1
PPS. Trying to get the value of another row using...
var display_item_to_get = 'f04_'+ p_rownum
var expected_amt = $x(display_item_to_get).value
PPPS. Also tried...
var display_item_to_get = 'f04_'+ p_rownum
var expected_amt = $v(display_item_to_get)
and
var display_item_to_get = 'f04_'+ p_rownum
var expected_amt = $v(display_item_to_get).value
None of which are working at the moment.
Message was edited by:
Dogfighter -
Need some help in Rounding a double value to a whole number
Hey Peeps,
Need some help here, I got a method that returns a value in double after a series of calculation.
I need to know how can I round the double value, so for example,
1. if the value is 62222.22222222, it rounds to 62222 and
2. if the value is 15555.555555, it rounds to 15556
How can i do this
ZubHi Keerthi- Try this...
1. if the value is 62222.22222222, it rounds to 62222 and
double d = 62222.22222222;long l = (int)Math.round(d * 100); // truncatesd = l / 100.0;
double d = 62222.22222222;
System.out.println(d);
long l = (int)Math.round(d * 100);
// truncatesSystem.out.println(l);
d = l / 100.0;System.out.println(d);
for (int i = 0; i < 1000; i++)
{ d -= 0.1;}
for (int i = 0; i < 1000; i++)
{ d += 0.1;}System.out.println(d);
regards- Julie Bunavicz
Output:
62222.22222222
62222
62222.22
62222.22000000000001 -
Excel import rounding up decimal values
In my excel file I have a column that contains dollars and cents (e.g. 49.95). When I run the import the values in this column are rounded up to the next integer (e.g. 49.95 is rounded up to 50). Is this a bug or am I doing something wrong?
Thanks,
PeterHi All,
I have already migrated lakhs of records and I am facing the same problem for decimal value migration. Shall I know whether anyone has fixed this problem? Is there any other free tool for SQL Server to ORACLE migration? Please do guide me as soon as possible.
Thanks,
Srinivasan.T -
Dear Gurus,
What needs to be done to round off the excise condition values before it hits accounts.
Thanks
nitshi,
In pricing procedure maintain calculation type as per requirement ie 16 (Rounding the total
) or 17
Maybe you are looking for
-
Billing doc number and the accounting FI doc not matching
Dear All, We have created the same Number range for the Billing Document and for the Accounting Document. But when my Billling document get stuck for any Account determination error. ( Billing Document number is cretaed) But the Accounting Document i
-
How to enter Non-Stock P.O. ???
Hi Gurus, I want to enter P.O. (T.code ME21N) with out material number, i.e. non-stock P.O. eg. Only for Freight or transpot cost etc. Please give me detail procedure which filed to enter for T.code ME21N and if possible how to enter invoice for non-
-
Hi all i have 1 doubt, what is PGP documents. in cFolders Administration tab under Encryption there is an option of PGP support. can anyojne tell me what is this? Niranjan
-
How do I type symbols on e-mails or Facebook, Word Pad?
Like degrees, hearts, clovers, smiley faces, etc. I see other people have typed them, and there used to be Symbol typeface sets at key combo "Ctrl + W" inside of Word Perfect. I have Windows 7 now & use Mozilla Firefox 90% of the time, and Internet E
-
Discoverer V5 EUL Business Area to Multiple EULs
Hi, I have an EUL DISC3 which has V5 EUL Business Area & workbooks installed. There is an old EUL DISC_ADMIN which we are keeping aroud for some reason. Now we want to use these EUL5 Workbooks to create workbooks against DISC_ADMIN EUL. How can I do