Skip to Content
author's profile photo Former Member
Former Member

function module to convert amount in thousand and lacks

Hi

Can anybody tell me the functional module to convert amount in thousand and lacks .

Regards

Kamal

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 10:25 AM

    hiii

    use SPELL_AMOUNT FM.

    regards

    twinkal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 10:24 AM

    hi,

    i have copied standard and did this......u can use this....

    function zspell_amount.

    *"----


    ""Local Interface:

    *" IMPORTING

    *" REFERENCE(AMOUNT)

    *" EXPORTING

    *" REFERENCE(TEXT)

    *" EXCEPTIONS

    *" NOT_FOUND

    *" TOO_LARGE

    *"----


    • TABLES SPELL.

    &----


    *

    & Data Declaration *

    &----


    *

    data: amount_ch(13) ,

    text1(150) ,

    text2(35) ,

    flag ,

    len type i ,

    move type i .

    data : begin of itab ,

    cr(3),

    lac(2),

    th(2),

    hun(3),

    paise(3),

    end of itab .

    amount_ch = amount.

    len = strlen( amount_ch ).

    move = 13 - len.

    shift amount_ch right by move places.

    move amount_ch to itab.

    write: 'RUPEES' to text1.

    if itab-cr ne '000' and itab-cr ne space.

    perform spellamount using itab-cr 'CRORE' flag text1.

    endif.

    if itab-lac ne '00' and itab-lac ne space.

    perform spellamount using itab-lac 'LAKH' flag text1 .

    • PERFORM SPELLAMOUNT USING ITAB-LAC 'LACS' FLAG TEXT1 .

    endif.

    if itab-th ne '00' and itab-th ne space.

    perform spellamount using itab-th 'THOUSAND' flag text1 .

    endif.

    if itab-hun ne '000' and itab-hun ne space..

    perform spellamount using itab-hun '' flag text1 .

    endif.

    if itab-paise ne '.00' and itab-paise ne space .

    flag = 1.

    perform spellamount using itab-paise 'PAISE' flag text1.

    endif.

    concatenate text1 'ONLY' into text1 separated by space.

    write text1 to text.

    endfunction.

    &----


    *& Form SPELLAMOUNT

    &----


    form spellamount using amount

    unit

    flag

    text1 .

    call function 'SPELL_AMOUNT'

    exporting

    amount = amount

    language = sy-langu

    importing

    in_words = spell

    exceptions

    not_found = 1

    too_large = 2

    others = 3.

    if flag = 0.

    concatenate text1 spell-word unit into text1 separated by ' ' .

    else.

    concatenate text1 'AND' unit spell-word into text1 separated by ' '.

    endif.

    clear spell.

    endform. " SPELLAMOUNT

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 10:27 AM

    Use FM 'SPELL_AMOUNT' or

    ' HR_IN_CHG_INR_WRDS '

    Regards,

    Shailaja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 10:27 AM

    Use SPELL_AMOUNT . But as per Indian format you will need to change in the logik of FM.

    Regards

    Rajesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 10:28 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.