Displaying 3 decimal places?
Hi,
I have a bespoke program which picks up lines from bsis and displays them on a screen, the user then selects a few lines and the program posts them using program RFBIBL00.
Currently this program is working perfectly but I have a few countries which work with 3 decimal places instead of 2 and the program isn't picking this up.
I've found that table TCURX holds currencies which have 3 decimal places but I want to know how I change all my internal tables and screen fields to suddenly have 3 decimal places instead of 2? My internal tables and screen fields are all based on fields from BSIS and I have ALV grids and individual screen fields. Do I need to duplicate all of the amount fields, one set to have 2 decimal places and the other to have 3?
Any suggestions welcome.
Gill
OK, I've figured this out.
If you define your screen fields (on the screen not in your data declarations) as CURR not DEC as mine were then you can put in a field as a reference. I defined a new field (not a screen one) which held the currency for the screen. If I define all my currency amount fields with 3 decimal places but refer them all to the currency field then they appear as 2 or 3 decimals places depending on the currency.
Thanks for all your suggestions, they got me thinking on the right track.
Similar Messages
-
I wonder if anyone can help.
I am trying to set oracle up to always display the decimal numbers according to the scale. So if the number was set up as 8,2 and 150 was held in a field, 150.00 would be displayed.
Is the a setting for this, how would I set it?
Thanks
KevThe problem is neatly illustrated by your example. You want to set the default format for "all number types with a decimal place". But your example shows a rendering of 150 as 150.00.
All numbers have an implicit decimal point. With integers the default to suppress the decimal point, because the zeroes are not significant. Of course, the zeroes are significant when, for example, the figure represents a monetary sum.
So the nub of the problem is, when do you want to render 150 as 150.00 and when do you want to render it as 150? That is a business rule and the Oracle database cannot implement it.
Regards, APC -
Increase decimal Places in SAP B1
Dear Experts,
(Using SAP B1 PL 49)
I am trying to change the Decimal places in the General Settings->Display (Decimal Places), from 2 to 6 to in all the fields.
When i try to update it gives me the following error:-
"Cannot update while another user is connected to the company"
Any help will be appreciated.
Regards,
FerozDear Asif,
Thank you for the information.
I logged all the users out from the SAP server and i stopped the SQL services and then re-started the SQL services again.
I logged into SAP b1, but was getting the same error message.
I removed the network cable of the server and I restarted the SAP server and then logged into SAP and tried to change the decimal places, but was still getting the same error message.
I'm all out of ideas, this has never happened before to me.
regards,
Feroz. -
Formatting decimal places in scatter charts???
I set up rather simple X-Y chart with numbers that have about 5 significant decimal places. All 5 numbers show up in the X chart axis labels. I can't find any way to tell Numbers to use only two decimal places in the chart labels. Does anyone know how to do this? I tried changed the displayed decimal places in the original cells but it doens't effect the charts.
TIAThanks Brad for you quick response.
It kind of worked... I think I might have something else going on. Not sure what though.
With the changes made in the script you suggested, the X-Axis has changed to two digits but now it displays " 1.dd "
Any thoughts where else I might have gone wrong?
Thanks again
SJD
Attachments:
2013-03-13_151027.JPG 12 KB -
DIsplaying WRBTR (AMOUNT FIELD)WITHOUT DECIMAL PLACES
Dear all,
I am facing a problem in displaying amount field in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
How can I do it in a alv report if I have only one output amount field?
thanks
Ranjan.Hi chittaramjan,
1. use this kind of funda (just copy paste in new program)
Important things
a) one extra field in internal table
declared in the same exact fashion
waers LIKE tcurc-waers,
b) Populate this field
c) REST THE System will take care
(based upon country settings)
2.
REPORT abc.
TYPE-POOLS : slis.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : BEGIN OF itab OCCURS 0,
f1 LIKE P0008-BET01,
waers LIKE tcurc-waers,
END OF itab.
START-OF-SELECTION.
itab-f1 = '-4.15'.
itab-waers = 'KRW'.
APPEND itab.
itab-f1 = '4.68'.
itab-waers = 'GBP'.
APPEND itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = alvfc
TABLES
t_outtab = itab
EXCEPTIONS
OTHERS = 2.
regards,
amit m -
PO print preview displays incorrect setting in decimal places
Dear Experts
Please help me on the following condition.
I have a problem in print preview of a PO. It displays the incorrect setting for decimal place in currency.
It shows USD 1.404,00 whereby the amount should be USD 1,404.00
This only happens to a certain vendor that is doing PO for the first time from that country
Example:
I'm creating a PO for vendor 123. Vendor 123 is located in country A. No PO has been created for any
vendor in country A before. When I saved my PO, in print preview, the decimal setting is not correct.
But when I'm creating another PO, for vendor 234. Vendor 234 is located in country B. There have been
several POs created for vendors in country B before. When I saved my PO, in print preview, the decimal
setting is correct.
Both vendor 123 and vendor 234 is using currency of USD.
Is there any other setting with the vendor master in regard with the currency decimal setting for each
country for the vendor? Or something that I've missed out?
Diagnosis:
I've checked with the user profiles->default-> decimal notation. It displays 1,234,567.89 correctly
I've also run OY04, but the decimal setting is correct.
Thank you
Regards
Syukrithis has nothing to do with print preview, it is just basic country setting (OY01) how a quantity and value is written on a PO to a vendor is country xyz.
German uses to comma to seperate decimals, while USA uses the point to seperate decimals
this would be the German version 1.404,00, and this the US version:: 1,404.00
so if an American sends a PO to a German vendor, then the document will show 1.404,00 so that the German can understand that he wants 1404. (and not 1000 times less) -
Display amount in ALV Grid with different Decimal Places based on Currency
HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65
i need to display values like AED : 22.56HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
i need to display values like AED : 22.56
KWD---22.565 but here field is NETWR with 2 decimal.
Need to Display amount in ALV Grid with different Decimal Places based on Currency
Regards,
Dileep Kumar Reddy -
Issue with display of decimal places
Hi,
In our custom built components we are facing a strange issue with the display decimals where the data type of an element is "QUAN - Quantity field, points to a unit field with format UNIT".
If the element has a value of 3000.000 KG the value is displayed as 3000. Where as for an element which has a value 3000.123 KG the same is displayed as it is with the decimals. We tried to resolve the issue by using Text editor or Input field as read only but in vain. The display property in the context are set to default.
If we change the element data type reference to "Dec - Counter or amount field with Comma and Sign" then all the values are displayed with the decimal places even if decimals are zero.
As a result we are facing alignment issues for the various quantity related elements displayed on the screen. To change the underlying data type of the element is a not a solution for us as the data type quan is required for conversion from one unit to another unit.
Can someone please advise how we could resolve this issue. We are on NW 7.0 + EHP4 + NW 7.01 SP4, kernel patch level 55 for 7.01
Regards
Rohit ChowdharyJameel, Thanks for the answer but this is a not a solution for us. We have around 40-50 webdynpro components and with mutliple views referring to this data element / domain combination. More so the context are bound to database tables / structures .
I hope to get a reply from Thomas on possible solution for this. I am not sure if I can open an support ticket for this issue.
Rohit Chowdhary -
Number with more than 10 decimal places display as 0 in report
We have a number stored on a table as this long with several decimal values.
2440.159999999999854480847716331481933593
On one PC it display in a Crystal report as 0 and to another user it displays at the 2440. The report formats the display field with 0 decimal places.
Is there a max precision setting at the database level that is causing this?
It seems I can add an SQL express as follows:
Round ("ORDER_RELEASE"."TOTAL_WEIGHT", 2) to resolve the issue but cannot determine could be causing the differences in display among two different client PCs running the same report.Hello,
CR was built using C++ and therefore the max number is 15 digits plus 1 for the sign of the number.
Cause could be different runtime of MS C++ but hard to say for sure. I any event the only work around is to use Store Procedure and break the field into 2 parts. The in CR add a text object and drop the fields into it next to each other. For doing any calculations on them you'll also have to do that in the SP or handle each field manually.
Thank you
Don -
Displaying results with a decimal place of two. Forcing decimal place.
Hi there,
Im writing a simple calculation device.
You input one digit and press one of two buttons to multiply it by a certain number and then the result is displayed. The result is displyed hiding the result of the button you didn't press and visa versa.
I am having a problem displaying the result with a constant two decimal place.
I am using strings and thus don't know how to do this.
Here is my code:
import flash.events.MouseEvent;
//restrict the input textfield to only numbers
txtinput.restrict = "0-9";
//restrict the input textfield to only two characters
txtinput.maxChars = 6;
// event listeners
btnW.addEventListener(MouseEvent.CLICK, WHandler);
btnC.addEventListener(MouseEvent.CLICK, CHandler);
btnW.addEventListener(MouseEvent.CLICK, hideC);
btnC.addEventListener(MouseEvent.CLICK, hideW);
//functions
function WHandler (e:MouseEvent):void
//white calculation
var answerW:Number = Number(txtinput.text) * Number(0.90);
txtWResult.text = answerW.toString();
function CHandler (e:MouseEvent):void
//colour calculation
var answerC:Number = Number(txtinput.text) * Number(0.99);
txtCResult.text = answerC.toString();
function hideC (e:MouseEvent):void
//Hide colour result
txtCResult.visible = false;
txtWResult.visible = true;
function hideW (e:MouseEvent):void
//Hide white result
txtWResult.visible = false;
txtCResult.visible = true;
After having a look online I have found these two resources:
http://helpx.adobe.com/flash/kb/rounding-specific-decimal-places-flash.html
and
http://stackoverflow.com/questions/11469321/decimals-to-one-decimal-place-in-as3
But I am confused when combining these techniques with strings.
Any help would be greatly appreciated,
Thanks in advance
Mr BUse the toFixed() method of the Number class instead of the toString() method. The result of it is a String with the number of decimal places you specify.
var answerW:Number = Number(txtinput.text) * Number(0.90);
txtWResult.text = answerW.toFixed(2);
var answerC:Number = Number(txtinput.text) * Number(0.99);
txtCResult.text = answerC.toFixed(2); -
How to get the exact decimal places displayed while exporting to Excel?
Hi All,
I have a requirement to display the exact decimal place values in my report. In my pivot table, i duplicated a column named order number and converted to percentage by applying these conditions Show Data As-> Percent Of-> Column. I got a resultant column with one decimal point. As i needed two decimal points i took the xml of the report and changed the minDigits='2' and maxDigits='2' values like this. After that i got the accurate answer. But when i export it as excel sheet it is not showing the % column properly. The values after 0 is not getting displayed. Any solution for this?
Thanks in Advance
ThenmozhiHi Thenmozi,
You can try adding the below statement in the Custom CSS section of the your column properties.
mso-number-format:"\@"
Edit your report--> Criteria-->which column you want to display in excel click column properties --> select CCS--> Paste here above code.
Second way:
Edit your report --> criteria-->click fx option for your column and apply the below code.
2. '<span style="display:none"> </span>' || CAST(your column name AS CHAR)
Award points it is useful.
Thank,
Satya -
Quantity column display upto 2 decimal places in ALV
I've created an ALV for dynamic columns. For this i've first created the fieldcatalog and then the internal table.
The problem that i'm facing in this is that the user wants the quantity column to be displayed upto 2 decimals. For this i tried the following:
1.) wa_fldcat-decimals_o = '2'
wa_fldcat-decimals = '3'.
wa_fldcat-datatype = 'QUAN'.
with this i tried that let the calculation be to 3 decimal places but on output it should show 2 decimal places.
But this doesnot gets reflected on ALV. It still shows 3 decimal places.
eg: 3 decimal places: 16.667 + 16.667 + 66.667 = 100.001
2.) wa_fldcat-decimals_o = '2'
wa_fldcat-decimals = '2'.
wa_fldcat-datatype = 'CURR'.
I also tried doing the calculation with 2 decimal places with datatype CURR but with this the last digit gets rounded.
eg: 2 decimal places: 16.67 + 16.67 + 66.67 = 100.01
Now we are taking total as 100 %. So tha calculative total cannot be more than 100.
On seeing 100.001 user says show it to me to 2 decimal places i.e. 100.00
On seeing 100.01 user says how can the total be more than 100 & this is .01 more than 100.
Therefore how can the 1.) option be achieved.
PLZ HELP!Hi,
Can u check this one
DATA: gv_packed TYPE p DECIMALS 2.
CATCH SYSTEM-EXCEPTIONS conversion_errors = 6.
MOVE char_field TO gv_packed.
ENDCATCH.
IF sy-subrc = 6.
error handling
ENDIF
Try to move ur char field to a type p field. If char field is other than numeric then u will get error that can be handled in try...chatch..endtry block.
data: l_val type p decimals 2.
parameter my_val type char20.
try .
l_val = my_val.
catch cx_root.
Do ur error handling here
endtry.
you can work with search and concatenate.
value1 = 3601152
search value1 for '.' .
if sy-subrc eq 0.
concatenate value1(5) '.' value1(2)+5 into text.
Or value1 = value1 / 100.
endif.
Thanks.
Ashok. -
Decimal places display at the time of results recording
Dear All,
Please i faced one problem, At the time of results recoridngi/.e,
In my insp. plan i defined Quantitative specification as 70.0 with '1' decimal place in Qunatitative data. but after results recording it displaying one more decimal place excessi.e., as 70.00. How can i solve this problem, due to what this problem is occure. Please if any, solve its urgent.
Regards,
VijayaDear Vijaya,
While entering Inspection Characteristics.. There is a field called DecPlaces on the right. its the 24th field on the item table.
The field comes after
Method, Insp Method plant, Version, Sampling Procedure, Sample Unit of Measure, Base Sample Quantity, SPC Criterion, Modification Rule, Test Eqpmt, Test Equip Short Text, Par Sample, DecPlace, Unit of Measure, Target Value, Lower spec Lmt, Upper Spec Lmt... and so on...
Regards
Vijay -
Smart Forms - Set decimal places in display formatting
Hello,
i have a variable (quantity 15 field with 3 decimal places) which i want to print via smartforms.
sap help describes that you have to set (.<number>)
for example: &field(.2)& to do that.
this doesn t work at all.
Does anybody know how you can do that?
I would appreciate an answer, because that costs me already alot of time.
thanks alot!
JasminHi Jasmin,
We use this notation in a smartform to print weights and it works fine. Perhaps you should also mention the total numbers to display before the decimal?
We have used: &BRGEW(8.0)&
Regards,
John. -
Decimal places are not displayed in smartforms
Hi,
Iam having a quantity field which has length 13 and decimals 3. While debugging it has the value has decimal places but while displaying it does not have the decimal places. Only the whole number is displayed. Can anyone help how to rectify this one.Thanks...
Thanks,
Rose.Hi,
The format of a quatity field will be based on the associated unit of measure. Each unit of measure will have a number of decimal places (as defined in table T006 field DECAN) defined to match how the quantity is typically recorded (e.g. ST or 'each' has no decimal places as you could never have half and each).
Regards,
Nick -
BEx Analyzer displays wrong number of decimal places after implementing BW patch
Hey folks,
we patched our BW 7.31 from PL10 to PL15 last weekend and now we got some issue with the number of decimal places shown in BEx Analyzer 7.x.
One example for KF X
Settings Info Object X
Decimal Places: Not defined
RSRT - Display X
Shows 3 decimal places
Query Designer Settings using KF X
Number of Descimal Places: 0 [Use Default Settings: NO]
BEx Analyzer Properties for KF X
Decimal Places: 0
Resulting in BEx Analyzer workbook shows 3 decimal places instead of 0!
Anyone with an good idea about that?
Thanks,
AndreasHi Andreas,
Have you used the list calulation like "Calculate Result As Average" or "Calculate Single Values as normalization of result" in the relevant key figures?
For "Calculate Single Values as normalization of result",iIt is the known design that it is always displayed with three decimal places for normalized values, and the setting in Query Designer for
decimal place doesn't take effect.
For "Calculate Result As Average", the following note maybe relevant.
2096911 - Decimal places in query result is wrong, if average is used and display precision is set to less than 3, it will always show 3 decimal places.
Another clue is to check if the key figure is a Quantity type with unit, and what's defined in table
T006 field ANDEC for this unit.
Hope this helpful.
Regards,
Ceciclia
Maybe you are looking for
-
a message comes up when i plug in my iPod shuffle (version 1.0.2) and when i click to restore and update message comes up saying iPod could not be restored unknown error occurred (1430)
-
XML Mapping InfoPath to Excel Include metadata?
Grabbing an InfoPath form from a SharePoint Form Library (in the form of xml files) then dragging and dropping into Excel creates a nice XML map which paves the way for a neat Import. This doesn't bring over the metadata though - things like "Created
-
How to know that User having Authorizations to which Tcodes?
Hi, This is regarding Security. How can I Find that an User having the authorization to which transations? SUIM will show me the all transation where the user having authorizations. But my requirment is, say i will enter 10 T-Codes, then the pro
-
Not able to connect as sysoper in sql*plus
Friends, Why i am not able to connect as sysoper? OS: win 2000 Oracle db: oracle 9i tool is sql*plus SQL> connect / as sysdba Connected. SQL> show user USER is "SYS" SQL> connect / as sysoper ERROR: ORA-01031: insufficient privileges Warning: You are
-
Trouble with converting pdf to word
How long should it take to export a pdf file of 5.08 MB to word doc? I have been at this all morning?