Trailing zeroes after the decimal
I have a program that I have to do maintenance. One of the complaints is that a "rate" field is showing the trailing zeroes. The data type is 10.6 DEC. It was embedded in screen painter. Is there something I can do to change the output to suppress trailing zeroes. If the rate is 1.24, it shows it as 1.240000.
Thanks for your input.
Steve
Hi,
You can do like this
DATA:
lv_decimal TYPE f DECIMALS 6,
lv_string TYPE string.
lv_decimal = '1.240000'.
WRITE lv_decimal TO lv_string.
SHIFT lv_string RIGHT DELETING TRAILING '0'.
CONDENSE lv_string NO-GAPS.
write: lv_string.
Regards,
Satish
Similar Messages
-
How to delete trailing zeros after the decimal point in the ALV sum
Hello Expert,
In my alv output, I need to sum up one column, but in the sum result, I don't want to display zeros after the decimal point.
for example,
If the sum is 134.00, I only want to display 134 on the alv.
Does any expert have idea about it?
Thanks in advance,
best regards, JohnnyHi ,
Use following
SHIFT variable RIGHT/LEFT DELETING TRAILING '0'.
For more variations ,
just write SHIFT and press f4 , it will show you the information you need.
Hope this is helpful,
Regards,
Uma Dave -
Removing zeros after the decimal point Reply with quote
I want to remove the zeros after the decimal point, that this be done?
Например, Example,
120.000 => 120 120.000 => 120
120.300 => 120.3 120,300 => 120.3hiiiiiiii sweetsoni,
try this may it helpful for you
SHIFT string RIGHT DELETING TRAILING '0'.
SHIFT string RIGHT DELETING TRAILING '.'.
for example
DATA: v1 (6) TYPE c VALUE '100 .000 ',
v2(6) TYPE c VALUE '100.200'.
SHIFT v1 RIGHT DELETING TRAILING '0'.
SHIFT v1 RIGHT DELETING TRAILING '.'.
SHIFT v2 RIGHT DELETING TRAILING '0'.
SHIFT v2 RIGHT DELETING TRAILING '.'.
ultimately
v1 = '100',
v2 = '100.2'.
Moderator message: question and answer copied from external source, points deducted, do not repeat!
Edited by: Thomas Zloch on May 19, 2010 2:14 PM -
Numeric attribute output truncates trailing 0 after the decimal
Hi Experts,
We are having numeric attributes displayed on the question screens. When we enter the value as for example 7.40 and submit the form, in the decision report the value is shown as 7.4 and the trailing 0 is truncated. Is there any way we can avoid this truncation? We also tried with setting the unformatted checkbox for the numeric attribute in the properties file. This also did not help. It always truncates the trailing 0 after the decimal.
Thanks,
KKYou can specify the output format for number in the application.properties file, something like output-number-format = ###.00 might work. Using ###.00 instead of ###.## forces trailing zeros to be displayed, see Java DecimalFormat for more information.
-
How to elininate the Zeros after the decimal
Hi,
I columns in the scheduler table has BEGIN_DAY BEGIN_MONTH BEGIN_YEAR and the values are coming like 12.00, 11.00, 2009.00.
In the database there is no zeros after the decimal but when the tables are imported to OBIEE the see the zeros in the above columns. Is there any way to eliminate the zeros after the decimal points in the RPD.
Rgds,
AmitIt should not display zeroes if you set the column type to INT in Physical.. probably you might have forgotten to refresh the Server Metadata...
Other way you can give a try is - In Answers, go to Column Properties => Data Format and check 'Override Default Data Format' then choose 'Decimal Places' to '0'..
Note: this eliminates 0s only in this report.. -
How to cut the zeros after the decimal point ?
Hello everybody,
does anyone know a solution how to cut the zeros after the decimal point at at CHAR data field?
For example the field
&RM06P-PRMG1&
This is a char field in the database, so that the command
&RM06P-PRMG1(.0C)&
doesn't work.
At the moment the output on the form is like that
124,000
It shoud be like that
124
It would be great if anyone could help me!
TIA!
StrobbelHi Strobbel,
If you are working on standard sapscript, first make a zcopy of it, do the modifications in that and assign the new form to the output types in tcode NACE.
First you need to create a program to write the logic, so go to tcode SE38 , create a new program (say zremove_zero) with Program type Executable.
Now you will see ABAP Editor with statement;
Report zremove_zero.
Add the following lines below the report statement.
*& Form remove_zero
* text
* <--lv_AMT text
FORM remove_zero CHANGING lv_amt.
DATA p_amt TYPE p.
MOVE lv_amt TO p_amt.
MOVE p_amt TO lv_amt.
Condense lv_amt.
ENDFORM.
Now save and activate the program.
Now open the zcopy of your script and Just above the statement &RM06P-PRMG1& write the following lines;
/: perform remove_zero in program zremove_zero
/: changing &RM06P-PRMG1&
/: endperform.
Now you can see your amount printing without decimals.
Try and let me know, hope i have guided you clearly.
Regards
Karthik D
P.S.: I advice you to take help from an ABAPER. -
How to delete trailing zeros after decimal ?
Hi,
i want to delete trailing zeros after decimal.
Example:
if it is 22.000 then output will be 22
if it is 22.010 then output will be 22.01.
plz let me know hw to do this ?DATA:
lv_decimal TYPE f DECIMALS 3,
lv_string TYPE string.
lv_decimal = '22.010'.
WRITE lv_decimal TO lv_string.
SHIFT lv_string RIGHT DELETING TRAILING '0'.
CONDENSE lv_string NO-GAPS.
* now no trailing zeros are in the decimal stored in LV_STRING
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jan 30, 2008 12:10 PM -
How to remove trailing zeros from a decimal (type) value?
Hi Everyone,
I would like to 'drop' some trailing zeros from a decimal value, e.g.: 50.000000, and I am wondering how to go about this?
The value is definitely of decimal type, and in this instance I know that I want to eliminate exactly six (6) zeros.
Any help here will be greatly appreciated.
Kind Regards,
DavidTry the below:
This is sort of a display issue, you may do it at Application side, which would be efficient.
Declare @s Decimal(10,6)='50.0000000'
Select Cast(@s as decimal(10,0)) -
Make one number after the decimal point
hi all
i have a column named quantity from the table job_done
with values
1900.8988
34.67
0.6788
236.67
789999.67676868
i require the values to be 1900.8
34.6
0.6
236.6
789999.6
i just require one number after the decimal point,i know substr but i am confused as to how to achieve this output
kindly guide
thanking in advancehttp://docs.oracle.com/cd/E11882_01/server.112/e26088/functions221.htm#SQLRF06150
Regards
Etbin
Edited by: Etbin on 5.5.2013 14:33
<tt>substr(quantity,1,instr(quantity,'.') + 1)</tt> if those are not numbers but all contain a decimal point
Edited by: Etbin on 5.5.2013 14:40
<tt>case instr(quantity,'.') when 0 then quantity else substr(quantity,1,instr(quantity,'.') + 1) end</tt> when there are no <tt>null</tt> values
<tt>trunc(to_number(quantity),1)</tt> seems to be the safest if quantities are really <tt>to_char(some_number)</tt> -
Limit the number of digits after the decimal point
hi,
in webform how to limit the number of digits after the decimal point?
thanksHi,
In the Web form Design menu there is a tab for Other Options wherein you would find the setting for number of Decimal places.
Thanks.
Madhavi -
How can i retain the trailing zeroes after decimal
how can i retain the trailling zeros after decimal?
values are showing in table like( 4.50,5.00) but i am trying to do some processing with these values then ithe zeroes are truncated like (4.5,5),
how can i get values with zeroesIf the values in the table have trailing zeroes, it's a character type column.
Once you perform operations on them, they're implicitely converted to the number type, hence "losing" trailing zeroes.
To get the trailing zeroes back, you have to convert them back to character data:
TO_CHAR(1.5*3, '90d99')Have fun,
K. -
ADF 10g: AM pool dropped to zero after the jbo.ampool.timetolive is reached
Hi,
JDev: 10.1.3.2.0.4066
I have a problem where all appModules in the application module pool are removed when the jbo.ampool.timetolive threshold is reached, even the currently referenced ones. This causing serious performance issues in our application. I have seen reports from Steve Muench on his blog (http://radio-weblogs.com/0118231/2006/03/30.html) that this issue can happen under certain circumstances but the link is broken, so am not sure what the reason is. Does anyone have a link to where this was moved to? Steve also has added (Disabling jbo.ampool.timetolive on this forum of how to "disabled the time to live consideration" but the timetolive is still removing all the appModules in the pool. Why is the pool being completely wiped out after the timetolive?
Here is the BC4J configuration that is being used:
NB:
* web session timeout is 45 minutes
* I am using a JDBC pool as well
<AppModuleConfig name="Oracle">
<DeployPlatform>LOCAL</DeployPlatform>
<JDBCName>cvclaims_Oracle</JDBCName>
<jbo.TypeMapEntries>Java</jbo.TypeMapEntries>
<jbo.project>Model</jbo.project>
<AppModuleJndiName>my.adf.root.RootAppModule</AppModuleJndiName>
<java.naming.factory.initial>oracle.jbo.common.JboInitialContextFactory</java.naming.factory.initial>
<ApplicationName>my.adf.root.RootAppModule</ApplicationName>
<jbo.locking.mode>optimistic</jbo.locking.mode>
<jbo.ampool.initpoolsize>50</jbo.ampool.initpoolsize>
<jbo.ampool.maxpoolsize>100</jbo.ampool.maxpoolsize>
<jbo.recyclethreshold>50</jbo.recyclethreshold>
<jbo.ampool.maxavailablesize>50</jbo.ampool.maxavailablesize>
<jbo.ampool.minavailablesize>50</jbo.ampool.minavailablesize>
<jbo.poolmaxavailablesize>51</jbo.poolmaxavailablesize>
<jbo.maxpoolsize>51</jbo.maxpoolsize>
<jbo.initpoolsize>51</jbo.initpoolsize>
<jbo.poolminavailablesize>51</jbo.poolminavailablesize>
<jbo.ampool.maxinactiveage>2760000</jbo.ampool.maxinactiveage>
<jbo.ampool.monitorsleepinterval>60000</jbo.ampool.monitorsleepinterval>
<jbo.ampool.timetolive>2850000</jbo.ampool.timetolive>
</AppModuleConfig> Here is the code that logs out a user:
// Check whether the URL is the LOGOUT URL
if (requestURL.endsWith(logoutUrl)) {
// Log out, invalidate the session.
// Tried the patch mentioned in this thread with no change:
// ADF BC/ Faces - Logout exception
// This linked blog reports that the below ADFContext
// addition fixed it:
// http://vgoldin.blogspot.com/2007/02/adf-invalidating-web-session-in-apache.html
// but there may be more than one problem here.
// Others have suggested just wrapping the invalidate code
// in try/catch.
// Trying both here.
try {
ADFContext.getCurrent().removeScope(ADFContext.SESSION_SCOPE);
} catch (Exception e) {
e.printStackTrace();
try {
session.invalidate();
} catch (Exception e) {
e.printStackTrace();
MDC.remove(MDC_USERNAME);
if (!logoutDestinationUrlChecked && logoutDestinationUrl.startsWith("/")) {
logoutDestinationUrlChecked = true;
logoutDestinationUrl = request.getContextPath() + logoutDestinationUrl;
// relative path, prefix with request context path;
log.debug("Session is invalidated, redirecting to " + logoutDestinationUrl);
// we do redirect instead of forward so that this filter
// will be visisted again for the requested logout
// destination
// forcing a new login when applicable.
response.sendRedirect(response.encodeRedirectURL(logoutDestinationUrl)); DumpPoolStatistics.jsp page output
This page is explained in Steve Muench's blog
head:Application module lifetime statistics
Number of application module creations,3208
Number of application module removals,3184
head:State management statistics
Number of transactional state activations,2073
Number of transactional state passivations,2873
head:Application pool use statistics
Number of application pool check outs,193821
Number of application pool check ins,193818
Number of referenced application modules that were reused,183071
Number of referenced application modules that were recycled,0
Number of unreferenced application modules that were recycled,7594
Number of application pool check out failures,8
head:Application module statistics
Total number of application modules in the pool,24
Maximum number of application modules in the pool,50
Average number of application modules in the pool,23
Total number of available application modules in the pool,21
Average number of available application modules in the pool,21
Average number of unavailable application modules in the pool,2
Total number of referenced application modules in the pool,24
head:Application module age statistics
Number of referenced instances unused for >10 min,7
Number of referenced instances unused for >5 min,2
Number of referenced instances unused for >1 min,6
Number of referenced instances used during last 1 min,9
Number of instances unused for >10 min,0
Number of instances unused for >5 min,0
Number of instances unused for >1 min,0
Number of instances used during last 1 min,0
head:Session statistics
Number of sessions registered with the pool,32
Average number of sessions referencing transactional state,427
head:Session age statistics
Number of sessions inactive for >10 min,14
Number of sessions inactive for >5 min,2
Number of sessions inactive for >1 min,7
Number of sessions active during last 1 min,9 The above DumpPoolStatistics page shows the AM pool shortly after the timetolive has kicked in. There is 24 app modules in the pool despite the jbo.ampool.minavailablesize being 50. There is also 32 users in the application so I would of expected there to be a corresponding number of appModules.
Thanks
Barry
Edited by: Bar on Mar 9, 2011 5:18 PM
Edited by: Bar on Mar 9, 2011 5:20 PMI believe my problem is that the jbo.ampool.minavailablesize is higher than the normal load on the system. This is stopping app modules to be removed once the jbo.ampool.maxinactiveage time is reached, therefore the only time an AM is removed is when the jbo.ampool.timetolive limit is reached.
e.g.
* 35 users log into the application in the morning. The AM pool contains 35 AM's
* GC on the pool happens. If an AM has reached the jbo.ampool.maxinactiveage then they will not be removed because it would mean that the pool (currently 35) drops below the jbo.ampool.minavailablesize (50)
* GC happens again and the jbo.ampool.timetolive threshold is now reached on all AM's so they are all removed from the pool. -
Number field does not display trailing zero after decimal
Hi,
I have a Text Item of type number with size set to 6.
if the database value = 19.10, the
number field displays 19.1
I want to display the complete 19.10 in the field.
How do I do it?SET FORMAT MASK property of text item to 990D00.
If the value is just "10" ie without decimal, displayed will be "10.00". -
Hi,
I have a requirement to concat 2 columns ( 1st column is a text column and 2nd column is a numeric column set as double in RPD). For the 2nd column, user wants to see 3 decimal digits all the time.
For example, if the value is 2.4567 then I need to show round off value 2.457 and if the value if 3.4 , then I need to show 3.400 and if the value is 4 then I need add decimal point and show 4.000.
Please let me know how I can achieve using OBIEE application without having to go through RPD.
Thanks
Swarna
Edited by: 934460 on May 15, 2012 12:48 PMTry the following:
In this example:
Column 1: Month Name
Column 2: Revenue
Column 3: Month - Revenue
Formula for Month - Revenue column will be:
Month Name ||' - '|| cast(round(Revenue, 3) as char)Hope it helps.
Regards,
Kalyan Chukkapalli
http://123obi.com -
More than 4 places after the decimal for the slope of line equation?
Hello
I'm doing some graphing for chemistry class and I'm trying to find where in Numbers I can change the preference for the trendline equation.(y=mx+b) Currently m is only showing up to 0.xxxx . I need it to show at least 7 or 8 places. Or even better, is there a preference to set it to show x amount of significant figures?
Much thanks,
RyanNo preference that I am aware of. You can calculate the intercept and slope yourself using INTERCEPT and SLOPE functions, create a one-celled table with a formula that makes a string for y=mx+b, and place that one-cell table on top of the chart.
If Table 1 cell B2 has the slope and C2 has the intercept, the one-cell new table formula would be
="="&Table 1::B2&"x+"&Table 1::C2
The string will have the same number of decimal places as what it finds in B2 and C2.
Maybe you are looking for
-
Error in configuring soap adapter
Hai! Iam working with rfc to webservice scenario. In that while configuring the soap adapter, the following errors have occured. SOAP: failed to sign the message due to java.security.PrivilegedActionException: com.sap.aii.af.security.impl.exception.M
-
Safari.exe - corrupt file
After I open safari I keep getting a message that says: Safari.exe - Corrupt File This file or directory C:\Documents and settings\Owner\Application Data\Apple Computer\Safari\LastSession.plist is corrupt and unreadable. Please rune the Chkdsk utilit
-
Default time for new event is always 15 min b4...
I think Ical is great and i use it daily to help me with my biz to stay on top of calls i need to make. I am constantly adding new events and i always want my new events to open with a default time of "0" rather than "15 minutes before". It is very t
-
i downloaded a movie to my phone and after viewing it I dont know how to erase it as it is using up a lot of memory. I'd appreciate suggestions
-
After 10.5.8 update NeoOffice hangs at startup
Hi there, After the installation of 10.5.8 NeoOffice will not start. In the console I see the following : 8/8/09 11:09:54 AM soffice.bin[221] Apple AWT Startup Exception : * -[NSCFArray insertObject:atIndex:]: attempt to insert nil 8/8/09 11:09:54 AM