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 total amount into words in sap script in ZMEDRUCK form

Former Member
0 Kudos

Hi ABAPers,

    How to convert total amount into words in purchase order form. My requirement is that In ME23N when we click on print preview button in Purchase Order total net value amount comes in words format using HR_IN_CHG_INR_WORDS function module.

   What i have done is i have copied MEDRUCK as ZMEDRUCK . i have written  sub routine but i am not able to get the proper result in footer window i need to show the amount in words format.

please can you help me out how to write sub routine and how to use it sap script. Thanks in advance....

Thanks & Regards,

VInay Kumar.

Moderator message : Not enough re-search before posting, discussion locked.

Message was edited by: Vinod Kumar

3 REPLIES 3

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Use the function module SPELL_AMOUNT in this subroutine. Remember quantities in SAPscript are char, not numeric during the interface with the subroutine, so, translate it to number in the subroutine before to pass it to the function module.Take in account SAP Note 939145 - SPELL_AMOUNT: What it can do and what it can't.

I hope this helps you

Regards

Eduardo

Former Member
0 Kudos

Hi Vinay ,

try this below FM ....

DATA : WORDS       TYPE SPELL,

       WORDS_SPELL TYPE CHAR1024.

DATA : NO TYPE I VALUE '231620.00'.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

   AMOUNT          = NO

*   CURRENCY        = ' '

*   FILLER          = ' '

*   LANGUAGE        = SY-LANGU

IMPORTING

   IN_WORDS        = WORDS

* EXCEPTIONS

*   NOT_FOUND       = 1

*   TOO_LARGE       = 2

*   OTHERS          = 3

          .

WRITE : WORDS-WORD.

Hope this will help ....

Regards,

AKS

Former Member
0 Kudos

Check out SAPscript F110_PRENUM_CHCK, window CHECKSPL.