Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert amount in words in smartforms?

akjayaa
Explorer
0 Kudos

Hello i got the requirement to convert amount in words

1 ACCEPTED SOLUTION

venkateswaran_k
Active Contributor

Hi akjayaa

You can use the following function

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    amt_in_num               =
 IMPORTING
   AMT_IN_WORDS             =
* EXCEPTIONS
*   DATA_TYPE_MISMATCH       = 1
*   OTHERS                   = 2
          .
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
<br>

Regards,

Venkat


7 REPLIES 7

Jeansy
Active Contributor
0 Kudos

Hi,

you can use the function module SPELL_AMOUNT for this purpose. Either you can translate the amount into word already in the print programm and pass it to the Smartforms-function module or you can do it in Smartforms directly (e.g. in a coding block in the Smartforms itself).

Kind regards
Jens

0 Kudos

Hello Mr. Jens Good Morning ,

As per your Guidelines I have used this function module right now ….. but its will not consider the decimal point...

eg 4156.33

Only its will convert 4156 as forty thousand fifty six rupees. not .33 thirty three paisa.

Thank you for your Valuable Times...…

venkateswaran_k
Active Contributor

Hi akjayaa

You can use the following function

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    amt_in_num               =
 IMPORTING
   AMT_IN_WORDS             =
* EXCEPTIONS
*   DATA_TYPE_MISMATCH       = 1
*   OTHERS                   = 2
          .
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
<br>

Regards,

Venkat


Hi Venkat sir Good Morning ,

I Have tried this function Modules its working fine...….

Mikka Mikka Nanri Sir.....

Hi akjayaa

You did not accept my answer - I think You reverted back again. Please check and accept the answer 🙂

0 Kudos

Done Sir ... Thank You so Much Sir

Sandra_Rossi
Active Contributor

Nothing specific to Smart Form, the solution is just plain ABAP. Did you search the forum? There are tens of same questions.