‎2006 Sep 22 4:23 AM
hi,
how can i convert 1222222.22 to 1,222,222.22 programmatically? both outputs should be in string format.
thanks!
‎2006 Sep 22 4:26 AM
hi,
use write statement...
ex.
data: v_value type netpr value '12212332.34'.
DATA: V_STRING(18).
WRITE: V_VALUE TO V_STRING.
WRITE: / V_STRING.
Regards,
naren
‎2006 Sep 22 4:28 AM
Hi Winnie,
Not too sure are you doing some conversion of currency, but you can try this FM 'HR_ECM_CONVERT_CURRENCY', like convert from myr to yen
‎2006 Sep 22 4:41 AM
hi Chan,
do this way .. it works this way ..
data:ur_var(7) value '1000000'.
data: var(7) type p.
var = ur_var.
write: var.
Regards,
Santosh
Message was edited by: Santosh Kumar P
‎2006 Sep 22 4:52 AM
Hi,
U can do like this
DATA: v_waers LIKE essr-waers VALUE 'SGD'.
i_report-netwr = 1222222.22 .
Then
WRITE i_report-netwr TO v_netwr
CURRENCY v_waers DECIMALS 2.This solves ur problem.
Reward points if this answers ur question.
‎2006 Sep 22 4:59 AM
hi
good
yes you can do ir
store 1222222.22 in a string
declare one character type with value ,
use a SPLIT statement to split the value 122222.22 and than use CONCATENATE statement to concatenate all the clue with ,(symbol).
thanks
mrutyun^