Rounding of Keyfig value
Hi BW Gururs,
can you please tell me do we have any formula function which will give me rounding off values like if its 50.3 it should give me 50 and if its 50.9 it should give me 51.
I know we can do it at BEx level but i want to do it at Infoprovider level.
can any 1 please provide me with ABAP ocde for that
Thanks
Will assign full points
Hi,
Nick,
OK I just reread your post and have one comment: if you round your values at posting time you will generate an error since
SUM(rounded VAL) <> ROUNDED(SUM VAL).
If you can leave with this fact then ABAP should look like:
DATA: i TYPE I.
MOVE COMM_STRUCTURE-<yourfield> TO i.
"i = COMM_STRUCTURE-<yourfield> would also make it.
RESULT= i.
hope this helps...
Olivier.
Message was edited by:
Olivier Cora
Similar Messages
-
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 -
Rounding of a value to 2 decimal points.
Hi all,
I need to round off a value to 2 decimals.
For example:
A value 13.6789 should be rounded of to 13.67 and not 13.68Hi,
Thats Truncation not rounding, for data types P and F we cannot have sub field access,
so we cannot use offset, it leads to error results
and if we use
data : var type p decimals 2 they will be rounded hence
So, pass it to a character variable
and use write satement edition
example
data : var(7) type p decimals 4 value '13.6789 ' .
write / var.
data : var1(8) type c.
move var to var1.
write /(5) var1.
regards
prasanth -
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 up my values in DATA FORM
Hi
Is there any chance i could round up my values in data forms?
245.587 = 246
ThanksHave you had a look at the precision settings for a form - http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/frameset.htm?form_opt.html
Otherwise you could have a business rule that rounds the values using the @ROUND function - http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/round.html
Cheers
John
http://john-goodwin.blogspot.com/ -
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 -
Any function module to round of a value to two decimal places?
Hi gurus,
Any function module to round of a value to two decimal places?Hi,
you can use FM 'ROUND'.
Thanks. -
Rounding Off is not rounding the net value in Debit/Credit Memo
Dear Experts,
Please guide me in the below mentioned situation:
I have used "Rounding Off" i.e. DIFF condition type in the pricing procedure and it is giving the desired result. But when I am creating Credit/Debit Memo, the Rounding Off is taking that value which it has taken to round the total value in creating billing document. As a result in many cases, while creating Credit/Debit Memo the Rounding Off is not rounding the net value of the document.
Please guide me how to solve this problem.
With regards,
Jhelum Roy.Thank you sir for this information. this is really helpful.
Further
My requirement is to capture this rounding value also and show it in the print and carry to GL account. So that client can generate a report on this extra revenue by rounding values.
I ahve only condition type in my rpicing procedure as per my requirement. details maintained are below
condition typr: ZPPC
Mandatory: X
print : X
requirement : 2(Item with pricing)
cal type: 17 (Rounding as perT001R)
Acc Key: ERL
in the table T001R table the calue maintained for Co.Code is+currency is 5(so that system is alsays round up 5)
tha t means if the value is 26.03 then it will become 26.05. This is working fine. but how to capture this 0.02 seperatly and carry to gl accouns
Thanks you in advance
Kiran Musuku -
Round a double value to a specific number of decimal places?
Hello,
Is there standard java function which will round a double value to a specified number of decimal places? Something like:
double d = 4.34523;
d = round(d, 2);
where d is finally assigned the value of 4.34?
Thanks!
-exitsNo, because doubles hold values in binary (as do all values in a computer, of course, but there's no additional stuff to indicate decimal values).
If you want values with specific rounding rules in decimal, use java.math.BigDecimal.
If you just want to format the number with a specified number of decimal digits, use java.text.DecimalNumber. -
Rounding net book value - Depreciation calculated even 0%
Dear all,
I'm becoming crazy with ERP6.
We are upgrading our SAP from 4.7 to ERP6, EA-FIN is active.
Now if I look the asset explorer or whatever FI-AA reporting with the planned depreciation, I have a difference on the depreciation values, but only for lands ( Depreciation key 0000) - We have set "round net book value at the end of the year", but It seems that now, the system rounds the net book value, even if the depreciation key is 0% . (not the case in 4.7)
please advice
Thanks
natHi,
This has nothing to do with the depreciation key.
If you have flagged in tr. OAYO the following rounding specifications:
Ind: Round net book value
This indicator specifies that the net book value of an asset should be rounded to whole units of currency at the end of the fiscal year.
You specify the type of rounding in the same screen. ...."
.....the system makes this rounding.
But this was also the same in former releases.
regards Bernhard -
Hi all,
Is there a function module to round off the currency value to nearest 0.05 , ie. if the currency value is 10.63, it should be rounded off to 10.65 and when it is 10.68, it should be rounded off to 10.70?
If yes, could you please let me know?
Any help in this regard is appreciated.
Regards,
Partha.hi,
try this out.here is the sample program.
pl look into my modified program,
i am assuming your requirement is like
if the last digit in your value is < 5. it should be rounded to 5.
like 10.23 should come to 10.25
& if the last character value is > 5 , it should be rounded to next value with 0.
10.67 should be 10.70
10.98 should be 11.00.
with this assumption, i developed this small code. let me know, if i am wrong.
regards
srikanth
DATA : V_CURR TYPE VBAK-NETWR,
V_CHAR(10) TYPE C.
V_CURR = '10.67'.
WRITE V_CURR TO V_CHAR.
CONDENSE V_CHAR NO-GAPS.
DATA : V_STRLEN TYPE I.
BREAK-POINT.
V_STRLEN = STRLEN( V_CHAR ).
IF V_STRLEN <> 0 .
V_STRLEN = V_STRLEN - 1.
IF V_CHAR+V_STRLEN < '5'.
V_CHAR+V_STRLEN = '5'.
V_CURR = V_CHAR.
ELSE.
IF V_CHAR+V_STRLEN = '6'.
V_CURR = V_CURR + '0.04'.
ELSEIF V_CHAR+V_STRLEN = '7'.
V_CURR = V_CURR + '0.03'.
ELSEIF V_CHAR+V_STRLEN = '8'.
V_CURR = V_CURR + '0.02'.
ELSEIF V_CHAR+V_STRLEN = '9'.
V_CURR = V_CURR + '0.01'.
ENDIF.
ENDIF.
ENDIF.
write :/ v_curr,
v_char.
added modified code.
Message was edited by: Srikanth Kidambi -
hi all, is there any way in PLD to round down a value ?
there is only round function in formula.
thanks for every commentsHi Ivin,
Yes, Round Function only in formula on PLD.
any other related Function not in Formula on PLD.
for example,
DocTotal Field ID -> F_123 - 25412.76
Round(F_123,0)
Result(in print): 25413
Regards,
Madhan. -
Rounding xs:double value
Hi in bea xquery function pallette we only foung round() for decimal type.But we had a requirement to round xs:double values.
How can i achive this ,any method for round double values or to convert double to decimal.does round( $someDouble ) not work?
Can you please try a few things yourself before posting?
If you already have, can you please post what you have tried? -
How to round the fractional values in Abap webdynpro?
Hi Experts,
I have designed a screen in which I have a field called ANZHL(which is numberic field of infotype14) It is a fractional digits which needs to be rounded when it comes to display in my webdynpro application?
Here is my code .........
How to round the ANZHL field ?
**if start and end dates are changed then delete the old and insert the new else just mmodify the record
if ws_0014_temp-begda ne ws_edit-begda or ws_0014_temp-endda ne ws_edit-endda.
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0014'
number = wd_this->w_pernr
subtype = ws_0014_temp-subty
objectid = ws_0014_temp-objps
lockindicator = ws_0014_temp-sprps
validityend = ws_0014_temp-endda
validitybegin = ws_0014_temp-begda
recordnumber = ws_0014_temp-seqnr
record = ws_0014_temp
operation = 'DEL'
nocommit = 'X'
importing
return = w_bapireturn.
" key = w_bapireturn.
if w_bapireturn-type ca 'EA'.
r_bapireturn = w_bapireturn.
return.
endif.
ws_0014 = ws_0014_temp.
ws_0014-endda = ws_edit-endda.
ws_0014-begda = ws_edit-begda.
ws_0014-anzhl = ws_edit-anzhl.
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0014'
number = wd_this->w_pernr
subtype = ws_0014-subty
objectid = ws_0014-objps
lockindicator = ws_0014-sprps
validityend = ws_0014-endda
validitybegin = ws_0014-begda
recordnumber = ws_0014-seqnr
record = ws_0014
operation = 'INSS'
nocommit = 'X'
importing
return = w_bapireturn.
" key = w_bapireturn.
if w_bapireturn-type ca 'EA'.
r_bapireturn = w_bapireturn.
return.
endif.
else.
ws_0014 = ws_0014_temp.
ws_0014-anzhl = ws_edit-anzhl.
Edited by: Dharani us on Oct 8, 2009 10:15 AMHi,
For that attribute, you want to display the decimal values or what.
Regards,
Lekha. -
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
Maybe you are looking for
-
i create a new apple account but i dont have credit card.what should i do, i create a new apple account but i dont have credit card.what should i do
-
RAID Options-Which is better?
I'm about to place a hefty order with OWC for my new Mac Pro before it arrives. I use Aperture and keep the library on a different drive than my boot drive. I would like to set up a RAID 0 for maximum speed. I'm going to order 2 500GB Western Digital
-
VISACOM - Alloc Error using 488.2 USB-B Interface - too many open sessions
I have been having the following issue in my VB .NET RF-ATE application.... It usually happens when my program enters a measurement loop (I.E. searching for P1dB). It begins to solve for P1dB and performs about 15 cycles (sets power level on SigGen a
-
Rebate Agreement (VBOF)
Hello Experts, I have a standard Rebate Scenario. I have Rebate Agreement created for a recepient. I also have some invoices for the same. But when I check Invoices they are not updated with the Rebate Conditions. When I tried to run VBOF it did not
-
Pavilion p6130y: System crash (w/memory dump) when transferring files
Someone told me it's my nVIDIA card that is the problem but I wanted to post here to see what others say. I am running Windows 7 64-bit. When I transfer large photos (JPEG)/video (MOV) files and large amounts of those files from a flash memory card t