10-15-2007 8:16 PM
Hi
Is there a function module to convert any decimal notation to the
1,234,567.890 , and if there is , then a sample code will be very useful
Thank you
10-15-2007 8:19 PM
hi,
do this way ...
data : v_target type p decimals 2,
v_source like bseg-dmbtr value '1222.22'.
write v_source to v_target.
write v_target.
10-15-2007 8:21 PM
Hi,
Please try FM C14N_NUMERIC_FORMAT.
or try this.
data: c(100) type c.
data: length type i.
data: offset type i.
c = '1223,54'.
length = strlen( c ).
offset = length - 3.
translate c+offset(1) using ',.'.
write:/ c.
Regards,
Ferry Lianto
10-16-2007 3:15 PM
Ok , the problem that i am facin is as follows :
I have a input field which is of type decimal .The value in this field is taken and updated to a table using BDC call transaction. Now when the user default setting is 1,234,567.890 the program works fine. For example if I input 3 , then the value entered is 3.000 . Which is correct. If the default setting is changed to 1.234.567,890 , the program automatically adds 3 zeros before the decimal . So if I enter 3 , the value input is 3.000,000 instead of 3,000
Is there a solution for this. I have checked the attributes and the Fixed point arithmatic is checked. I tried both with checked and unchecked...and the problem persists.