2007 Oct 24 12:48 PM
hi!! i have an itab which is included some amount fields.
my task is to remove the dot in the amount fields. for example:
111.99 ---> 11199
444444.88 -
> 44444488
what can i do?
Hi Antonis,
loop at itab into wa_itab.
REPLACE ALL OCCURRENCES OF '.' IN wa_itab-amnt WITH ' '.
condense wa_itab-amnt no-gaps.
modify itab from wa_itab.
endloop.
Reward if useful,
Regards,
Chitra
2007 Oct 24 12:51 PM
use FIND command to search for the dot then replace the dot with space then shrink the field using NO-GAPS addition.
Cheers,
Sougata.
2007 Oct 24 12:52 PM
move them to charecter field and then use
translate charfield using '. '.
condense charfield no-gaps.
or just multiply by 100.
Regards
vasu
2007 Oct 24 12:52 PM
loop at itab.
REPLACE ALL OCCURRENCES OF '.' IN itab-amount WITH ' '.
condense itab-amount no-gaps.
modify itab.
endloop.
2007 Oct 24 12:52 PM
Hi
Multiply with 100.. it will solve the problem...
Message was edited by:
Rama Jyothi
2007 Oct 24 12:52 PM
move da amount to type c field.
zch = itab-amount .
replace '.' in zch with space.
condense zch.
plz reward points if dis helps
2007 Oct 24 12:53 PM
hi antonis,
in any case the dot in sap represents the comma in our language that is for 10,000 in sap u will get 10.000 so u may not remove if anyway u want to remove that u need to take it as a whole string and loop it and then compare each character with a dot if it is a dot u may not append it else append it.
regards,
sohi
2007 Oct 24 12:55 PM
Hi,
You the below code :
data : num1 type p DECIMALS 2 value '100.00'.
data : num2 type i.
num2 = num1 * 100.
write num2.Thanks,
Sriram Ponna.
2007 Oct 24 12:56 PM
Hi,
data: v1(6) type p decimals 2,
v2(6) type c.
v1 = '100.26'.
v2 = v1.
replace '.' in v2 with ''.
write v2.<b>Reward for helpful answers</b>
Satish
Message was edited by:
Satish Panakala
2007 Oct 24 12:59 PM
Hi Antonis,
loop at itab into wa_itab.
REPLACE ALL OCCURRENCES OF '.' IN wa_itab-amnt WITH ' '.
condense wa_itab-amnt no-gaps.
modify itab from wa_itab.
endloop.
Reward if useful,
Regards,
Chitra
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |