Convert Numbers to Words in Check Printing

I am creating my own check template in SAPscript instead of a smartform simply because I did not want/find a driver program for a smartform.  I am a little confused on how to perform ABAP function calls in SAPscript and need some help.  I figure this ABAP code will do the job:
DATA: wa_amt TYPE SPELL.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = 100
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = it_amt
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
          o
                +
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE 'A' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write wa_amt-WORD.
But I think this code is meant for a smartform->program lines.  I want to convert the variable "REGUD-SNETT" from a number to a string of words.
On a side note, how to do I set a break-point in my SAPscript so it enters debug mode after I post the check document in transaction code f-58?

                    ------------------ Amount in words -------------------------------------
/                      &'*** 'SPELL-WORD& &REGUD-WAERS&&' and 'SPELL-DECIMAL(2)'/100 '&*** 
/*                     Example for amount and decimal places in words
/*                     &'*** 'SPELL-WORD& &REGUD-WAERS&&' and 'SPELL-DECWORD' Cents'& *** 
/*                     Example for numbers in words   
/*                     &SPELL-DIG06(6)&&SPELL-DIG05(6)&&SPELL-DIG04(6)&&SPELL-DIG03(6)&&SPELL-D 
If you want to see the details Open F110_PRENUM_CHCK Script and check the window code for Amount in words (Description of window)
If it is useful, please reward me with points.

Similar Messages

  • Convert numbers into words

    i work on release 11i application and converts some reports to run with xml publisher
    i want to convert a total field that exist in po report to words it seems to convert number into words isthat possible i tried to make this in oracle reports and it run successfully but there is a problem when converting that report to run with xml publisher .
    any help will be approtiated.

    Use ap_amount_utilities_pkg.ap_convert_number
    E.g.
    SQL> select ap_amount_utilities_pkg.ap_convert_number(trunc(12345678)) from dual;
    AP_AMOUNT_UTILITIES_PKG.AP_CONVERT_NUMBER(TRUNC(12345678))
    Twelve million three hundred forty-five thousand six hundred seventy-eight
    Gareth

  • Convert numbers to words

    Hello friends i am in search of a programme to convert the number in to words.If u have do post.

    There is more than one language in the world - to convert a number to english is simple - he had not even said, in which language it should be transferred. Especially for large numbers this is important, f.e. an american billion and an european billion is a big difference, because an european billion is an american trillion; an european trillion is a billion american billions and so on.
    greetings Marsian

  • Sap Script - numbers to words without function module

    Moderator message - please use a meaningful subject in future.  I've changed it for you this time.  Also, moved to the correct forum
    Hi Friends,
                       In SAP Script how to convert numbers into  words with out using the function module in the driver program.
    examplae 21 kg  as twenty one kg.
    Please help me to solve this problem.
    Thanks in advance.
    Gayathri S
    Edited by: Matt on Nov 5, 2008 9:15 AM

    Hi,
      In the SAP Script, you can call the perform like below:
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    You can create a separate include or use an existing include related to your script and create the above <form> in that <prog>.
    The syntax for creating the form in the include is as below:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    Example:
    In your script,
    /: PERFORM GET_BARCODE IN PROGRAM ABCDE
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    And in the report ABCDE, create the form like this:
    REPORT ABCDE.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY 'PAGE'.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'NEXTPAGE'.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY 'BARCODE'.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = '|'. "First page
    ELSE.
    OUT_PAR-VALUE = '||'. "Next page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this helps.
    Regards,
    Suganya

  • Convert number to words - eg: 1 should come as "first"

    Hi,
    Is there any function module which would convert numbers to words in a particular format.
    for eg: if input is 2, output should be "second".
              if input is twenty, output should be "twentieth".
              and likewise...
    Thanks in advance,
    Vishnu

    Hi,
    Check this program.
    DATA : gv_words TYPE spell.
    DATA : n    TYPE i.
    DATA : BEGIN OF itab OCCURS 0,
            split(100),
           END OF itab.
    PARAMETERS : a TYPE i.
    CALL FUNCTION 'SPELL_AMOUNT'
      EXPORTING
        amount   = a
      IMPORTING
        in_words = gv_words.
    WRITE: gv_words-word.
    SPLIT gv_words-word AT space INTO TABLE itab.
    DESCRIBE TABLE itab LINES n.
    READ TABLE itab INDEX n.
    PERFORM change_num.
    CLEAR: gv_words.
    LOOP AT itab.
      IF sy-tabix EQ 1.
        CONCATENATE gv_words-word itab-split INTO gv_words-word.
      ELSE.
        CONCATENATE gv_words-word itab-split INTO gv_words-word
                                      SEPARATED BY space.
      ENDIF.
    ENDLOOP.
    WRITE: gv_words-word.
    *&      Form  change_num
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM change_num .
      IF itab-split CS 'ONE'.
        REPLACE 'ONE' IN itab-split WITH 'FIRST'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'TWO'.
        REPLACE 'TWO' IN itab-split WITH 'SECOND'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'THREE'.
        REPLACE 'THREE' IN itab-split WITH 'THIRD'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'FOUR'.
        REPLACE 'FOUR' IN itab-split WITH 'FOURTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'FIVE'.
        REPLACE 'FIVE' IN itab-split WITH 'FIFTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'SIX'.
        REPLACE 'SIX' IN itab-split WITH 'SIXTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'SEVEN'.
        REPLACE 'SEVEN' IN itab-split WITH 'SEVENTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'EIGHT'.
        REPLACE 'EIGHT' IN itab-split WITH 'EIGHTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'NINE'.
        REPLACE 'NINE' IN itab-split WITH 'NINTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'TEN'.
        REPLACE 'TEN' IN itab-split WITH 'TENTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'ELEVEN'.
        REPLACE 'ELEVEN' IN itab-split WITH 'ELEVENTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'TWELVE'.
        REPLACE 'TWELVE' IN itab-split WITH 'TWELFTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'TEEN'.
        REPLACE 'TEEN' IN itab-split WITH 'TEENTH'.
        MODIFY itab INDEX n.
      ELSEIF itab-split CS 'TY'.
        REPLACE 'TY' IN itab-split WITH 'TIETH'.
        MODIFY itab INDEX n.
      ELSE. "IF itab-split CS 'D'.
        CONCATENATE itab-split 'TH' INTO itab-split.
        MODIFY itab INDEX n.
      ENDIF.
    ENDFORM.                    " change_num
    Your requirement is definitley solved with above program
    Regards,
    Bhupal

  • Convert number to words

    is there a way in numbers to convert numbers to words,
    for example"2300" to"two thousand and three hundred".

    Here is a spreadsheet I made to doe this:
    for Numbers 2.x:
    https://www.dropbox.com/s/naooc39djpvn2kk/ValueToText.numbers?dl=0
    for Numbers 3.x:
    https://www.dropbox.com/sh/wz5ejppkbd924mu/AADXJLJ3brHqJL9ts4iq_Kn1a?dl=0
    And a command line application with an Applescript:
    https://www.dropbox.com/s/ajlqxwqbaew5e4m/NumWriterWithScript.zip?dl=0
    See this thread for additional information:
    Return text value of a number

  • How to print numbers in words

    Hello friends,
    How can we print numbers in words like
    800 as Eight Hundred.
    TIA
    shekar.

    See here for some more solutions in english, french and spanish
    Converting a number into world In spanish Language

  • Check printing: Amount in words is getting jumbled

    Hi,
    I have a problem in displaying amount in words in check.
    I am getting the amount in words through functuion module SPELL_AMOUNT correctly,i.e,(for example,110,002 ) ONE HUNDRED TEN THOUSAND TWO.
    After getting the amount,i am concatenating the words 'ONLY'  amount  'RIYALS'.In program it is concatenated correctly.Expected output is RIYALS ONE HUNDRED TEN THOUSAND ONLY.
    But when seen on screen,the words are getting jumbled.
    It is getting displayed as TWO RIYALS ONLY ONE HUNDRED TEN THOUSAND.
    (Note: My form is in arabic,since i want to display vendor name in arabic,and rest of the check in english).
    Please help me with some solution.
    Thanks & Regards
    Seshagiri.

    Hi Dishant,
    Sorry for the delay.I am pasting the code below:
    Code in print program:
    Global data:
    data: gv_riyals(6) value 'RIYALS', "RIYALS
          gv_only(4) value 'ONLY',
          gv_halalas(7) value 'HALALAS',
          gv_and(3) value 'AND'.
    Local data:
            data: lw_dummy(25),
                  lw_fraction(2),   "for fraction part of amount in HALALAS
                  lw_integer type i.
            if spell-decimal is initial.
              clear: spell-decimal, dg_100.
            else.
               lw_integer = spell-decimal / 10.
               lw_fraction = lw_integer.
               concatenate '(' lw_fraction '/100)'
                       into lw_dummy.  " SEPARATED BY space.
               condense lw_dummy.
               clear dg_100.
               dg_100 = lw_dummy.
            if  not spell-word is initial.
              condense spell-word.
              gv_spell_word(50) = spell-word.  "Amount in RIYALS
            endif.
         endif.
              call function 'WRITE_FORM'
                exporting
                  window  = 'PAY_DOC'
                  element = 'PAY_DOC'
                exceptions
                  window  = 1
                  element = 2.
              if sy-subrc eq 2 and
                (  err_element-fname ne t042e-zforn
                or err_element-fenst ne 'PAY_DOC'
                or err_element-elemt ne 'PAY_DOC' ).
                err_element-fname = t042e-zforn.
                err_element-fenst = 'PAY_DOC'.
                err_element-elemt = 'PAY_DOC'.
                err_element-text  = text_530.
    *--Code in the script:
    /:  IF &DG_100& EQ ' '
    L1  &gv_only(C)&,,&gv_riyals(C)&,,&spell-word&
    /:  ELSE
    L1  &gv_riyals(C)&,,&gv_spell_word(C)&
    L1  &gv_only(C)&,,&gv_halalas(C)&,,&dg_100(C)&,,&gv_and(C)&
    /:  ENDIF
    Thanks & Regards
    Seshagiri.

  • India Check printing - words notation issue

    Hello,
    I have a report for check printing for our india localization. I was able to change the words notation to Lakhs and Crores using ap_lookup_codes, lookup_type 'NLS TRANSLATION', but unable to change the way <b>commas</b> are displayed for amount field.
    Eg. an amount of 112476100.48, is displayed as 112,476,100.48 (in words displays as one hundred and twelve thousand four hundred and seventy six one hundred rupees and forty eight paise) whereas for India localization, we need this to be displayed as 11,22,76,100.48 (eleven crore twenty two lakhs seventy six thousand one hundred and forty eight paise)
    Function CHK_DISP
    declare
    l_check_amount varchar2(15);
    l_inr_amount varchar2(15);
    begin
    SRW.REFERENCE(:C_CHECK_AMOUNT);
    SRW.REFERENCE(:C_CURRENCY_CODE);
    SRW.USER_EXIT('FND FORMAT_CURRENCY
    CODE=":C_CURRENCY_CODE"
    DISPLAY_WIDTH="15"
    AMOUNT=":C_CHECK_AMOUNT"
    DISPLAY=":C_CHECK_AMOUNT_DISP"
    MINIMUM_PRECISION=0');
    IF :C_CURRENCY_CODE = 'INR' THEN
    l_inr_amount := to_char(:C_CHECK_AMOUNT, '99,99,99,999.99');
    l_check_amount := replace(rtrim(l_inr_amount),' ','*');
    ELSE
    l_check_amount := replace(rtrim(:C_CHECK_AMOUNT_DISP),' ','*');     
    END IF;
    end;
    This errors out for some reason.
    If I just do a srw.message('6','l_inr_amount: '||to_char((:C_CHECK_AMOUNT, '99,99,99,999.99')); --- this works perfectly fine and displays the required format in log file. Can someone please advice on how to achieve these comma positions for India check printing?
    Thanks in advance
    Hari

    Hi
    Try to use CALL FUNCTION 'SPELL_AMOUNT'  Currecny Key = "USD"  irrespective of the  currency  and then based on the country key or langauge  Concatenate the Currency to the SPELL AMOUNT..
    surya

  • Is there any built in function that prints numbers in words inXMLP

    Hi Team,
    This is regarding SR#3-7005716301 from Syntel Limited.
    Customer is asking Is there any built in function that prints numbers in words in an rtf teamplate using xml publisher?
    For example if the net amount is 100 dollars then it should print "ONE HUNDRED DOLLARS AND ZERO CENTS ONLY"
    Thanks in advance!
    Leo

    I do not know of any function available that lets you print the currency words (dollars, cents etc). Here is a link to a blog post that will allow you to print numbers in words.
    https://blogs.oracle.com/xmlpublisher/entry/numbers_to_words_update
    Thanks,
    Bipuser

  • UFL to convert numbers to Turkish words

    Happy New Years to everyone and all that stuff.
    I have had a look through a couple posts that refer to Turkish characters and a am hoping my idea of
    creating a UFL that converts a number (passed in as a string) and then outputs the Turkish words for
    the number, is possible or atleast on the right track.
    This is my Turkish.properties file
    0=su0131fu0131r
    1=bir
    2=iki
    3=üç
    To get Eclipse to accept these characters I tried setting the encoding to UTF-8 but eclipse said
    UTF-8 conflicts with the encoding defined in the content type (ISO-8859-1)
    Do you with to set it anyways?
    Which I did and it seemed to keep the correct format for all that characters
    I then created my UFL to just take a str_Key which is the number and the resBundleName (Turkish)
    and I output the correct string. Just for testing I only worked with single digit numbers.
    I then made my UFL avaliable to all my reports and created a test report.
    The only problem was when previewing the output, it was no longer the correct UTF-8 characters
    but the incorrect ISO-8859-1 characters ( I assume its this encoding as I tested what happens if
    I save my properties file in that encoding and they seem the same messed up characters)
    I have tried setting the "Text file encoding" for the report (right click - properties) but that makes
    no difference.
    So my question is:
    Is it possible to create a UFL that will convert a number to Turkish words?
    If so, where am I going wrong, is there another encoding setting I need to set?
    Will I have future problems when trying to export to PDF?
    Does anyone else have another idea on how best to convert numbers to Turkish words
    if using a UFL and resource bundle is not the best idea?
    Sorry thats 4 questions not 1 but hey, its my first post of the new year
    Thanks all.

    Thanks Ted,
    I did a simple test (which I really should have done before) where I placed Turkish characters in a report
    formula and it displayed the correct characters, so that confirms what you said in that its not the report
    error, but rather on the java side of things.
    I will try fiddle with things and work out how to get the Java side of things accepting the Turkish characters.
    I might come back here to ask a few questions if I get stuck, so will leave this open as it still deals with the topic.
    Thanks again
    Darren
    Right Ted, thanks for that advice, I have managed to get correct characaters using the \u0131 format
    for example
    0=\u0131
    1=\u00D0
    2=\u00D0\u0131
    Now the big question is where can i find a list of all the Unicode escapes (\u....) for Turkish equivilant?
    Even though this is a real pain, to convert from English to Turkish to Unicode, would have thought
    there would be an easier why, but this does do the job.
    So I will continue looking for a list of all Unicode numbers (any body know if there is a app out there
    that can do it all for  me??)
    Edited by: Darren Jackson on Jan 6, 2009 1:36 PM

  • Trying to get a pdf converted to my word perfect or just plain printed out so I may fill it out!

    I am so technologically illiterate, I do not know how to print the pdf file out or convert it to word document!

    You need to ask in the program forum for the program you use to open the PDF
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Printing Numbers In Words In Purchase Order

    Dear Friends,
    I want to display the total Purchase Order value in words eg- 300.00 as Three Hundred Only, Plz tell me how to do this. Also please tell me from where I will get the Terms & conditions field for PO, I have searched EKKO & EKPO but there is only Terms Key not the Terms & conditions.
    Bye,
    Nishant

    You can use the function module  
    report zrich_0002 .
    tables spell.
    data : t_spell like spell occurs 0 with header line.
    data : pamount like spell-number  value '1234510'.
    sy-title = 'SPELLING NUMBER'.
    perform spell_amount using pamount 'USD'.
    write: 'NUMBERS', t_spell-word, 'DECIMALS ', t_spell-decword.
    *       FORM SPELL_AMOUNT                                             *
    form spell_amount using pwrbtr pwaers.
      call function 'SPELL_AMOUNT'
           exporting
                amount    = pamount
                currency  = pwaers
                filler    = space
                language  = 'E'
           importing
                in_words  = t_spell
           exceptions
                not_found = 1
                too_large = 2
                others    = 3.
    endform.                               " SPELL_AMOUNT
    please reward points for helpful answers and mark post as solved if your problem is solved.  Thanks
    Regards,
    RIch Heilman

  • Conversion of milloin into Laks(in words) on checks

    Hi Experts,
    My client wants amount of laks in words on checks. in standard B1 it prints on check in million e.g. 15,12,225( One million five hundred and twelve thousand two hundred twenty-five Indian Rupee). But my client wants it as 15,12,225 ( fifteen laks, twelve thousands and two hundreds twenty five rupee). They want  that it should print automatically on the checks and they should not provide any UDF's for this. so pls tell me how it is possible?
    Thanks & Regards,
    Pankaj Sharma.

    Hi Sharma,
    Try this,
    ->> Create 1 UDF in Header on Outgoing Payments.
    ->> Create 3 Function in MSSQL Server Management.
    ->> Create 1 FMS in Query Generator and save as Query Manager then Assign to UDF for Amount in Words.
    Create UDF in Header on Outgoing Payments.
    ->> Choose Tools on Top menu.
    ->> User - Defined Fields. -> User Manage Fields.
    ->> Open the User Manage Fields Widnow.
    ->> Payments. -> Title.
    ->> Select Title and Click Add button in Bottom on User Manage Fields Window.
    ->> Create Amount in Words UDF(Code, Discription and Type - Character) and Add the UDF.
    Create Function in MSSQL Server Management.
    Check this Link, (have 3 Functions in Link).
    http://techcreeze.blogspot.com/2008/11/convert-amount-into-words-according-to_15.html
    1st Funciton - to Convert one Digit Number to words
    2nd Funciton - to convert 2 digit number to words.
    3rd Funciton - to convert amt in numbers to words.
    ->> Open the MSSQL Server Management Window.
    ->> Choose your Company database and Create NEW Query.
    ->> Create 3 Function Queries one by one.
    ->> Create 3 NEW Query Tab and 1st one put the 1st Function then Run the Function. and
    2nd New Query tab put the 2nd Function then Run the Function.
    3rd New Query tab put the 3rd Function then Run the Function.
    Create FMS in Query Generator and Save as Query Manager.
    ->> Adminstration.
    ->> Reports. -> Query Generator.
    ->> Open the Query Generator and put the below FMS query.
    SELECT dbo.fNumToWords($[OVPM.CheckSum])
    ->> Assign the FMS in UDF on Outgoing Payments.
    ->> Auto Refresh of REMARKS.
    Ex.
    1. Goto the UDF and Clcik ShiftAltF2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select REMARKS.
    6. Check the Display Saved Values.
    Note: Check Payments should need the Remarks in Comments field because Remarks field is AutoRefresh field.
    IF You will not put the Remarks in Comments field. Amount in Words will not Retrieve(Display) in UDF
    Regards,
    Madhan.

  • Numeric value in words (for Cheque printing)

    Hi All,
    To convert numeric value in words (for Cheque printing), I created two functions in Forms and reports 6i.
    1) FUNCTION Spell (val number) RETURN CHAR IS
    sp varchar2(100);
    BEGIN
    if val > 0 then
         return(initcap(to_char(to_date(val, 'SSSSS'), 'SSSSSSP')));
    else
         return('');
    end if;
    END;
    2) function SPELLED_AMOUNTFormula return Char is
    cents number;
    c_str varchar2(80);
    val number;
    begin
    val := :p_instr_amt;
    cents := (val mod 1) * 100;
    if cents > 0 then --creates string for cents
    c_str := ' and ' || spell(TO_CHAR(cents)) || ' fils Only';
    else
    c_str := ' Only';
    end if;
    if val < 1000 and val > 1 then
    return (initcap(spell(floor(val))) || c_str);
    elsif val > 1000 then
    return(initcap(spell(floor(val/1000))) || ' Thousand ' ||
    spell(floor(val mod 1000)) || c_str);
    else
    return('Zero'||c_str);
    end if;
    end;
    This convert value up to thousands. How to convert the value more than 1 lac. please configure this code.
    Thanks in advance

    Hi,
    To spell integers as high as 5,373,484, use 'Jsp' instead of 'ssssssp'.
    TO_CHAR ( TO_DATE ( n     -- n = integer to be spelled
                  , 'J'
         , 'Jsp'          -- Case-sensitive
         )5373484 is the Julian date of December 31, 9999, the latest DATE value in Oracle. In Oracle 10.2, you can actually spell numbers a little bit higher using the expression above, but I'm not sure why, and I wouldn't count on being able to do so in future versions.
    There's no need for INITCAP here. If the 2nd argument to TO_CHAR is initcapped (as above), then the output will be, too.
    To spell even larger numbers, see this page by Tom Kyte, which also includes languages other than English, and lakh-crore-arab-kharab wording.
    Edited by: Frank Kulash on Oct 13, 2012 7:21 AM

Maybe you are looking for