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

Similar Messages

  • "Only" word in cheque printing

    Hi Friendz
    I need help to print "only" word exact after amount in word in cheque print Layout.
    How we can set it?
    In Indian scenario, we need to print only word on cheque after amount in word.
    this functinality is missing in SAP Business one.
    waiting for reply.
    regards
    kamlesh vagal

    hi,
      what we are doing is concating the amount with only Text field. but if you displayed directly it will show without space between amount and only. So you put another textfield in that put dot and concat the threee fields amount field,dot textfield and  only texfield.
    Concat(amount,text1,text2).
    it will work.
    reg
    r.vijai

  • Cashier cannot see the some documents for cheque printing

    Some Payment proposals have been made but the Cashier cannot see the documents for cheque printing. They are showing complete when you check with T.code SWIA.
    What could be the reason?
    Regards,
    Chansa

    Dear  Vivek,
    Yes the cashier cannot see these documents in SBWP.
    regards,
    Chansa.

  • Get numeric values of word spacing displayed?

    while there are two ways to influence the word spacing (by setting the minimum, desired, and maximum values in the Justification settings, and by using the keyboard short cut increasing or decreasing word spacing), I cannot find where the resulting word spaces are displayed as numeric values. Since kerning values are easily looked into, I presume there must be a way to have the word spacing values displayed, too. But how?

    It's not a known item in Javascript -- it would need to be a private property of the Line class, as each single line has its own word spacing adjustment.
    But using two javascripts you can find out how much the space on each line is stretched or compressed.
    First, you need to know the width of a regular space in the font and size (and other parameters as well, such as tracking and horizontal scaling!). Select one single space in Left Aligned text and run this script:
    alert ( app.selection[0].insertionPoints[1].horizontalOffset - app.selection[0].insertionPoints[0].horizontalOffset);
    It will show a popup with a ridiculous exact number. Myriad Pro at 8 pts, for example, gives "0.59828389485676". Now press Ctrl+C to copy this text (I'm not sure if the Mac can do this as well!). Go to another script and paste just the number in there:
    regularWordSpace = 0.59828389485676;
    alert ( 100*(app.selection[0].insertionPoints[1].horizontalOffset - app.selection[0].insertionPoints[0].horizontalOffset)/regularWordSpace);
    If you select any justified space (again, using the same font, size, tracking, whatnot), it'll display a fairly reliable percentage, yeah, unto the seventh generation of exactitude and more.

  • How to create an custom template for cheque printing layout?

    Hi, I have a question about cheque printing format set up in SAP Business One.
    All the the system standard templates in u201CCheque print lay out designeru201Dare u201Ccheque-stub-stubu201D or u201Cstub-cheque-stubu201D or u201Cstub-stub-chequeu201D (three portions). What I need is u201Ccheque-stubu201D (two portions)only. Anyone knows how to create an custom template?
    Thanks.
    Edited by: Angela Zhang on Jan 17, 2010 7:18 AM
    Edited by: Angela Zhang on Jan 17, 2010 7:18 AM

    Hi Angela,
    Check the thread,
    Re: Preprint AP check - stub/check repetitive area fram size
    CHECK PRINTING
    Re: check/cheque for payment printing posting date on stub
    PLD Check-Stub-Stub
    PLD Check
    PLD Multiple Check printing
    Regards,
    Madhan.

  • How to print Spool requests for cheque printing sequentially

    Dear All,
    I am making vendor payments and printing cheques using F-58. It automatically creates a spool requests at the end of the transaction. When i complete all my payments and go to SP01 for viewing spool requests, the last request appears at the top of the list.
    If i select 3 consecutive requests and print them at a time, the last request gets printed first on the first cheque number and the first request gets printed on the last cheque number.
    This results in anomaly in the cheque number assigned in the system and the printed cheque as the last payment is printed on the first cheque.
    I am using dot matrix printer with  page format fixed for cheque specifications. The cheques are printed properly as per the format except the order of printing.
    Kindly let me know how to print multiple requests sequentially from the spool requests list such that the spool request number printed matches with the serial cheque numbers.
    Regards,
    SAP_2009

    Hi,
    I understod your issue.
    Whenever you posted multiple payment documents, and after that if you want to take cheque printouts sequentially by using more spool requests.........there is a way to sort out this issue.
    1) Select all of your spool requests and click on Sort in ascending Order (CtrlShiftF5) and click on Print directly (CtrlShiftF8). By doing this you will get the cheque printouts sequentially according to your payment document sequence.
    Hope this will help you
    Assign ********, if it solved your problem.
    Thanks,
    Srinu

  • How to print the MICR symbols in sapscript for Cheque printing

    Hello All,
    I am working on the cheque printing. I want to display check number with MICR symbols like in the original cheque we have at the footer level the symbols.
    How to print the MICR symbols in the SAP Script. Could anybody please help me out in this issue.
    Thanks

    Hi,
    In This case your Printer should support the E-13B  Charecters.
    Create a ParaGraph with Font family as MICR_E.
    use C for ON-US SYMBOL which is printed at the beginig and end of the Check Number
    ie C&CHECK_NUMBER&C
    then use A for TRANSIT NUMBER  and
    Use D for DASH SYMBOL  in your check.
    then while Printing the check  the original check number will be printed .
    Note: Your Printer should support the E-13B charecters
    Thanks.
    UmaS.

  • Default Printer for Cheque print

    Hi Experts,
    We are using Y forms which are assigned to SAPWIN and we are using SAPWIN as device type. How ever when we are testing cheque print function, the error is coming "Device Type HPLIID does not support YINFORM"
    Is there any place where this default printer is coming up? Even we have this set in our User Master data as LOCAL(assigned to SAPWIN and YFORM), still this issue is coming.
    Tried to search SDN and SAP notes but could not find specific to our issue. Any help are highly appreciated. Thanks in advance.
    Regards,
    Sabita

    Hi,
    Can you tell here this is dmp or leser printer which is going to set. Go in spad and create new printer and check it. If you have any error then mentioned error here.
    Anil

  • Word for Mac print out shrinks using Epson LX 300+

    I've tried adjusting the paper size and margin, the result is the same. Tips?
    I'm using Word for Mac 2011 14.3.9

    I just googled word for mac 2004 and found the requirements "10.2.8 or higher". There were quite a few changes in Snow Leopard, so a lot of applications which still would work with Leopard no longer work with SL. I also checked this site for SL compatibility and it is not even listed:
    http://snowleopard.wikidot.com/start
    Message was edited by: Barbara Daniels1

  • Funtion to write numeric amount in words for printing cheques

    Need to create a report to print cheques. The numeric amount of the cheque needs to written in words also on the line below the payee's name.
    eg. $100 = "One hundred"
    I would like to know if there is a function to do this task.

    Hi,
    Kumar query is right but it will only work for the values between 1 and 5373484.
    Navneet Jain
    [email protected]

  • In F-58 for Cheque printing wrongly the 148008.27 instead of 149300.17

    We are facing the problem while taking the print out in F-58, here are we are getting wrong amount instead of invoice amount.
    Our Scenario is
    1. While creation the purchase order Exchange rate is 46.53610 currency is USD
    2. While posting MIGO Exchange rate is 46.44530  currency is USD here it is taking from standard system from OB08
    3. While posting invoice MIRO Exchange rate is 46,04000 currency is USD, here we are changing the exchange rate manually has per invoice current rate 
    4. If we see the vendor balance 46.4(Exchange rate)
    5. But while taking the print out in F-58, here are we are getting wrong amount instead of invoice amount (Vendor Balance-Currency difference amount).
    Due to this above reason on the cheque system is picking less amount.   
    Can anybody please give me suggestion based on the issue ,weather user is following right method...?
    And also please let me know if you want more information
    Rewords points will add...
    Thanks and Regards
    sudharshana vamsi

    Hi Vamsi,
    Go and ask ABAP person to debug you printing script and check from which table system is getting the value which should be in your case to be picked from vendor balances and rest should be go to price difference account of the difference in GR to IR.
    Note: Please assign valuable points in order to encourage contributors for every useful answer to your queries
    Best Regards,
    Silky

  • How to represent numerical values in words?

    I have a report for purchase order where in the order value to be reprented in words.Hope someone can give me the right method of doing it.
    Thanks
    Jay

    Hi,
    Please refer Re: Installation requires too many services to stop I think the given link has code for both - a function as well as a procedure - should solve your problem
    Thanks,
    Puvan.

  • Need the numeric value of PE_SIZEOF_VALUE_INFO for PEValueInfo StructSize

    Post Author: gnilsen
    CA Forum: Crystal Reports
    I am new to Crystal reports and I'm using the old crpe32.dll to print our reports for our application since we haven't moved to using .NET yet.  So I don't have access to the constant PE_SIZEOF_VALUE_INFO to set to the PEValueInfo.StructSize.  So my question is, what is the value of the PE_SIZEOF_VALUE_INFO constant for the struct PEValueInfo?  I need to know the value so I can set the StructSize.  According to what I have below the StructSize should be set to 311 but I don't know if I can trust that.
    I found these values here http://www.utteraccess.com/forums/printthread.php?Board=63&main=362717&type=post:
    ' Global Const PE_VI_STRING_LEN = 256' Global Const PE_BYTE_LEN = 1
    Global Const PE_WORD_LEN = 2' Global Const PE_LONG_LEN = 4' Global Const PE_DOUBLE_LEN = 8' Global Const PE_VI_STRING_LEN = 256
    PE_SIZEOF_VALUE_INFO = 1 * PE_BYTE_LEN + ' 15 * PEWORD_LEN + ' 2 * PELONG_LEN + ' 2 * PEDOUBLE_LEN + ' 1 * PEVI_STRING_LEN
    Thank you in advance.

    volcanohere wrote:
    I have no intention of learning every bit of code there is in Java.BTW, I doubt there is one person on this planet the knows every bit of code, including the SUN staff who created the language. I looked up those methods in the API. That is what it is there for. If you are incapable of doing the smallest bit of research then you won't succeed for very long. And that doesn't just apply to programming.

  • Print preview for cheque print

    hi experts,
                   How to see the print preveiw for f-58 tcode.

    Hello Priyanka,
    When you complete the transaction F-58, go to transaction code FBZ5 and give the document number which you generate using F-58.
    Please take help from your FI consultant for better result or post the same thread in SAP fi forum.
    Hope this helps.
    Cheers,
    Suvi

  • CHEQUE PRINTING

    Hi experts,
    I need to split a string into characters which are later assigned into a data structure of an internal table.For example,string 'abcd' split into 'a','b','c','d' which is assigned to component1...component2 of a structure.
    What am trying to do is regarding cheque printing,where for an amount in the check I need to write the place values in words.For instance,2561 should be written as :
                     Hundred Million     Ten Million      Million      Hundred Thousand       Ten Thousand       Thousand       Hundred      Tens       Units
                                                                                                                                                                   TWO              FIVE          SIX          ONE
    So I'm splitting the figure into characters and writing a CASE ENDCASE to write in words.
    Someone help me brainstorm on this.

    Given the function text you included, I assume that you have customised one of the APXPBF??.rdf files for your cheque format.
    From the logic in the standard C_WORD_AMOUNT column (APXPBFOR.rdf), the * you are getting is used for padding the value to the width of the layout field that the column is displayed in. If the layout field is 40 characters wide, then you shouldn't be changing the width to 44 in your code.
    Have you checked whether the output file for the request is correct or not? It is possible that it is an issue with printing the file, rather than generating the file.
    If the output file doesn't have the right output, I would suggest that you add some srw.message(0, '<debug message>') type calls at various points in your code - these debug messages will appear in the log file and will help you check the actual content of the word amount column, independently of the formatting used to display it on the output.
    If the problem was with the prt file (which defines the maximum character width of the output for the printer driver), I would have thought that you would be having the concurrent request failing with error (something like "Body does not fit within enclosing object" from memory) rather than just cutting off the results.

Maybe you are looking for

  • [SOLVED] urxvt colors and moc theme

    Hello! I am a KDE user and usually i am using Konsole. For some applications (like htop and moc) i use urxvt (patched version from AUR). The problem is in colors. When i launch moc in Konsole the theme colours are right but not in urxvt too. That hap

  • What's wrong with it?

    my iPod nano is acting funny. I went to go to bed but remembered I needed to charge my nano. When I hooked it up to my computer, it started tweaking. I would see the apple screen flash on and then go away, flash on and then go away, etc. Eventually i

  • Purchase Orders - Subcontracting wrong movement type 545

    First of all this is not about asking a clarification of what is MVT 545 or MVT 543 I'm asking why the system is behaving in this way however there is no BOM for the material or even negative indicator Dears , We are facing a problem regarding subcon

  • ACC custom import settings

    I have asked this before and have never received a responce. Years ago you could set the ACC import settings to always import in mono; I have a hearing disability and need this setting. Apple removed to option of customising the AAC import settings a

  • Trouble with some custom SystemD/User unit files

    Good evening all, I'm trying to move programs out of my .xinitrc file and my window manager's startup hooks into systemd user unit files for ease of management, and hopefully more resilient.  I have followed the setup on the wiki page for SystemD/Use