Custom thousand separator for decimal values.
Hello esperts,
I have a a WD app with a decimal context attribute, I have already a Simple Type that formats the decimal so the thousand separator is a coma (,) and the decimal separator is the dot (.)
I want to know if it is possible to change the thousand separator to dot and the decimal separator to comma without changing the user's language. Or even use whatever character I want to be the thousand separator e.g. @ | ¬ whithout changing the data type (decimal).
Thanx in advance.
JV
Hi Siarhei,
I dont want to use calculated fields, nor strings because I need the values of the decimal attribute. I will be desplaying these decimal values through a table and sorting functionality is a must. So as you should know, if I have 1, 2, 3, 20 and 100 and convert them to string, on sort it will be incorrect because of string sorting ( 1, 100, 2, 20 and 3).
Basically my requirement is to be able to change the decimal presentation without changing the user's locale or language. I don't know if that's possible.
Say, I select an option on my application that says "comma separated thousands", the decimal values will be presented this way ###,###,###,###.00 or when the user selects the option "dot separated thousands", the decimal values will be presented like this ###.###.###.###,00. I already tried to format the last reprersentation but I get java.lang.IllegalArgumentException: Malformed pattern. I have already checked the DecimalFormat API, so I know the pattern is incorrect, still I'm looking if by chance I'm forgeting something else to do in order the application to work as I spect.
Thanks!
JV
Similar Messages
-
Leading Zeros for Decimal values
Hi,
In my requirement i need to add leading zeros for Decimal values.
For Example.
If the value is = 0.00 then my Target value should be = 000000000000.00
Regards,
Anil.Hi Anil,
You have to use conversion exit ,
Kindly go through this link below:
Re: Conversion exit: numbers in database, two decimals on screen
Hope it helps
Regards
Mansi -
How to get the leading zeros for decimal values?
Hi,
How i wil get the leading zeros for decimal values.For CONVERSION_EXIT_ALPHA_INPUT it is not working.Now iam using overlay condition for getting leading zeros.But iam getting the value like 00013.500.But as per my requirement i want to display this value 0000013.5.
my code is
overlay w_MetLife_detail-rdempsalary with '000000000'
data :rdempsalary type char9
Please help me on this.
Regards,
SujanHi
For more info,
The function of the statement UNPACK is based on the fact, that the BCD display of a decimal place corresponds to the second half-byte of code of a digit in the most character representations. This conversion is commonly called "unpacking".
The statement PACK to pack is obsolete and can be replaced by MOVE.
If destination is specified as untyped field symbol or as untyped formal parameter and is not flat and not character-type during execution of the statement, then an untreatable exception occurs in Unicode programs. In non-Unicode programs, an exception occurs only with deep types, whereas flat types are treated as character-type types.
Example
After the assignments,char1 and char2 contain the values "123.456" and "0000123456".
DATA: pack TYPE p LENGTH 8 DECIMALS 3 VALUE '123.456',
char1 TYPE c LENGTH 10,
char2 TYPE c LENGTH 10.
MOVE pack TO char1.
UNPACK pack TO char2.
Regards -
Subtotal text separately for new value of column1
Hi,
I posted this question prev. But i didnt get any reply...
I am doing ALV. I need help how to print text for subtotal separately for new value of column1...like total head, total master..
Eg:
column1 column2 column3
12300 Head 25.00
Head 15.00
Head 18.00
Total Head 58.00
34800 Master 50.99
Master 30.00
Total Master 80.99
i found that we can print subtotal for the whole thing same using
DATA : w_layout TYPE slis_layout_alv.
w_layout-subtotals_text = 'Sub Total'.
but i want separately for each new value of column1.
I am using func. module 'REUSE_ALV_LIST_DISPLAY', not classes.
Regards,
KarthickHi all,
We had or rather have the same problem, bellow you can find the answer I received from OSS:
"I have recived inputs from concerned experts on this issue. If you checkthe sid table entries, the value entered manually does not have flags
"chkfl datafl incfl" associated. This is inconsistent master data and
not relevant for transanction data associated if you need to report on
it.
The fact that you can input values manually and able to choose in F4
for analyzer is kind of gap in functionality. This could be developed
Master data planning in future. The value inserted manully creates
SIDs during Bex runtime. This is not possible through WEB. It is
better to select values through F4 selection rather than input it
manully. The wrong values generated are of no use due to master data
inconsistency."
=> so in the BEX you can 'create' new values for characteristics BUT ONLY one line at the time (this is a major issue for us). In the WEB apparently you can only work with already known values. (there you can have multiple new rows).
If somebody has a solution please let us know.
Hope this helps a bit
Best Regards
Rik -
Getting wrong values for decimal value in Bex report
Hi,
I am getting some problem in Bexreport decimal values.
In ODS i am able to look the values for this key figure
(Total PO Release Val)= 140.692,00,the same value in Bex report looks like this $ 140,692.00.
Here one calculation is going with these above values
% Used = 'Total PO Release Val' / 'Target Value' * 100
as per ODS value calculation it is correct = 140.692/1000 * 100 =14.692
as per Bex it is coming like this = 140,692.00/1000 *100 = 142.692.
in Bex report Percentage valus is not considering value is taking as 140,692.00 rather than 140.692.I mean to say decemal values are ignoring while calculation in Bexreport.can you any please advice me how to comeout of this problem.Appreciate your help.
Regards
Ramesh<i> "(Total PO Release Val)= 140.692,00,the same value in Bex report looks like this $ 140,692.00."
</i>
How do you check the ODS value? The amount will only have two decimal places after it, so you can't have a value like 140.692,00. It seems to be an issue of user's decimal notation (where decimal is represented by comma, and thousand seperator by '.'). Go to user profile, change this setting (in default tab) to correct one (ie decimal being represented by '.') and login again and check it. The value that you see in ODS is 'one hundred forty thousand six hundred ninety two, the same that you get in Bex, only the representation is different). -
I am making my own database table.which data type shuld I use to display decimal values.I used FLTP but its display is not very clear.
My values are like1234.56
Thanksassign decimal place while creating domine.
as per ur req.....
if it is usefulll.Plz Reward
Regards
Anbu -
Hi,
I am having a problem.. the decimal values that I have on flat file is not upload to a table properly
Table
==============================
SQL> desc intfc_splitfactor
Name Null? Type
UDC_DIVISION VARCHAR2(50)
DMDUNIT VARCHAR2(30)
ITEM VARCHAR2(30)
LOC VARCHAR2(10)
EFFDATE DATE
QTY NUMBER(20,5)
SPLIT_FACTOR NUMBER(20,5)
Control File
================
LOAD DATA
INTO TABLE scpodintfc.intfc_splitfactor
APPEND
TRAILING NULLCOLS
UDC_DIVISION CHAR TERMINATED BY ",",
DMDUNIT CHAR TERMINATED BY ",",
ITEM CHAR TERMINATED BY ",",
LOC CHAR TERMINATED BY ",",
EFFDATE DATE 'MM/DD/YYYY' TERMINATED BY ",",
QTY DECIMAL EXTERNAL TERMINATED BY ",",
SPLIT_FACTOR DECIMAL EXTERNAL
datafile
===============
2,1103,110308PM,LO,07/02/2006,1026,0.25
2,1103,110308PM,LO,07/30/2006,2916,0.5
2,1103,110308PM,LO,08/27/2006,8007,0.4
2,1103,110308PM,LO,10/01/2006,3750,0.297
2,1103,110308PM,LO,10/29/2006,873,0
2,1103,110308PM,LO,11/26/2006,349,0
2,1103,110308PM,LO,12/31/2006,482,0.5
2,1103,110308PM,LO,01/28/2007,539,0.4
2,1103,110308PM,LO,02/25/2007,3906,0.5
2,1103,110308PM,LO,04/01/2007,12148,0.4
2,1103,110308PM,LO,04/29/2007,7574,0.4
2,1103,110308PM,LO,05/27/2007,4536,0
2,1103,110308PM,LO,07/01/2007,1763,0
2,1114,11148PM,LO,07/02/2006,632,0
===================================
after inserting
===================================
select SPLIT_FACTOR from intfc_splitfactor
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
Can any one help to resolve this issue!!
Thanks
IndraneelYou could restructure you control file to:
LOAD DATA
INTO TABLE scpodintfc.intfc_splitfactor
APPEND
fields termianted by ","
TRAILING NULLCOLS
UDC_DIVISION CHAR,
DMDUNIT CHAR,
ITEM CHAR,
LOC CHAR,
EFFDATE DATE 'MM/DD/YYYY',
QTY DECIMAL EXTERNAL,
SPLIT_FACTOR DECIMAL EXTERNAL
) -
Sql server max function for decimal value
dear team
i have column which contains decimal value eg,
QuestionMasterId Studentid Score
19 1 9.01,
19 2 9.02,
19 3 9.35,
19 4 8.04,
i have to display the max score - that student score but when i am using the following query it is returning the int value
DECLARE @MAX decimal
SELECT @MAX=max(Score) from [QuestionPaperwiseScore] where QuestionMasterId=19
print @MAX
select Studentid,Score,@MAX-Score as diff from [QuestionPaperwiseScore] where QuestionMasterId=19
kindly helpTake a look at
BOL again. The default scale is 0. Thus it behaves like an INT.
DECLARE @Sample TABLE
QuestionMasterId INT ,
Studentid INT ,
Score DECIMAL(3, 2)
INSERT INTO @Sample
VALUES ( 19, 1, 9.01 ),
( 19, 2, 9.02 ),
( 19, 3, 9.35 ),
( 19, 4, 8.04 );
DECLARE @MAX DECIMAL(3,2);
SELECT @MAX = MAX(Score)
FROM @Sample
WHERE QuestionMasterId = 19
SELECT @MAX;
SELECT Studentid ,
Score ,
@MAX - Score AS diff
FROM @Sample
WHERE QuestionMasterId = 19 -
Custom property renderer for multiple value selections of property metadata
Hi,
We have created custom predefined metadata properties and fetching data from SAP to display values while uploading a document from KM.Everything is working fine and values are being displayed in a dropdown.
The standard property multi-valued displays values in checkboxex but the requirement is to allow for multiple selections in dropdown using shift ot ctrl key.
We started creating our own property renderer by decompiling classes like allowedvalues_multivalued
but we could not see the property on the upload screen.
Any help is greatly appericiated.
Thanks,
Vasu.Vasu,
Try changing the property renderer setting in your custom property. There might be one which allows a multiple select box. If not, you can always create your own. The following links are helpful:
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5800
https://www.sdn.sap.com/irj/sdn/nw-cm?rid=/library/uuid/f7b176eb-0701-0010-2b84-8edb1f76771d
Andrew -
Issue in custom search help for Suggest Value
Hi,
I have a requirement to have the suggest values pick up the records form any par of the string. Basically, using pattern. I have written the code in search help exit and it work in some cases and doesnt work for others.Eg. The result shows up for 123 but doesnt show for 1234, even though 1234 exists and it had showed up when i keyed in 123.
My select quest works fine and i can see the values in record tab but on the screen. What could be going wrong.
Thanks in advance for your help.
Pris.
PS: the code:
IF callcontrol-step = 'SELECT'.
DATA:lwa_selopt TYPE ddshselopt,
lit_selopt_id TYPE RANGE OF yselxyz-builder_id,
lwa_selopt_id LIKE LINE OF lit_selopt_id ,
lit_selopt_desc TYPE RANGE OF yselxyz-builder_name,
lwa_selopt_desc LIKE LINE OF lit_selopt_desc,
lwa_header TYPE yselabc,
lit_header TYPE STANDARD TABLE OF yselabc,
lv_sel_val TYPE ddshselopt-low.
READ TABLE shlp-selopt INTO lwa_selopt WITH KEY shlpfield = 'BUILDER_ID'."'DKEY'.
IF sy-subrc EQ 0.
lwa_selopt-option = 'CP'.
CONCATENATE '*' lwa_selopt-low INTO lwa_selopt-low.
MOVE-CORRESPONDING lwa_selopt TO lwa_selopt_id.
APPEND lwa_selopt_id TO lit_selopt_id.
MOVE-CORRESPONDING lwa_selopt TO lwa_selopt_desc.
APPEND lwa_selopt_desc TO lit_selopt_desc.
CLEAR:lit_header[],record_tab[].
SELECT builder_id builder_name FROM yselxyz INTO TABLE lit_header
WHERE ( builder_id IN lit_selopt_id )
OR ( builder_name IN lit_selopt_desc ).
SORT lit_header BY builder_id.
DELETE ADJACENT DUPLICATES FROM lit_header COMPARING builder_id.
CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
source_structure = 'YSELABC'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lit_header
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
callcontrol-step = 'DISP'.
EXIT.
ENDIF.
ENDIF.Issue Resolved. For less than 50 records, client side filtering takes over. In that case the search help exit will not come into picture. Issue resolved by avoiding client side rendering.
callcontrol-maxexceed = 'X'.
Thanks,
Pris. -
Different results for decimal values between SQL and B1 RecordSet
Hi Experts,
This is really a strange one. I have the query below:
SELECT Amount, TaxPrcnt FROM [@Table] WHERE ORDER# = '20246' AND ItemCode = '112488'
The same query gives me 0.085 for TaxPrcnt if I run it in SQL Management Studio, but gives me 8.5 if I run it in B1 Query Generator, and the same if I use RecordSet object in DI. The actual value in the table is 0.085. Anyone know why B1 is multiplying the value by 100?Hi Ronnie,
sp_prepexec is a system stored procedure used to generate to prepare and execute a parameterized SQL statement. Have a look at:
http://jtds.sourceforge.net/apiCursors.html#_sp_prepexec
Basically, it's another way of passing a query to SQL rather than using a stored procedure. This command shouldn't be converting the data in any way, unless there's a specific cast or calculation in the query itself.
Can you give simple details of the SQL table you created and I'll see if I can replicate the issue.
Kind Regards,
Owen
P.S. Sorry about the query, I wrote that down this morning before all my brain cells were awake Referencing a field by index only works when grouping and sorting. -
Hi experts,
kindly help me in sorted this..
in my coding:
ztest is a structure.
I want to ask u that what datatype shud i give to my field so that it can gv me acorrect value after appending.
also i have to sort my data and decimal shud b 2 place only.
kinldy response
data: itab like ztest occurs 10 with header line.
move '0.23566' to itab-value.
append itab.
move '1.98323' to itab-value.
append itab.
move 900 to itab-value.
append itab.
move '100' to itab-value.
append itab.
sort itab by value descending.
loop at itab.
write: / itab-value.
endloop.
thanks n regards
puneetHi,
you can declare the value in the following way.
DATA : value type p decimals 2.
Reward points if useful.
Regards
rose -
Public int indexOf(int ch, int fromIdx) doesn't work for some decimal value
I have tested two strings below. These two string are identical, except the first string has a char ', which has a decimal value of 131. And the second string has a char 'À', which has a decimal value of 192. I am expecting the same output, which is 11, but I got -1 for the test I did using the first string. In the API for public int indexOf(int ch, int fromIndex), values of ch is in the range from 0 to 0xFFFF (inclusive). It is highly appreciated if anyone could provide any insights on why -1 returned when the first string is tested. Thank you in advance.
String strHasDecimal131 = "Test value , it has a decimal value of 131";
String strHasDecimal192 = "Test value À, it has a decimal value of 192";
int badDecimal = 131;
int idxBadDecimal = strHasDecimal131.indexOf( badDecimal, 0);
System.out.println( "index of Bad Decimal: " + idxBadDecimal );
The output is: index of Bad Decimal -1
int badDecimal = 192;
int idxBadDecimal = strHasDecimal192.indexOf( badDecimal, 0);
System.out.println( "index of Bad Decimal: " + idxBadDecimal );
The output is: index of Bad Decimal: 11Thank you everyone for your inputs. Following are the print statements and the output: for character '' and ' À':
System.out.println((int)'\u0083' + ", " + (int)'\u00C0' + " print decimal value" );
Output: 131, 192 print decimal value
System.out.println((char)'\u0083' + ", " + (char)'\u00C0' + " print character value" );
Output: ?, À print character value
According to Latin-1 Supplement table, the first char in the output would have the appearance of , instead it has the appearance of ?
System.out.println( (int)'' + ", "+ (int)'À' + " print integer value");
Output: 402, 192 print integer value
I also have tried to print out the decimal value of following char: � , according to Latin-1 Supplement table, these char has decimal value of 128 through 135 and hex value 0x0080 through 0x0087. And the output from java println is: 8364 65533 8218 8222 8230 402 8224 8225.
System.out.println((int)'' + " " + (int)'�' + " " + (int)'' + " " +(int)'' + " " + (int)' ' + " " +(int)'' + " " + (int)'' + " " + (int)'' );
As I did before, I print out character of decimal value of 128 through 135
System.out.println((char)128 + " " + (char)129 + " " + (char)130 + " " +(char)131 + " " + (char)132 + " " +(char)133 + " " + (char)134 + " " + (char)135 );
Output: ? ? ? ? ? ? ? ?
Not sure why java prints character for decimal value of 128 through 159 differently from what appears in the Latin-1 Supplement table. Any of your inputs are appreciately. -
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 -
Thousand Separator is Not Appearing in Amount Fields iRecruitment
Hey Guys,
My requirment is to show comma as thousand Separator for example 10,000 but its showing 10000.
I am facing this issue in all amount fields in iRecruitment like Vacancy Page (Min Propose and Max Propose) and Offer Page.
I set the below profile options
Currency:Thousands Separator = Yes
ICX: Numeric Characters = 10,000.00
and
Preferencess > Regional Section > Number Format = 10,000.00
I am using EBS 12.1.3 and i cleared cashe but still no effecet. Is there any other setting need to be done?
Please Help
Regard
Mazhar Hussaini am also thinking same about it, but right now my CSI is has been expired so i cnt log SR that why i asked here if someone even experience it.
Regards
Mazhar Hussain
Maybe you are looking for
-
Use portable hard drive for Time Machine & other things
I recently purchased a 1 TB portable hard drive. I'd like to use it for my Time Machine backups, as well as moving my iTunes library there. Is this an easy change? I'm not super familiar with hard drive set ups. Will I have to create any partitions o
-
FCP 7 Export Quicktime Movie Suddenly Stopped working
I use FCP7 on Mavericks 10.9.2. Working in Final Cut with raw ProRes 422 footage and wanting to export my sequence as Export Quicktime Movie. Worked fine until one day it just didn't. Final Cut exports a QT file that QT opens and immediately attempts
-
Using the E-Mu 1616M and X-fi Platinum simutaneously in Windows & 64-bit.
I want to run my 1616m out to my Yamaha HS-50's (for recording, mixing and mastering) and my-X-fi Platinum out to my Logitech X-530's for music enjoyment via the 24-bit crystalizer and other features. Is there a way to run both cards in a Windows 7 6
-
My ipod touch got stolen, i want to find out by my apple id, could it be possible without find my phone, activated?
-
Error message "unable to connect with server. Check wifi connection"
I started having the error message "unable to connect with server. Check wifi connection" when I attempt to use search function within a certain apps and when I try to download certain magazine (eg. National geographic). I didn't have this problem w