2008 Dec 10 7:20 AM
Hi all I have a string and I want to convert it to currency type field.
Example :
STRING = '11243.56'.
convert to :
CURRENCY = '112,43.56'.
Thanks in advance.
Hi all I have a string and I want to convert it to currency type field.
Example :
STRING = '11243.56'.
convert to :
CURRENCY = '112,43.56'.
Thanks in advance.
2008 Dec 10 7:26 AM
Hi,
Did you check this thread??
Have a look at this search result also.
https://www.sdn.sap.com/irj/scn/advancedsearch?query=convertstringtocurrency&cat=sdn_all
Thanks
Nitesh
2008 Dec 10 7:40 AM
2008 Dec 10 8:58 AM
Hi Rock,
Check this code snippet. Hope it will clarify your doubt.
DATA: num TYPE p DECIMALS 2.
CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
EXPORTING
string = '45454545455.00'
decimal_separator = '.'
thousands_separator = ','
IMPORTING
betrg = num .
IF sy-subrc <> 0.
ENDIF.
WRITE num left-justified.
Let me know if there is any issue.
Thanks
Nitesh
2008 Dec 20 8:17 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |