Skip to Content
avatar image
Former Member

How to convert the text field into currency field

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • May 15, 2006 at 12:31 PM

    HI Sabari,

    try using the function module: HRCM_STRING_TO_AMOUNT_CONVERT

    REgards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 15, 2006 at 12:33 PM

    hi

    use

    <b>PSSV_TEXT_INTO_FIELD_CURRENCY</b>

    plz reward helpful posts

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 15, 2006 at 12:35 PM

    Hi,

    Check this FM: <b>PSSV_TEXT_INTO_FIELD_CURRENCY</b>.

    Thanks and Regards,

    Bharat Kumar Reddy.V

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.