Floating point field
hi!
i have a field from table AUSP-ATFLV (floating point)
can i convert the value of the floating point to 'REAL'
number, and how do i do it?
regards
yifat
use function module
FLTP_CHAR_CONVERSION
check out the FM documentation on how to use .
Regards
Raja
Similar Messages
-
Converting a floating pt field to a date/integer
Hi,
I have a problem of converting a floating point field in a transparent table to a date for display. For example I needs to convert '2.0050101000000000E+07' to '01.01.2005'. What are the methods available? I also need to convert this kind of field to a integer.
Any suggestions are welcome.
Thanks,
CK.Try doing this,
DATA: LV_DATE type d,
LV_STR1(30) type c,
LV_STR2(8) type c,
LV_INT type i.
write lv_float to lv_str1.
replace '.' in lv_str1 with ''.
shift lv_str1 left deleting leading space.
lv_str2 = lv_str1.
lv_date = lv_str2.
lv_int = lv_str2.
Message was edited by: Nablan Umar -
Conversion of a floating point type field
Hi,
I'm fetching field ATFLV from table AUSP for a particular value of ATINN.ATFLV is a floating point type field.
Can anyone please guide me as to how to convert this field(ATFLV) from floating point no. to a simple no.?
Helpful answers will be rewarded.
Regards,
Siprahi,
Do like this,
float f = 234.33;
int i = (int) f; // i has value 234.
reward points if helpful.. -
Regular Expression for floating point numeric field
Hi,
the requirements for the field are as follows:
- floating point numeric field 7 digits in length
- the field must contain a decimal (dot) and either one, two or three digits to the right of the decimal
- (leading zeroes are required if needed to fill up the 7 characters)
My example shown below does not check for the length of 7 characters:
public static void main(String[] args) {
String str = "04100.0";
System.out.println(str);
Pattern f_1To7 = Pattern.compile("^([0-9]*\\.[0-9]{1,3})$");
Matcher matcher = f_1To7.matcher(str);
if (matcher.find()) {
// yes, we've found something
System.out.println("We matched the pattern!");
} else {
System.out.println("Better luck next time!");
}When changing the pattern to
^([0-9]*\\.[0-9]{1,3}){7}$the whole expression will be repeated 7 times - but I would like to have to whole String to be 7 characters long.
Here are some examples for the field:
050.500 or 04100.0Thanks a lot and best regards,
- StephanJackler wrote:
Perhaps I did not express clearly enough. My problem is not a java issue - what I need is a regular expression (pattern) suiting my requirements:
-floating point numeric field 7 digits in length
-contains a decimal and either one, two or three digits to the right of the decimal
...Assuming that you are going to use Java*, you could use a lookahead at the start of your regex:
"^(?=\\d{4,6}\\.\\d{1,3}$).{8}$"Meaning:
^ # match the start of the string
(?= #
\d{4,6} # ensure that there are between 4 and 6 digits...
\. # followed by a DOT...
\d{1,3} # followed by 1 to 3 digits
.{8}$ # match exactly 8 characters directly followed by the end of the string* or some other language that has look-ahead support (most PCRE implementations have them) -
SQL Loader and Floating Point Numbers
Hi
I have a problem loading floating point numbers using SQL Loader. If the number has more than 8 significant digits SQL Loader rounds the number i.e. 1100000.69 becomes 1100000.7. The CTL file looks as follows
LOAD DATA
INFILE '../data/test.csv' "str X'0A'"
BADFILE '../bad/test.bad'
APPEND
INTO TABLE test
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
Amount CHAR
and the data file as follows
"100.15 "
"100100.57 "
"1100000.69 "
"-2000000.33"
"-100000.43 "
the table defined as follows
CREATE TABLE test
Amount number(15,4)
) TABLESPACE NNUT050M1;
after loading a select returns the following
100.15
100100.57
1100000.7
-2000000
-100000.4
Thanks in advance
RussellActually if you format the field to display as (say) 999,999,999.99, you will see the correct numbers loaded via SQL Loader.
null -
Hello All,
I am having some trouble checking the value of a field with Key Figure type Number with 8 byte floating point. I want to read that field and populate another field with an X if true. For example if that field is equal to 5,0000000000000000E+07 then i want to mark the other field with an 'X'.
The problem is in my code, how do i read that number in the fltp field, such as the number above. my code reads as follows for the 'X' field.
if SOURCE_FIELDS-abc123 eq 5000000.
RESULT = 'X'.
endif.
Thanks everyone in advanceYou don't need to worry about converting the code into standard format or floating, just implement your code as you want and it will automatically take care of the conversion. Basically 5,0000000000000000E+07 = 50,000,000.
thanks.
Wond -
Hello,
Running FCP 5.1
Having audio sync issues and was double checking my settings.
Although the sequence presets are at 16 bit, they are showing up in the browser as 32bit Floating Point.
Any thoughts?
I generally capture now at 30 minute increments and actually have always had this issue. FCP 4.5 and 5.1
all settings are where they should be.
although I do notice, obviously when the device is off, the audio output defaults to 'default' not to firewire dv.
thanks
iMac intel Mac OS X (10.4.8)Some more details please. What hardware device are you sourcing the audio clips from? The likely culprit is your capture settings. What preset are you using? Check Audio/Video Settings-Capture Presets and see if the preset you've selected records audio as 32 bit. It will say in the right column after you've selected your preset.
If it says 32 bit there, click Edit to get the Capture Preset Editor. Under Quicktime Audio Settings, the Format field should give you a selection of sample rates and possibly alternate bit depths. If your only choice is 32 bit, (as it is for me when I capture audio via my RME, 32 bit Integer in my case) then you'd be well served by bringing those files into Peak or Quicktime and saving them as 16 bit Integer files to match your sequence settings.
If you've imported these files into FCP from an audio editor that can create 32 bit floating point audio files, eg Kyma, Sequoia, Nuendo, etc. then the same advice applies. The 32 bit files are much larger than they need to be and may upset the apple cart (he he, pun) when pulled into a sequence with different settings. More cpu overhead for sure.
Let us know what you find. -
Hi,
The Group and Legal costs that are sent to BW from R/3 contain as 6 decimal places. As cost fields, the Group and Legal Costs are stored in BW as currencies and therefore have only 2 decimal places.
The two objects are going to need to be changed to floating point numbers.
Do i need to delete the entire data in the ODS before proceeding?
Regards,
AnitaSee the below link
Re: currency with 3 decimal
Regs
Gopi -
Floating Point type in selection screen
Hi,
I need to use a field ausp-atflv in selection screen. Field atflv of type Floating point. But in selection-screen, Floating point type variables are not allowed.
Any suggestions please.
Thanks
Aravind.RYes Arvind,
Replace the type with a TYPE P with DECIMALS addtion variable.
Regards
Abhii -
Sequence audio format stuck on 32-bit Floating Point
Hi,
The audio format for all my sequences is set to 32-bit Floating Point when I check them in the browser's Aud Format field. When I manually change the format in the sequence settings nothing changes in the browser and choosing a new sequence set up doesn't seem to help. What I don't understand is that there isn't even an option for 32-bit Floating Point in Audio Settings. Anyone else experience this?
I am using v6.0.6 on osx 10.5.8
Thanks,
Tom16 bits per channel equals 32 bits stereo. Floating point means that you can, but don't have to, have a non-integer value for your audio.
-
Floating Point arithmetic conversion
Hi Everyone,
Can you tell me how to convert a floating point arithmetic field value to a currency field value.
thanks,
chanHi,
I hope simple move statement should work.
MOVE l_float TO l_curr.
Make sure that curr field has enough length.
Thanks,
Vinod. -
Floating point Number & Packed Number
Hai can anyone tell me what is the difference in using floating point & packed Number .
when it will b used ?<b>Packed numbers</b> - type P
Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
You can use type P data for such values as distances, weights, amounts of money, and so on.
<b>Floating point numbers</b> - type F
The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
reward if useful -
Hi all;
Please help.
I am getting floating point values in my source IDoc like 1.234- but while inserting into the ODS system i need the negative sign before 1.234.
How to achive this out.
NalinHi
You can achive this by using graphical mapping UUser defined function.
Mapping source fieldremove context UDF --- target field
UDF
for(int i=0;i<Float.length;i++)
if(Float<i>.endsWith("-"))
result.addValue("-"+Float<i>.substring(0,Float<i>.length()-1));
else
result.addValue(Float<i>);
Mudit
Award points if it helps -
Floating point keyfigure display in infocube
Hi ALL,
i created floating point key figure as a number, i uploaded flat file to cube, values in flat file 4.33 but in infocube output is 4,3300000000000001E+00 coming like this, y not round up this values in infocube. please help me
Thanks,
Nandish
Edited by: nandish017 on Aug 22, 2011 11:53 AMHi,
you have reload the data in info cube
Delete records from Cube and PSA
--> Goto Data source
-->in Fields Tab, put Data type of that fields DEC Or CURR (for Currency) (Remove FLTP data type that caue the floating points)
-->Activate the data source
-->Preview the data (will show data without Floating point)
-->Trigger infopackage
-->Trigger DTP
Check the record and let me know the result
Best Regards
Obaid -
Hi Gurus,
My requirement is to convert a value from floating point to quantity.
I am fetching a field value AUSZT from table QMIH as
3.7340000000000000E+03 and i need to convert it to
1.04.
Please help.
Regards
MadhuHi Madhu,
Refer this help http://help.sap.com/saphelp_nw04s/helpdata/en/57/f2dc37f0f12313e10000009b38f8cf/frameset.htm
Regards,
Flavya
Maybe you are looking for
-
Automatic insertion of file name in Pages footer?
I'm considering using Pages instead of MS Word. One thing I can't figure out is if it is possible to use a function to automatically insert the filename in the footer of a page (or anywhere else for that matter)? Having the file name on printouts is
-
Yoga 2 Pro don't work with external monitor (picture attached)
I'm trying to connect my Y2P to my Dell 2407wfpp, 24" 1920x1200, (http://www.dell.com/downloads/emea/products/snp/2407wfp_monitor.pdf) and everything turns to a green-blue colour.. I'm connecting using a Mini HDMI to HDMI cable + a HDMI to DVI adapt
-
Sync multiple computers with the same mailbox
Hello all, I am using a Bold and syncing with MS Outlook 2007. I have it on both a desktop and my laptop (laptop being the first computer I used). I have tried to sync but am having issues with the calendar as I am getting multiple items, some items
-
Nothing to add, really, except that I used to use Internet Explorer 8 and had no problems there. However I prefer to stick with Firefox!
-
When I upgraded to the latest Firefox on my Windows 7 PC , I get a 7-Zip Error Box stating " The System cannot find the file specified". This happens approximately two thirds into the installation. I have tried turning the Virus checker off and re-in