Application Development and Automation 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: 

Need exit for FMX1 to display amount in words

Former Member
0 Kudos
408

Hi Experts,

    Please anyone suggest me the suitable exit to display Grand total in words.Any inputs on this is highly appreciated

    When the user give the wbs element no (or project id) and press enter am populating the dept/fund centre(fistl),

   commitment item(fipex),amount  by using the exit FMRESERV . 

                                    Thanks in advance,

Regards,

kranthikumar.

6 REPLIES 6

Former Member
0 Kudos
327

Hi,

use function SPELL_AMOUNT for converting amounts in words.

It's not clear to me where you want to display it.

Regards,

Adi.

0 Kudos
327

That's the one that I've always used.  As far as i know, Adi's right.

Neal

Former Member
0 Kudos
327

Hi Adrian & Neal white thank for ur quick raply,

   

            we have several technics to display amount in words.Here am searching for exit to display

this  converted text in the fmx1 screen.

                  Anyone  please suggest me any exit  thanks in advance

0 Kudos
327

Hi,

use exit FMRESERV component EXIT_SAPLFMFR_008 in CMOD (include ZXFMCU19 ).

Regards,

Adi.

0 Kudos
327

Thanks Adrian and others too...,

   

                To display the amount in words on to the screen 520 i need one standard field

on that screen. So could u please suggest any field on that screen.If possible post the sample

code also higly  appreciated.

                Thanks in advance,

         

    Regards,

kranthikumar

0 Kudos
327

Hi,

it will be something like this:

IF sy-ucomm = ''. "ENTER FCODE
   data: ls_kbld LIKE LINE OF T_KBLD, l_words TYPE spell.
   LOOP AT T_KBLD into ls_kbld.
     CALL FUNCTION 'SPELL_AMOUNT'
      EXPORTING
        AMOUNT              = ls_kbld-wtges
        CURRENCY          = ls_kbld-WAERS
        FILLER                 = ' '
        LANGUAGE          = SY-LANGU
      IMPORTING
        IN_WORDS          = l_words
      EXCEPTIONS
        NOT_FOUND        = 1
        TOO_LARGE        = 2
        OTHERS              = 3.
     CONCATENATE l_words-word 'and' l_wordsDECWORD INTO ls_kbld-PTEXT SEPARATED BY ' '.
     MODIFY T_KBLD FROM ls_kbld.
   ENDLOOP.
ENDIF.

Regards,

Adi.