‎2009 Jun 02 5:17 AM
Hi there,
How to separate commas from amount?
Example:
12,000,000.00 to 12000000.00
Thank You.
‎2009 Jun 02 5:22 AM
Hi Havoc,
just try like this,
replace ',' WITH ' ' INTO v_menge.
CONDENSE V_MENGE NO-GAPS.
‎2009 Jun 02 5:25 AM
Hi,
Move the Amount field to Char field.
If you have the amount value in char field.
REPLACE ALL OCCURRENCES OF ',' IN CHAR WITH space.
CONDENSE CHAR NO-GAPS.If you amount field and want to move to char field..
Char = amount. " The char field will not have the thousand seprators
‎2009 Jun 02 5:27 AM
Hello,
You can use the translate statement to do this.
w_abc = 12,000,000.00.
translate w_abc using ', '.
Condense w_abc no-gaps.
Thanks,
Sowmya
‎2009 Jun 02 5:36 AM
hi:
do like this
data amt type n
write amount to amt.
it would remove commas.
Regards
Shashi
‎2009 Jun 02 6:26 AM
Hi,
Use the NO-GROUPING Write add on functionality.
Please check the below code.
data: num1(12) type P decimals 2 value '1200000.00',
num2(12) .
write : / 'num1',num1.
write num1 to num2 no-grouping.
write: /'num2',num2.
Hope this will help you..
Regards,
Smart Varghese
‎2009 Jun 02 7:54 AM
Hi,
Please follow the bellow procedure to replace comma from amount.
data: l_amount(16) type c.
move amount to l_amount.
REPLACE ALL OCCURRENCES OF ',' IN l_amount with '''.
‎2009 Jun 02 9:35 AM
Hi,
Comma in 12,000,000.00 is a user default seperator.
Get this user default seperator using FM CLSE_SELECT_USR01 and then replace this seperator with space and then use condence for variable.
Define Amt as char field and amount to amt field.
call function 'CLSE_SELECT_USR01'
exporting
username = sy-uname
importing
decimal_sign = gv_dec_sep
separator = gv_tho_sep
date_format = gv_date_format.
REPLACE ALL OCCURRENCES OF gv_tho_sep IN Amt with space.
condence Amt.
Regards,
Raju.
‎2009 Jun 03 5:09 AM