SAP Function FLTP_CHAR_CONVERSION - Format conversion: Floating point --> Character

Parameter Reference Type Length Default Optional Text
DECIM 0 15 X CHAR field formatting decimal places
EXPON 0 0 X CHAR field formatting power of 10
INPUT 0 0 X FLTP field for formatting in CHAR field
IVALU 0 SPACE X FLSTR value flag
MASKN 0 SPACE X Masking character if input screen

Parameter Reference Type Length Text
FLSTR 0 CHAR field with formatted floating point number


  • This function module is a prototye which will no longer be maintained
  • when FLTP format is supported on screens.
    • Functionality:

    • The contents of the INPUT parameter are converted from floating pointformat (FLTP) into character format (CHAR) and put in the FLSTRparameter.
      The desired number of decimal places and the power of 10 in themantissa of the formatted number (EXPON = 0 --> no exponential format),can be specified in the DECIM and EXPON parameters. If this is notpossible, e.g. because the number is too large, the standard format, inwhich the mantissa has one significant place before the decimal point,is automatically used.
      As the initial value of numerical formats in the SAP system is '0', but'0' is a valid value in some applications (e.g. 0° Celsius), theauxiliary parameter IVALU is used.
      The FLSTR parameter can contain an input mask. The MASKN parameter mustcontain the masking character (e.g. '_'). Decimal places and the powerof 10 in the input mask are determined by the DECIM and EXPONparameters (see above).
      • Example call

      • CALL FUNCTION 'FLTP_CHAR_CONVERSION'
        EXPORTING DECIM = T006-DECAN
        EXPON = T006-EXPON
        INPUT = ... (floating point field)
        IVALU = ... (flag, see above)
        MASKN = '_'
        IMPORTING FLSTR = ... (character string)
        A character field (CHAR, maximum meaningful length: 22) must beassigned to the FLSTR parameter. The function module puts the formattedcontents of the INPUT parameter in this field. See the functiondocumentation.
        Number of decimal places in the floating point format in the FLSTRparameter. See function documentation.
        Power of 10 in floating point format in the FLSTR parameter. Seefunction documentation.
        A floating point field (FLTP) must be assigned to the INPUT parameter.The function module converts the contents of INPUT into a characterstring.
        The IVALU parameter distinguishes between 'initial' and '0':
        If the FLTP parameter INPUT is initial but the IVALU flag is notinitial ('X'), '0' is put in the CHAR parameter FLSTR instead of SPACEor the input mask.
        If the MASKN parameter is not initial, an input mask can be created inthe FLSTR parameter with the assigned character (e.g. '_'). See thefunction documentation.