Skip to Content
avatar image
Former Member

Decimal Format Issue

Hi,

I am getting decimal output as 123,00 instead of 123.00 I have also chked SU3 settings but the default settings are correct 1,234,567.89

Thanks,

Alok

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 20, 2008 at 09:41 PM

    Check the configuration for the country code that you are using. Some countries use specific date and decimal formats. Try using the following code within your Sapscript:

    /: SET COUNTRY 'FR'

    ( or whatever country setting you are looking for). In our system, Country Code FR (FRANCE) has a decimal format of "," so the number is printed as "123,000" instead of "123.000".

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 21, 2008 at 04:02 AM

    Hi

    Use following code before printing

    /: SET COUNTRY ' '

    Refer following for details

    Country-Dependent Formatting

    Certain fields are formatted specific to a particular country. These include fields for displaying a date and numeric fields containing either a decimal point or a u2018thousandsu2019 separator character. The formatting applied is usually determined by the definitions contained in the user master record. You can use the SET COUNTRY control command to choose a different formatting operation. The various country-dependent formatting options are stored in table T005X.

    Syntax

    /: SET COUNTRY country_key

    You can specify this country key either by quoting it directly enclosed in inverted commas or by using a symbol.

    /: SET COUNTRY 'CAN'

    /: SET COUNTRY &KNA1-LAND1&

    You can revert to the settings of the user master record by using the SET COUNTRY control command again with an empty country name.

    /: SET COUNTRY ' '

    When SAPscript encounters this command it calls the corresponding ABAP command internally. The effect of the SAPscript command is thus identical with that of the ABAP command.

    Regards

    Harshada

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 15, 2008 at 08:32 AM

    use below replace commad..

    REPLACE ',' WITH '.' INTO Your field.

    CONDENSE field NO-GAPS.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 28, 2009 at 10:45 AM

    solved by setting country

    Add comment
    10|10000 characters needed characters exceeded