Do you have any question about this error?
Message type: E = Error
Message class: R7B - BW Metadata (InfoCube, InfoObject, InfoObject catalog)
Message number: 136
Message text: Rounding inaccuracies occur with data type FLOAT for AMOUNT and QUANTITY
ABAP data type FLOAT is an implementation of the IEEE data type DOUBLE.
In most databases<(>,<)> this data type is also implemented according to
the IEEE specification.
This data type is a floating point data type with mantissa and exponent
encoded in base 2. Because the conversion from base 10 to base 2 is
technically not possible without loss of accuracy for many numbers,
using FLOAT always results in rounding inaccuracies. Examples include
0.15, 25.5 and many more. They cannot be expressed exactly as FLOATs.
SAP Note 2798 describes some of the effects of this behavior. A decimal
shift can cause rounding inaccuracies for example.
All arithmetic operations on FLOAT cause additional inaccuracies. A
simple addition of 2 values has an inaccuracy in the last digit (15).
For 10 additions<(>,<)> you lose 1 digit in accuracy. For 100 additions
<(>,<)> 2 digits are lost, and for 1<(>,<)>000,000 additions 6 digits
are lost. The result of database aggregation SUM on 1 million records
has a remaining accuracy of 8 digits instead of 14 digits. Aggregating 1
billion rows means that only 5 digits will be correct.
Data type FLOAT is therefore not suitable for business-relevant data
like amounts and quantities<(>,<)> where exact results are required (for
example financial key figures).
The system raises a warning if this key figure is defined. The key
figure is used as defined.
Check the key figure definition and change it if used in
business-relevant scenarios. Suitable data types are the ones that the
system proposes by default when you create a key figure. These types use
decimal packed numbers and do not have the specific rounding
inaccuracies of FLOAT.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Error message extract from SAP system. Copyright SAP SE.
R7B136
- Rounding inaccuracies occur with data type FLOAT for AMOUNT and QUANTITY ?The SAP error message R7B136 indicates that there are rounding inaccuracies occurring with the data type FLOAT for AMOUNT and QUANTITY fields. This issue typically arises due to the way floating-point numbers are represented in computer systems, which can lead to precision errors when performing arithmetic operations.
Cause:
- Floating-Point Representation: The FLOAT data type uses binary representation, which can lead to rounding errors, especially when dealing with decimal values. This is because some decimal fractions cannot be represented exactly in binary form.
- Arithmetic Operations: When performing calculations (like addition, subtraction, multiplication, or division) on FLOAT values, the results may not be precise, leading to discrepancies in the final output.
- Data Conversion: If data is being converted from one type to another (e.g., from FLOAT to DECIMAL), inaccuracies can occur if the conversion does not handle rounding correctly.
Solution:
- Use DECIMAL Data Type: Instead of using FLOAT for monetary values or quantities, consider using the DECIMAL data type, which is designed for exact numeric representation and avoids rounding issues. DECIMAL allows you to specify the precision and scale, ensuring that calculations are accurate.
- Review Calculations: Check the calculations in your program or report to ensure that they are not inadvertently introducing rounding errors. If necessary, implement rounding functions to control how values are rounded.
- Adjust Configuration: If applicable, review the configuration settings in your SAP system related to number formats and rounding rules. Ensure that they are set up to handle the required precision for your business processes.
- Data Validation: Implement validation checks to identify and handle rounding errors before they cause issues in reports or transactions.
Related Information:
By addressing the root cause of the rounding inaccuracies and implementing the suggested solutions, you can mitigate the impact of this error in your SAP environment.
Get instant SAP help. Start your 7-day free trial now.
R7B135
Local characteristics are impacted by changes made to InfoObject &1
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
R7B134
Nav. attribute &1 for characteristic &2 as InfoProvider cannot be used
What causes this issue? Compounding InfoObject &V3& of navigation attribute &V1& of characteristic &V2& marked as an InfoProv...
R7B137
InfoObject &1 is locked by user &2
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
R7B138
Attribute &1 not allowed
What causes this issue? You specified master data read class &V2& that implements interface IF_RSMD_RS_ACCESS_DEFINITION. Class &V2& ...
Click on this link to search all SAP messages.