Skip to Content
avatar image
Former Member

how to round off data where comma ( , ) are there

Hi,

Please anybody let me know how to round off the commas ( , ) in the numbers.

e.g.: if the amount is 120,000, i need to print only 120.

Please let me know how to do it.

regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    May 22, 2007 at 02:22 PM

    use FM FTR_CORR_SWIFT_DELETE_ENDZERO

    and remove the comma at the end using

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Madhavi,

      If it is possible for you to change Print program, you can include code mentioned in last post in print program and then use this FM in the print program.

      CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'

      EXPORTING

      NAME = '&t_value1&'

      VALUE = t_value1.

      Later, use t_value1 in the Form...

      Regards,

      Vivek

  • avatar image
    Former Member
    May 22, 2007 at 02:24 PM

    Hi Madhavi,

    You can use Split command to do this:

    data: t_value type i,

    t_value1 type i,

    t_value2 type i.

    Split t_value at ',' into t_value1 t_value2.

    write: t_value1.

    Regards,

    Vivek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 22, 2007 at 02:28 PM

    use in layout like amt(Z),it supress zero's and will remove comma also

    See the syntax :

    The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

    Omitting the Separator for ‘Thousands’

    &EKPO-MENGE& -> 1,234.560

    &EKPO-MENGE(T)& -> 1234.560

    *Omitting Leading Zeros

    Assuming the current date is 1.1.1994,

    &DAY& -> 01

    &DAY(Z)& -> 1

    Number of Decimal Places

    A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.

    Syntax

    &symbol(.N)&

    The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

    &EKPO-MENGE& -> 1,234.560

    &EKPO-MENGE(.1) -> 1,234.6

    &EKPO-MENGE&(.4) -> 1,234.5600

    &EKPO-MENGE&(.0) -> 1,235

    Message was edited by:

    Seshu Maramreddy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 22, 2007 at 02:30 PM

    move the field to a character field and then try this

    len = strlen(v_amt).
    len = len  - 3.
    if  v_amt+len(3) eq '000'.
       len = len -1 .
       clear v_amt+len(4).
    endif.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 22, 2007 at 03:02 PM

    Hi,

    You have to set the country it may work, in the begining of the form

    SET COUNTRY 'IN'

    should write, try with this.

    Regards

    Ganesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 23, 2007 at 05:06 AM

    hi,

    try:

    write qty to Temp_qty decimals 0.

    Regards,

    Sooness.

    Add comment
    10|10000 characters needed characters exceeded