2007 Apr 06 8:05 AM
Hi All,
I am facing a problem with comma,
The number is coming with comma like 12,000.00
Need to remove the comma for my internal calculation.
Can any one can suggest me any Function module
Available for this.
Regards,
Rajib
2007 Apr 06 8:09 AM
Hi Rajib,
please try this..
data: quant(17) type c.
value from mseg-menge to quant
quant = mseg-menge.
replace ',' with space into quant.
condense quant no-gaps.
Write:/ quant.
2007 Apr 06 8:16 AM
replace ',' with space into quant.
condense quant no-gaps.
Here should take a loop to replace all ','
2007 Apr 06 8:17 AM
Hi,
Look at the function module BAPI_CURRENCY_CONV_TO_INTERNAL
Regards
Sudheer
2007 Apr 06 8:21 AM
Hi Rajib,
I think you probably taking that value from screen and then you are calculating.
Use REPLACE .
replace ',' in x with space.
Regards,
Tanmay
2007 Apr 06 8:29 AM
Hi,
<b>The number always stored internally without ","</b> .
You need not exlicitly remove them.
For ex:
Parameters:
p_pack type p decimals 2.
if we enter <b>12,000.00 it internally stores as 12000.00</b>
What is ur case?? exactly tell me what r u trying to do with that number.??
Ram
2007 Apr 10 8:19 AM
hi,
I am fetching a data from the screen using a function module
called DYNP_VALUES_READ the field name is for PRPS-USR04
for the T-code CJ20n for the user field tab..My requirement is to fetch
the quantity and value and multiply the both and show it the third field
2007 Apr 10 8:30 AM
Hi,
lv_text = 12,000.
CALL FUNCTION 'STRING_REPLACE'
EXPORTING
pattern = ','
substitute = space
changing
text = lv_text
EXCEPTIONS
WRONG_STRING_LENGTH = 1
OTHERS = 2.
reward points if useful.
regards,
santosh
2007 Apr 10 9:51 AM
Hi Rajib,
then this is the solution..
<b>PARAMETERS: P_F1 TYPE P DECIMALS 2.
DATA: W_F1(30) TYPE C.
W_F1 = P_F1.
REPLACE ALL OCCURRENCES OF ',' IN W_F1 WITH SPACE.
CONDENSE W_F1 NO-GAPS.
WRITE W_F1.</b>
2007 Dec 07 1:15 AM
I have this same problem, but some users have as thousand separator the comma ',' and sometimes the '.' dot. How can I make it work for any case?
Thanks!