Skip to main content

SAP HANA - display value formatted like a currency with commas and 2 decimals in a B1UP label


1 comment

  • Richard Smith


    This might help others but we managed to get this to work by using the TO_VARCHAR function as detailed here TO_VARCHAR Function (Data Type Conversion) | SAP Help Portal

    For example, our client wanted a quotation value on BP Master Data:

    @Store1 = SQL(select TO_VARCHAR(sum(T0."DocTotal"),'9,999.00') FROM OQUT T0 WHERE T0."CardCode" = $[$5.0.0])

    This returned a nicely formatted value of 15,036,672.00 to an IPT edittext field (rather than a label). Without the TO_VARCHAR function the value returned was either 15036672 or 15036672.000000 depending on the syntax used for the IPT edit text field.



Please sign in to leave a comment.