cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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,

Accepted Solutions (0)

Answers (6)

Answers (6)

dev_parbutteea
Active Contributor
0 Kudos

hi,

try:

write qty to Temp_qty decimals 0.

Regards,

Sooness.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

use FM FTR_CORR_SWIFT_DELETE_ENDZERO

and remove the comma at the end using

Former Member
0 Kudos

i have to manipulations in form layout.

Former Member
0 Kudos

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