SAP CONVERSION TYPE F

Get Example source ABAP code based on a different SAP table
  


ARTICLE

Source Field Type f
ITOC

Numeric Target Fields TargetConversion i,
int8, (b, s)The value of the floating point number is rounded up to the nearest integer. If this number is within the value range for the data type i,
int8, (b, s), it is converted to the internal representation of the corresponding integer number. If the number is not within this range, the handleable exception CX_SY_CONVERSION_OVERFLOW is raised. pThe value of the binary floating point number is rounded to the number of decimal places in the target field. If this number is within the value range for the data type of the target field, it is converted to the internal representation of a packed number. If the number is not within this range, the handleable exception CX_SY_CONVERSION_OVERFLOW is raised. decfloat16, decfloat34The value of the binary floating point number is rounded to 17 decimal places (depending on the platform) and converted to the value of a decimal floating point number. The format in the decimal floating point number is such that the mantissa has no trailing zeroes. fThe content of the source field is passed unconverted.

Character-Like Target Fields TargetConversion cThe value of the binary floating point number is formatted in the same way as when converting to the data type string. If the target field is shorter than the complete notation, the mantissa is rounded up. If the target field is not long enough to include at least one digit of the mantissa apart from the exponent and the minus sign (for a negative value), the target field is padded with '*' characters. If the target field is longer than the complete notation, it is padded with blanks from the left. stringThe value of the binary floating point number is formatted in scientific notation and is copied into the target field. The exponent is always displayed with a plus/minus sign and at least two digits, and the mantissa with one place before the decimal point and 16 places in the fractional portion. To do this, the internal representation of the floating point number is rounded to 17 decimal places (depending on the platform) Depending on the plus/minus sign and the length of the exponent, the resulting length of the target field is between 22 and 24. nThe value of the floating point number is rounded up to the nearest integer. The absolute value is passed as a right-aligned charact er string to the target field. If the target field is longer than the character string, the field is padded with zeros from the left. If it is too short, the values to the left are cut off. dThe content of the source field is first converted to the data type i (see above), and then to the type d (see the conversion table for source field type i,
int8, (b, s)). tThe content of the source field is first converted to the data type i (see above), and then to the type t (see the conversion table for source field type i,
int8, (b, s)).

Byte-Like Target Fields TargetConversion xThe content of the source field is first converted to the data type i (see above), and then to the type x (see the conversion table for source field type i,
int8, (b, s)). xstringThe content of the source field is first converted to the data type i (see above), and then to the type x (see the conversion table for source field type i,
int8, (b, s)).