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
Similar Messages
-
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
yifatuse function module
FLTP_CHAR_CONVERSION
check out the FM documentation on how to use .
Regards
Raja -
Maximum size of a floating-point number
Morning all,
Does anyone know what the maximum size of a floating point number can be under Solaris 8 running on
a V880?
Regards,
Richard BreckonI'm not sure what you're asking.
The maximum size is 128 bits.
The maximum value is as given in /usr/include/float.h: 1.189731495357231765085759326628007016E+4932L -
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 -
Determining whether an integer is a floating-point number
I want to create a program that when an integer is input into the numeric constant, a floating-point number with all zeros to the right of its decimal point will light the LED on the front panel. The LED will remain unlit for any other floating-point number. I know I want to use a Round to Nearest function, but not sure where to go from there.
rtufaro wrote:
I want to create a program that when an integer is input into the numeric constant,
You mean CONTROL, right?
You just need a type of rounding. Doesn't matter if you round up or down. So you just round and then compare the input to the rounded value. If they are equal, you light up your LED. So all you need is a numeric control, 2 functions, and a boolean indicator. -
How to restrict the decimal place of a floating point number?
Hi,
Here is my code:
public void TwoDecimal(double u){
String w = Double.toString(u);
int c = w.length();
System.out.println(c);
if (c <= 5)
double a = Double.parseDouble(w);
System.out.println(a);
else
System.out.println("Invalid input!");
}I want to show a floating point number which has 2 digits and 2 decimal places, e.g. 45.82, 29.67. This number is input by user and passed as a parameter.
For those case like the above sample floating point numbers, it can display the proper value of 'c'. e.g. 45.67 will display 5.
However, when I passed 99999, it will show 7; 9999 will return 6, not 5.
So, if the user does not input the '.', does it append 2 implicit chars to it? i.e. 99999.0 and 9999.0. So, that's why it returned 7 and 6 for the length of the string respectively.
How can I fix it?
and
Does it has better algorithm?
Pls advise.
gogoWhen dealing with a known precision, in your case hundredths, it is often a good idea to use an integer type and add in the decimals on printing only. This is often the case in banking systems. Almost all of them use integer types, (read long) in pennies to store monitary values. Ever seen someone type in a value for a credit card machine? For something like $20 they press.. "2" "0" "0" "0" The machine knows the lowest denomonation in a cent, so it knows where to put the decimal place. I suggest you do something like this. It also helps to avoid base 2 round off errors.
-Spinoza -
Generate 3 digits floating point random number
hai....How I want to generate 3 digits floating point random number??..plz help me...
Thanks..Hi gdah,
use some common math functions to get a randopm number in the range from 1 to 5 (but not including 5, see help for "random number"!)... Then format to a string (if needed) or set properties of numeric indicator...
Hey Mike, your first version looked quite different
Message Edited by GerdW on 05-05-2008 09:39 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
RND_1-5_3Digits.png 1 KB -
X64 Asm floating point number adressing .
Dear Community
Please kindly inform us about the number offloating-point
addressing mode x64 Asm
Best Regards
Rafał BatorHi RB_1,
Your issue is out of support range of VS General Question forum which mainly discusses
WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
You post the issue in this thread:
https://social.msdn.microsoft.com/Forums/en-US/78825b09-d948-4676-a343-1791bad36603/asm-codnig-floating-point-number?forum=vcgeneral
so I will remove this thread. Please discuss your issue on that thread or opening new thread on Visual C++ forum.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Exception with floating point number
I get the following message if i try to import a floatingpoint number (12.12 is the number).
oracle.xml.sql.OracleXMLSQLException: 'java.lang.NumberFormatException: 12.12' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
I4ve tested anything with '.', ',' NLS-Parameters and so on.
The Bugfix is now to multiply the number with 100. It4s not fine, but it works.
Thanks in advance,
Oliver Friedrich
nullHello,
this is a short piece of my code. I think there is all information you need.
Greetings
Oliver Friedrich
String xmlControl = "CONTROL"; // XML tag
String dbControl = "XML_CONTROL"; // Database table
OracleXMLSave saveObject = new OracleXMLSave(conn, dbControl);
saveObject.setRowTag(xmlControl);
saveObject.setIgnoreCase(true);
saveObject.setDateFormat("yyyyMMdd");
int count = saveObject.insertXML((Document)docImport);
XML-File:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONTROL>
<NUMBER>12</NUMBER>
<COST>123.45</COST>
</CONTROL>
</ROOT>
Database-Table
desc XML_CONTROL
Column Name Null? Type
NUMBER NUMBER(12)
COST NOT NULL FLOAT(32)
null -
Type P (Packed Number) Specifications ?
Hi Experts,
Are there any document to get detailed information about data types especially type P (Packed) data types.Hi,
Check the link below
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
http://abap4.ru/doc/1/types.htm
ABAP/4 Data Type
In ABAP/4, we can declare data by command DATA.
Type Description Initial Value
C Character Space
D Date 00000000
F Floating Point 0.0
I Integer 0
N Numeric Text 0
P Packed Decimal 0
T Time 000000
X Hexadecimals X00
Packed numbers - 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. -
Every Shipping point has corresponding number range for the HU box number?
Hi,
Every Shipping point has corresponding number range for the HU box number assignment?
For example, we are doing packing, then a Handling Unit number has been generated. So where to define this number range of the HU number??
Is it from the SPRO or controled by programs.
Thanks.Hi,
Please find good stuff on Handling Units Below:
HANDLING UNITS CONFIGURATION:
A Step by Step Guide to the SAP Handling Unit Management Configurations
The SAP Handling Unit Management system allows you to manage the entire movement of the handling units and the materials they contain rather than tracking each material individually.
This paper is for the HUM Delivery although some of the contents is related to Inventory under the Logistics General modules.
Table of Contents
Objective
IMG Menu The Starting Point
Handling Unit Management Overview
Start of HUM Outbound Deliveries Manual Packing Configuration
Define Number Ranges for Handling Units
Define Packaging Material Types
Define Material Group for Packaging Materials
Define Allowed Packaging Materials
Use Handling Unit Supplements
Maintain Goods Movements for Handling Unit Stock-Posting
Define User Status Profile
Set QM Check and Delivery Type for Each Movement Type
HU Requirement for Storage Locations and Default Values for Deliveries
Packing Control By Item Category
Define Requirements for Packing in the Delivery
Delivery Type Determination
Set Unique Number Assignment for HU Identification
Number Range Maintenance for HU Identification
Define Number Assignment for Each Packaging Material Type
Delivery Output type for Packing List
Maintain the Delivery Output Determination Procedure
What else to maintain after the Manual Handling Units Configurations?
Start of the Automatic Packaging Configuration
Define Number Ranges for Packing Instructions
Define Determination Type for Packing Instructions
Define Number Ranges for Packing Instruction Determination Records
What else to maintain after the necessary Automatic Packaging Configurations?
Appendix A: How to do Manual Packing for Non-Assigned Handlings Units?
Appendix B: Scenario 1 How to do Manual Packing by Delivery Item?
Appendix C: Scenario 2 How to Manual Pack the Materials into Pallets?
Appendix D: How to do Automatic Packing?
Appendix E: How to do Goods Movement for Handling Unit Material?
Appendix F: How to Unpack the Handling Unit Material?
A handling unit is a physical unit that consists of the packaging materials (load carrier / packaging material) and the goods contained therein. A handling unit is always a combination of materials and packaging materials. All the information contained in the material items, such as batches and serial numbers, is always available by way of the handling units.
Handling units can be nested, meaning that you can also create new handling units from several handling units as often as you like.
Handling units have unique, scannable identification numbers that can be formed according to standards such as EAN 128 or SSCC.
Figure 1: Handling unit example
Structure
The handling unit object contains the following attributes:
Identification number
Dimensions
Weight
Volume
Status
Materials and quantities
Packaging materials
Packing instructions
A handling unit consists of a handling unit header and handling unit items. For identification purposes, it is given a unique number.
Handling unit header
The header data of a handling unit is divided in the following way:
Weight/Volume/Dimensions
General data
Means-of-transport data
Additional data
Output determination procedure
For more information about each of these detailed points, see Editing detailed data for handling units.
Status
The handling unit is linked to general status management. In this way, the various physical states (planned or implemented) and other attributes (weighed, loaded, blocked or posted goods issue) of handling units can be documented.
You can use the HU_ST_INIT user parameter when you create handling units without object reference to set which initial status the handling unit is to have when it is created.
If you want to implement a status of your own, you can define a user-specific procedure for the packaging material type (see also Define Packaging Material Types).
Handling unit item
The items of a handling unit can consist of material items, packaging materials or other handling units that appear in an overview. For more information about this overview, see the Contents section of Editing detailed data for handling units.
To access the item data of an individual handling unit, select the handling unit concerned and choose Goto  Detailed HU data  Contents.
Integration
Handling units can be used in all processes within the supply chain.
Please Reward If Really Helpful,
Thanks and Regards,
Sateesh.Kandula -
Pack and Floating Point Data Type in ABAP
Dear All,
I am new to ABAP. Started with data types. Came across pack and floating point.
Please let me know what PACK and Floating Point stands for with few examples and the main difference between them.
Regards
Arun VHi,
You'd better ask this question in ABAP forum http://forums.sdn.sap.com/forum.jspa?forumID=50 .
Best Regards,
Ada -
Packing list number & packing list date
Hi All,
We need to generate a report that details the amount of product shipped from a manufacturing plant. I need the details like from where do we need to fetch the packing list number & packing list date. Like the field & table names. Pelase suggest asap.
Regards
VTHi,
Pls try below tables
Shipping Unit Header - VEPO
Shipping Unit Item - VEKP. -
Packed Number Sign Format to Ascii equivalent java program
Hi
I have a requirement to convert the packed Number Sign Format(usually used in MainFrame Platforms) to Ascii equivalent .
please help me out with java code or steps to be done to achieve these task
thank's
habeeb
[email protected]
[email protected]Already answered in other thread.
-
How to find hp care pack number hw/sw product number
how to find hp care pack number and hw/sw product number pls advice
This question was solved.
View Solution.Contact HP directly.
This is the HP Consumer Global support forum and not a sales unit of HP.
****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
2015 Microsoft MVP - Windows Experience Consumer
Maybe you are looking for
-
I just bought an iphone 4s from a friend and it will not sync to iTunes
I just bought an iphone 4s and the phone will not sync to itune. I have the music that I bought from itunes but not my other music. And when I do plug the phone up to my computer it will say that the phone is hooked up but iTunes will not show my pho
-
Home sharing - can see movie on iPhone, but it won't play.
I've got home sharing set up on iTunes and in my iPhone 3GS. I'm in the process of testing the digitizing of my home DVD library into iTunes, and have made my first attempt. The film works fine in iTunes on my Mac, and I can see it on my iPhone, but
-
Using Oracle 8.0.5 and Forms 5.0.6.8.0 I created a view with an instead of trigger and I can insert rows using SQL. When i create a form with a block based on the view and I try to update a row, the form returns the error "FRM-40602 cannot insert or
-
I have service for a little while then all of a sudden no sim comes up and I do not have service
-
*More time to Execute*
Hi, The following code is taking more time to execute... Kindly assist.. check wagetype selection REFRESH it_p8wage. CLEAR: it_p8wage, wa_p8wage, p8wage_flag. LOOP AT p0008. DO 20 TIMES VARYING wa_p8wage-lgart FROM p0008-lga01 NEXT p00