avatar image
Former Member

Conversion: TO_CHAR issue in SAP Infosteward

Hi All,

I've an issue in formatting a decimal type field with thousands & comma separator using 'to_char' in SAP Infosteward 4.2.

Here is the scenario:

Input: 12345.67

Desired output: 12,345.67

I've used the conversion as "to_char("12345.67", '9G999D.99') but I get the result as '345.67' instead of '12,345.67'.

Any help in resolving the issue is much appreciated.

Thanks,

Mani R

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 09, 2017 at 02:16 PM

    Hi Mani,

    Your screenshot shows you are converting a decimal to a varchar but you are putting the results back into a decimal column. Try changing this so the result of the to_char() function is output to a varchar column. Thanks.

    Doug

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 02, 2017 at 07:24 PM

    Hi Mani,

    Try the following:

    to_char(12345.67, '99G,999D.99')

    This works correctly for me and returns '12,345.67'


    Regards,


    Doug

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 02, 2017 at 07:58 PM

    Doug,

    Thanks for your reply. Unfortunately it's not working. I see <null> for values greater than 999.99. For instance value of '999.99' shows up correctly in the output view but value of '1000.11' shows up as <null>.

    Here is my conversion statement

    Thanks,

    Mani. R

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content