05-15-2006 1:29 PM
Hi,
I have an requirement to converting the text field into currency.
If I convert directly it gives dump.
If I convert this to Numeric means it takes the decimals also as whole value.
Is there any FM to convert the text field into Currency field.
Please advice me.
Thanks in advance.
05-15-2006 1:31 PM
HI Sabari,
try using the function module: HRCM_STRING_TO_AMOUNT_CONVERT
REgards,
Ravi
05-15-2006 1:33 PM
hi
use
<b>PSSV_TEXT_INTO_FIELD_CURRENCY</b>
plz reward helpful posts
05-15-2006 1:35 PM
Hi,
Check this FM: <b>PSSV_TEXT_INTO_FIELD_CURRENCY</b>.
Thanks and Regards,
Bharat Kumar Reddy.V
07-17-2006 10:53 AM
Hi,
I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
But I also need to transfer a string value like '12,99' to a field with type curr.
Can i Do that manually, or is there another FM?
I have already checked code with write to or pack/unpack.
But without success yet.
Something like this:
DATA: g_str(11) type c.
DATA: g_p type p.
WRITE '12,99' TO g_str CURRENCY 'EUR'.
is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
also: PACK g_str to <curr-field or g_p> dumps.
Help appreciated.
regards, matthias
07-17-2006 11:14 AM
ok - found a workaround. If the given input number uses '.' istead of ',' I can do direct convert from string to curr.
thnx anyway,
matthias
02-09-2009 10:08 AM
try this code....
definitely it will work
data:V_AMOUNT TYPE STRING VALUE '23,45,.90',
V_AMOUNT1(20) TYPE C,
V_NETWR LIKE REGUD-SWNES.
replace all occurences of ',' in v_AMOUNT with space.
CONDENSE v_AMOUNT NO-GAPS.
WRITE V_AMOUNT TO V_AMOUNT1 DECIMALS 2.
V_NETWR = V_AMOUNT1.