I've developed classes to convert amount into it's phrase representation

Hi everybody!
Example:
Number 25 can be converted into the phrase "twenty five"
or even into "twenty five Canadian Dollars" for english language, Canadian currency
This functionality can be supplied for major languages like Russian, German,
Spanish. French, Chinese, Hindi etc. All of these languages might have their
own specifics.
In future end-users will to be able to use this functionality via Web-services.
I also look forward to find reliable web site where We can host this web service and front-end servlet which will show this phrase based on { amount, language, currency } selected. That everybody can recieve it electronically via xml request or just copy result phrase from web page . Please send me a list of companies who potentially interested to host it including detailed info of Company/Persons name and his/her e-mail if possible.
I'm going to post them at apache.org but for now I've attached source code below
for your feedbacks and if somebody wants to join to me to implement some languages like french, spanish etc. Currency feature will be ready when I have more languages supporrt.
Author Igor Artimenko my e-mail is <[email protected]>
package org.apache.bussinessapi.test;
import org.apache.bussinessapi.AmountByWord;
* Test case prototype
* @author Igor Artimenko <[email protected]>
* @version 1.0 Initial draft for review
* Created on Jun 5, 2003
public class TestAmountByWord
     public TestAmountByWord()
          double array[] = { 123456789777L, -627845, 300.84, 670, 30, -100, -56879, 1008, 37, 205100, 0, 3000.67 };
          AmountByWord amountByWord = new AmountByWord();
          amountByWord.setLanguage( "en" );
          amountByWord.setCurrency( "en" );
          for (int i = 0; i < array.length; i++)
               System.out.println( array[ i ] );
               try {
                    System.out.println( amountByWord.getAmountByWord( array[ i ] ) );
               } catch (Exception e) {
                    e.printStackTrace();
               System.out.println( "---------------------------------" );               
     public static void main(String[] args)
          TestAmountByWord test = new TestAmountByWord();
package org.apache.bussinessapi;
* Usially used class to get string representation of the number
* in the human-readable format
* @author Igor Artimenko <[email protected]>
* @version 1.0 Initial draft for review
* Created on Jun 5, 2003
public class AmountByWord implements IAmountByWord
     private String language;
     private String currency;
     private String amountByWord;
     * Constructor AmountByWord
     public AmountByWord()
          super();
     * Method getAmountByWord is the most important method
     * @param amount to be represented in the human-readable format
     * @return String the phrase representation of number
     public String getAmountByWord( double amount ) throws Exception
          StringBuffer resultAmount = new StringBuffer();
          IAmountByWord amountByWord = null;
          //     First, create an appropriate instance
          try
               if ( language == null )
                    throw new Exception( "Language has not been assigned yet" );                    
               else if ( currency == null )
                    throw new Exception( "Currency has not been assigned yet" );                    
               Class cl = Class.forName( "org.apache.bussinessapi.AmountByWord".concat( language ) );
               try
                    amountByWord = (IAmountByWord) cl.newInstance();
               catch ( InstantiationException e )
                    throw new Exception( "can not be instantiated" );
               } // catch
               catch ( IllegalAccessException e )
                    throw new Exception(
                         "IllegalAccessException arrised during instantiating of " );
               }     // catch
          } // try
          catch ( ClassNotFoundException e )
               throw new Exception( "Class could not be found " );
          } // catch
          // for now the number only
          return amountByWord.getAmountByWord( amount );
     * Method getMoneyAmountByWord is the most important method
     * @param amount to be represented in the human-readable format
     * @return String the phrase representation of number
     public String getMoneyAmountByWord( double amount ) throws Exception
          StringBuffer resultAmount = new StringBuffer();
          IAmountByWord amountByWord = null;
          //     First, create an appropriate instance
          try
               if ( language == null )
                    throw new Exception( "Language has not been assigned yet" );                    
               else if ( currency == null )
                    throw new Exception( "Currency has not been assigned yet" );                    
               Class cl = Class.forName( "org.apache.bussinessapi.AmountByWord".concat( language ) );
               try
                    amountByWord = (IAmountByWord) cl.newInstance();
               catch ( InstantiationException e )
                    throw new Exception( "can not be instantiated" );
               } // catch
               catch ( IllegalAccessException e )
                    throw new Exception(
                         "IllegalAccessException arrised during instantiating of " );
               }     // catch
          } // try
          catch ( ClassNotFoundException e )
               throw new Exception( "Class could not be found " );
          } // catch
          // for now the number only
          return amountByWord.getMoneyAmountByWord( amount );
     * getCurrency Method
     * @return To retrieve currency code currently used
     public String getCurrency()
          return currency;
     * getLanguage
     * @return To retrieve Language locale code currently used
     public String getLanguage()
          return language;
     * setCurrency
     * @return To setup Currency locale code to be used
     public void setCurrency( String currency )
          this.currency = currency;
     * setLanguage
     * @return To setup Language locale code to be used
     public void setLanguage( String language )
          this.language = language;
package org.apache.bussinessapi;
import java.util.Properties;
* The purpose is to return string representation on the number
* in the human-readable format based on English grammar
* Generally you can use this class as a base for your own language
* like Russian, German, Spanish, French etc.
* They must implement IAmountByWord interface
* @author Igor Artimenko <[email protected]>
* @version 1.0 Initial draft for review
* Created on Jun 5, 2003
public class AmountByWorden implements IAmountByWord
     final private Properties langTokens = new Properties();
     AmountByWorden()
          langTokens.put( "0", "zero" );          
          langTokens.put( "1", "one" );
          langTokens.put( "2", "two" );
          langTokens.put( "3", "three" );
          langTokens.put( "4", "four" );
          langTokens.put( "5", "five" );
          langTokens.put( "6", "six" );
          langTokens.put( "7", "seven" );
          langTokens.put( "8", "eight" );
          langTokens.put( "9", "nine" );
          langTokens.put( "10", "ten" );
          langTokens.put( "11", "eleven" );
          langTokens.put( "12", "twelve" );
          langTokens.put( "13", "thirteen" );
          langTokens.put( "14", "fourteen" );
          langTokens.put( "15", "fifteen" );
          langTokens.put( "16", "sixteen" );
          langTokens.put( "17", "seventeen" );
          langTokens.put( "18", "eighteen" );          
          langTokens.put( "19", "nineteen" );
          langTokens.put( "20", "twenty" );
          langTokens.put( "30", "thirty" );
          langTokens.put( "40", "fourty" );
          langTokens.put( "50", "fifty" );
          langTokens.put( "60", "sixty" );
          langTokens.put( "70", "seventy" );
          langTokens.put( "80", "eighty" );
          langTokens.put( "90", "ninety" );
          langTokens.put( "100", "hundred" );          
          langTokens.put( "1000", "thousand" );
          langTokens.put( "1000000", "million" );
          langTokens.put( "1000000000", "billion" );
          langTokens.put( "1000000000000L", "trillion" );
          langTokens.put( "minus", "minus" );
          langTokens.put( "and", "and" );
          langTokens.put( "point", "point" );
     /* (non-Javadoc)      
     * It does not yet working. Proper implementation coming soon.
     * @see org.apache.bussinessapi.IAmountByWord#getAmountByWord(double)
     public String getAmountByWord( double amount ) throws Exception
          NumberByWord numberByWord = new NumberByWord();
          StringBuffer fullNumber = new StringBuffer();
          numberByWord.setLanguageTokens( langTokens );
          // also should be replaced by full phrase
          fullNumber = fullNumber.append(
                    numberByWord.getNumberByWord( (long) amount ).trim() );
          // for now 2 numbers after .
          int theRest = (int) ( ( amount - (long) amount ) * 100 );
          if ( theRest != 0 )
               fullNumber.append( " " ). append( langTokens.get( "point" ) ).
                         append( " " ).append(     
                         numberByWord.getNumberByWord( (long) theRest ).trim() );
          return fullNumber.toString();           
     /* (non-Javadoc)      
     * It does not yet working. Proper implementation coming soon.
     * @see org.apache.bussinessapi.IAmountByWord#getMoneyAmountByWord(double)
     public String getMoneyAmountByWord( double amount ) throws Exception
          NumberByWord numberByWord = new NumberByWord();
          StringBuffer fullNumber = new StringBuffer();
          numberByWord.setLanguageTokens( langTokens );
          // also should be replaced by full phrase
          fullNumber = fullNumber.append(
                    numberByWord.getNumberByWord( (long) amount ).trim() );
          // for now 2 numbers after .
          int theRest = (int) ( ( amount - (long) amount ) * 100 );
          if ( theRest != 0 )
               fullNumber.append( " " ). append( langTokens.get( "point" ) ).
                         append( " " ).append(     
                         numberByWord.getNumberByWord( (long) theRest ).trim() );
          return fullNumber.toString();           
package org.apache.bussinessapi;
* Each class created for the purpose of giving back
* a string representation of the number MUST implement this interface
* @author Igor Artimenko <[email protected]>
* @version 1.0 Initial draft for review
* Created on Jun 5, 2003
public interface IAmountByWord {
     * getMoneyAmountByWord The purpose of this method is to return
     * string representation on the number in the human-readable format
     * in a regular format ( like 25.78
     * "twenty five point seventy eight" )
     * @param anAmount to be converted into it's string representation
     * @return A string representation of the number
     * @throws Exception if something went wrong
     public String getAmountByWord( double anAmount ) throws Exception;
     * getMoneyAmountByWord The purpose of this method is to return
     * string representation on the number in the human-readable format
     * in a money format like ( 25.78 Can
     * "twenty five Canadian Dollars and seventy eight Cents" )
     * @param anAmount to be converted into it's string representation
     * @return A string representation of the number
     * @throws Exception if something went wrong
     public String getMoneyAmountByWord( double anAmount )
               throws Exception;
package org.apache.bussinessapi;
import java.util.*;
* This class implements generic algoritm of converting a number into
* human-readable format.
* @author Igor Artimenko <[email protected]>
* @version 1.0 Initial draft for review
* Created on Jun 5, 2003
* You can use getNumberByWord method
* if your language fits into this algorithm or
* extend from this class and make some transformations in the child
* method.
* Don't forget to setup language Tokens
* via setLanguageTokens method call first
public class NumberByWord
     private Properties langTokens = new Properties();
     * Constructor for NumberByWord.
     public NumberByWord()
          super();
     * Method getNumberByWord. The most important method.
     * Standard actions are here
     * @param amount Accepts only mathematical integer
     * @return String representation of this phrase
     public String getNumberByWord( long amount )
          StringBuffer strNumberByWord = new StringBuffer( "" );
          SortedMap smallAmounts = new TreeMap();
          String str = new Long( Math.abs( amount ) ).toString();
          int currentPosition = str.length();
          long currentThousand = 1;
          // break by thousands
          while ( currentPosition > 0 )
               smallAmounts.put( new Long( currentThousand ), new Integer(
                         str.substring( Math.max( 0, currentPosition - 3 ),
                         currentPosition ) ) );               
               strNumberByWord.insert( 0,
                    getSmallest( (Integer) smallAmounts.get( new Long( currentThousand ) ) ) +
                    ( currentThousand == 1 ? "" : " " +
               langTokens.getProperty( new Long( currentThousand ).toString() ) ) );
               currentPosition -= 3;     
               currentThousand *= 1000;
          if ( amount == 0 ) {
               strNumberByWord.append( langTokens.getProperty( "0" ) );
          else if ( amount < 0 )
               strNumberByWord.insert( 0, langTokens.getProperty( "minus" ) );
          return strNumberByWord.toString().trim();
     * @param smallNumber this number must in the range from 0 to 999
     *      inclusive
     * @return String representation of this number
     public StringBuffer getSmallest( Integer smallNumber )
          StringBuffer smallestNumberByWord = new StringBuffer( "" );
          int hundreds = (int) ( smallNumber.intValue() / 100 );
          int dozens = (int)( ( smallNumber.intValue() - hundreds * 100 ) / 10 );
          int rest = smallNumber.intValue() - hundreds * 100 - dozens * 10;
          // using smallNumber create small phrase
          // Let's compund the phrase itself
          if ( hundreds > 0 ) {
               smallestNumberByWord.append( " " ).append(
                         langTokens.getProperty( new Long( hundreds ).toString() ) ).append( " " ).append(
                         langTokens.getProperty( new Long( 100 ).toString() ) );
          Object obj = langTokens.getProperty( new Long( dozens * 10 + rest ).toString() );
          // is atomic like 15 juust substitute
          if ( dozens * 10 + rest != 0 )
               if ( obj != null )
                    smallestNumberByWord.append( " " ).append( obj );
               else
                    smallestNumberByWord.append( " " ).append(
                              langTokens.getProperty( new Long( dozens * 10 ).toString() ) ).
                              append( " " ).append(     langTokens.getProperty( new Long( rest ).
                              toString() ) );
          return smallestNumberByWord;
     * setLanguageTokens Use before making call to getNumberByWord
     * @param langTokens Properties of language token used by
     * particular language
     public void setLanguageTokens( Properties langTokens )
          this.langTokens = langTokens;
----------------------------------------------------------------------------------

Hi Hoos!
I found a host for that project. It's called valia at sourceforge.net.
We have already about 7 developers ( English, Russian, French, German, Italian, Arabic, Hindi, Traditional Chinese ). We are looking for guys with Spanish and Japanese.
Also if you want we can expand our support for Persian you are very welcome to join. It's usially small job, just replace one, two etc by your spoken language plus coding of grammar exceptions.
Withregard of applicability we are making first version to be working for even small j2me. So you can integrate it to everywhere including cell phones. But major goal is for bussiness apps & web services, possibly entertainements.
Would you reply to me if you wanted to join at [email protected]
Have a great day
Igor Artimenko
valia, Project Manager

Similar Messages

  • PE51 convert amount into words and concatenate the value with cents

    Hi gurus,
    I'm facing a problem in PE51...
    I have this amount: 655.690,32
    And it should appear in the form like this Example:
    Six hundred and fifty five thousand six hundred and ninety Dollars and Thirty-two cents.
    In PE51 I have two options:
    - Numbers in words (w/o DP) - give me the first underlined part
    - Numbers in words(only DP) - give me the second underlined part
    But I need to find a way to show then like in the example... The first and second part should appear together like if they were concatenated separated by space.
    Thanks in advance.
    PC

    You move the v_tot_comm into an Integer and try so that u will only get SPEELING of that value.
    For example pass only 23,492 instead of 23,492.58 and for 58 paise you do your string manipulation work.

  • Converting the amount into words in different languages

    Hi All,
    Is there any FM to convert the amount into words in a specific language.
    SPELL_AMOUNT FM is not working for some of the languages like portuguese, etc..
    Any idea on this.
    Thanks in Advance.

    Hi,
    Use the FM:
    CALL FUNCTION <b>'Y_AMOUNT_IN_WORDS'</b>
    Hope it helps.
    Reward if helpful.
    Regards,
    Sipra

  • How to Download the development class into Hard disk

    Hi Experts,
    i have same problem in package, i want save these objects like data dictionary objects,programs,includes,messages class, class library and etc...
    save into local disk.
    pls give the step by step process
    thanks for advance,
    venu m

    Hi venu,
    <b>Download Program from a Development Class:</b>
    First check in tadir that the given package is valid
    SELECT SINGLE devclass FROM tadir INTO ws_devclass WHERE devclass = p_devcls.
    Select all the records from TADIR table where OBJECT = 'FUGR' and PGMID = 'R3TR '.
    In this way u can get all the FUnction group for that package.
    For getting the function module under the function module use the FM RS_FUNCTION_POOL_CONTENTS to get all the function module under the Function group.
    Usign the table tfdir get the program name of the Function module.
    Using the FM 'GET_INCLUDETAB' get all the includes
    for that PRogram name.
    Loop at the internal table which you got from the function module.
    Use the READ REPORT prog INTO itab.
    Download the contents to the place where you want.
    Also refer:
    http://www.sap-img.com/abap/download-and-upload-your-abap-program.htm
    Hope it is helpful.
    Manish
    Message was edited by:
            Manish Kumar

  • Convert total amount into words

    Hi
    My requirement is to convert total amount into words.
    For this i used function module SPELL_AMOUNT.
    But its giving wrong (i.e. problem is in the paise).
    I tried with other function module also, its not giving output.
    how i can get exactly correct output.
    Reward points if helpful.

    Hi
    execute this code .
    REPORT  ZCOVERTION.
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER  VALUE '23.45'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD ,'and', T_SPELL-DECWORD.
    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
    Hope this will solve ur problem
    Thanks
    Krushna
    oputput:

  • Importing development class into SAP from out site

    Hi Guys,
    I am integrating SAP-GIS Using Smallworld business integrator 4 for SAP.
    In the doumentaion they asked to import
    K900363.DEV
    D900363.DEV
    R900363.DEV
    into SAP from SBI4 with TR
    All development classes are located in one single transport request:
    DEVK900363.
    can any body tell me what is the procedure to do in SAP.
    how to import into SAP Development class?
    thanks in advance.
    rgdasari

    Dear Prasada,
      The document what we got with SBI4(integrator for SAP and Smallworld)is giving below. full description giving below.I am a ABAP with BAPI Consultant.I don't have BASIS knowledge.if possible pls send me in detail where we need to which TRCOD we need import those .dev files and how to create ne Dev clall with Given TR requerst..ect..
    Importing the Business Integrator source files You import the Business Integrator sources for SAP as transport files. To transport development objects from one SAP system to another, you create a Request. Different kinds of requests exist. Change Requests usually transport
    changes from one known system into another in a known Target Transport Layer. This is the usual method in an SAP environment in which you have a development system, a quality system and a production system. For the Business Integrator SAP sources, Transport of Copies is used. All objects from the Business Integrator are included in the development classes ZPLUG, ZPL_DDIC, and ZPLUG_EXT. They are packed in one single transport file. Ask your SAP system administrator to import the files into the SAP environment.When you import copies into different systems, in the development class, the properties TRANSPORTLAYER and HOMESYSTEM do not change. You must change them manually using transaction SE03 (Transport Organiser Tools). Select CHANGE OBJECT CATALOG ENTRIES and select R3TR DEVC xxx (xxx stands for the development class, for example, ZPLUG). Press F8 to change the TransportLayer, the owner, and the home system of the development class. Repeat this for all three
    development classes (ZPLUG, ZPL_DDIC and ZPLUG_EXT).

  • How to develope application for converting excel data into oracle database

    I am very new to the oracle world. I want to develop application for converting excel sheet into oracle database using oracle forms. I have basic knowldge of oracle but i am totally new to the forms. Can anybody tel me step by step procedure to do this task? Please help me out in this problem.
    Thanx in advance.

    Hello,
    just do a "Search" in this forum with words "excell to oracle"... and you could find lot of posts about that, i.e.:
    Re: How to load excel-csv file into oracle database
    Jose L

  • Converting USD amount into word

    Hi,
      I want to convert amount which is in USD into word  i am using below FM
    CALL FUNCTION 'SPELL_AMOUNT'
        EXPORTING
          amount          = dmbtr
          currency        = waers
        FILLER          = ' '
          language        = langu
        IMPORTING
          in_words        = spell
        EXCEPTIONS
          not_found       = 1
          too_large       = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
    now my DMBTR  amount is 21960.00    which is atually 219.60 USD  but in dmbtr initially amount is coming as 21960.00  and when i convert it to word  it is coming as  USD : TWO HUNDRED NINETEEN,  AND CENTS AS SIX THOUSAND,  but acutally it should be  USD DOLLAR TWO HUNDRED NINETEEN AND CENTS SIXTY ONLY,    it is not coming peoprly  so is there any other functionn module for this to convert USD , JPY into word.
      regards,
       zafar

    Hi,
    Assign dmbtr to type PAYR_FI-RWBTR.
    PARAMETERS:   dmbtr type PAYR_FI-RWBTR.
                             OR
    If you didnt get from this try by using type P
    PARAMETERS:   dmbtr type P.
    Regards,
    kalandar
    Edited by: kalandar on Jun 16, 2010 9:48 AM

  • Converting milliseconds into formatted HHh MM' SS''

    Is there an example of a NumberFormat class that converts a certain amount of milliseconds, say 2374894 into hours, minutes, and seconds like this: HHh MM' SS''?

    That is the approach I was taking before, but the specification requires that I use a NumberFormat class. No strings allowed...
    I have the logic created (this is not in Java):
    public function formatDuration():String
       var convResult:Number = 0;
       var hours:Number = 0;
       var minutes:Number = 0;
       var seconds:Number = 0;
       var minutesString:String;
       var secondsString:String;
       hours = parseFloat(integerFormat.format(durationMs / 3600000));
       convResult = (summaryData.durationMs / 3600000) - hours;
       minutes = parseFloat(integerFormat.format(convResult * 60));
       convResult = (convResult * 60) - minutes;
       seconds = parseFloat(integerFormat1.format(convResult * 60));
       minutesString = minutes.toString();
       if(seconds<10)
          secondsString = "0" + seconds.toString();
       else
          secondsString = seconds.toString();
       if(durationMs >= 3600000)
          return hours + "h" + minutesString + "'";
       else
          return minutesString + "'" + secondsString + "''";
    }

  • I finished making an animated .gif image in FireWorks. My question is, how do I convert it into video so that when I edit video, that every video editing program recognizes it? Long story short, How do I convert animated .gif files into video formats?

    I worked in Adobe FireWorks to make the animated .gif. What program do I use to convert the file from .gif to any video format: .mp4, .m4v, .avi, .wmv, etc. I want to convert it into video format, so that QuickTime Player plays the video, I can insert it into iMovie '11 and edit, and also insert it into Final Cut Pro X and edit video.

    Thanks for getting back with me so promptly.  It has taken me this time to connect with the proper people to find out the information you requested.
    The camera used to film the class was a Panasonic AG-HMC40P, owned by a local cable TV station; they use Kodak video encoding software, and a SD card was used to store the video.   The file extension is .mts, and the mime file is MPEG 2 transport.  He said I probably need an AVCHD converter, and the Mac app store lists 8 of those options, 4 free and 4 for up to $9.99.  He said I'll also need a converter for later plans of posting on YouTube or on the website, and while some of those in the app store might work for the later needs, he knows one app called "Compressor" that would work for the uploading later.  He also suggested I could try renaming the .mts file to .MP2T, but he wasn't sure that would work.
    They don't work with Macs at the studio, but I had thought I could have some lessons there in editing, and apply what I learned to my iMac and iMovie.
    First, though, I have to be able to see it and review it!
    Thanks again!

  • Generic Repository class to download BSP into Ms-excel

    Hi,
    we have developed the download utility for BSP-MVC application, we have many BSP-MVC applications so i have to  develop a generic Repository class to download BSP into ms-excel, which is usable for all, the data selection will be done from model at run time by using techniques (field symbols and data references)wolud you please suggest how to achive this.
    Thanks in advance !
    best regards
    ravi

    I have written a generic download utility as a custom BSP Extension Element.  Perhaps it will give you some ideas:
    <a href="/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table a BSP Extension for Downloading a Table</a>
    <a href="/people/thomas.jung3/blog/2005/07/18/bsp-extension-for-downloading-a-table-applying-an-iterator Extension for Downloading a Table: Applying an Iterator</a>

  • Converted WSDL into .java-files - and now?

    I should implement a client for an existing web service. All I have is a .wsdl-file of the web service to call.
    Therefore I used the eclipse's functionality to convert .wsdl into .java files, which generated some files for me, for example:
    - interface XXX extending java.rmi.Remote
    - interface XXXService extends javax.xml.rpc.Service
    - class XXXProxy implements XXX
    - class XXXServiceLocator extends org.apache.axis.client.Service
    - class XXXSoapBindingStub extends org.apache.axis.client.Stub implements XXX
    - class XXXRfcException extends org.apache.axis.AxisFault implements java.io.Serializable
    - class XXXRfcExceptions implements java.io.Serializable
    My question... what to do now? How can I get the service and call its functionality?
    Your help is really, REALLY appreciated...

    Hi,
    Write client application like below.
    public class Client{
    public static void main(String [] args) throws Exception {
    // Make a service
    XXXService service = new XXXServiceLocator();
    // Now use the service to get a stub which implements the SDI.
    AddressBook port = service.getAddressBook();
    // Make the actual call
    Address address = new Address(...);
    port.addEntry("Russell Butek", address);
    Thanks&Regards,
    M.Kumaraswamy.

  • How to convert BufferredImage into FopImage? need help

    Hi All;
    Following shows my code, but this this a classCast Exception when converting BufferredImage into FopImage? can anybody help me please?
    RenderedImage img1 =  (RenderedImage)JAI.create("ImageRead","D:\\PROJECT\\ReportDesigner\\Bitmap_Support\\Bitmap support\\report_designer_graphics\\FNDBAS\\FND_SESSION_REP\\IFSlogbw_16.bmp");
                RenderedImageAdapter ria = new RenderedImageAdapter(img1);
                BufferedImage bi = ria.getAsBufferedImage();
                FopImage img = (FopImage.)bi.getGraphics();Regards
    madumm

    thanx friends for reply,
    but my problem is small big.
    i can't chang my server stream........it is sending and receiving through DataOutputStream and DataInputStream but i m doing serializing through below code of ChatUtil class ......
    public static byte[] objectToBytes (Object object) throws IOException
              java.io.ObjectOutputStream out;
              java.io.ByteArrayOutputStream bs;
              bs = new java.io.ByteArrayOutputStream ();
              out = new java.io.ObjectOutputStream (bs);
              out.writeObject (object);
              out.close ();
              return bs.toByteArray ();
    public static Object bytesToObject (byte bytes[]) throws IOException,ClassNotFoundException
              Object res;
              java.io.ObjectInputStream in;
              java.io.ByteArrayInputStream bs;
              bs = new java.io.ByteArrayInputStream (bytes);
              in = new java.io.ObjectInputStream(bs);
              res = in.readObject ();
              in.close ();
              bs.close ();
              return res;
    now,
    i m sending through below code....
    dos=new DataOutputStream(socket.getOutputStream());
    data=ChatUtils.objectToBytes(message);
    dos.write(data,0,data.length);
    dos.flush();
    i m receiving through below code....
    dis=new DataInputStream(socket.getInputStream());
    data = new byte[MAX_MESSAGE_SIZE];
    dis.read(data);
    MessageBean message = ((MessageBean)ChatUtils.bytesToObject(data));
    now web client is running perfectly but MIDP can't connect.........so
    i want to create own ObjectInputstream and ObjectOutputStream so pls help me by giving code of java.io.ObjectInputstream and java.io.ObjectOutputstream to create this things or some good code to not change this existing....system.

  • Function Module to convert  amount to  amount in words

    Dear Guru ,
    I want to know is there any sap standard Function Module to convert  amount value   to  amount in words
    Thanks & Regards

    Hi..
    Use FM SPELL_AMOUNT.
    This function module converts an amount or number into words. It can be used as follows:
    Convert a number into words
    To do this, the transfer parameters LANGUAGE and AMOUNT have to be entered.
    Convert an amount into words
    To do this, the fields LANGUAGE, CURRENCY, and AMOUNT have to be entered.
    Program RF_SPELL contains a sample call of the function module. You can use it for test purposes.
    REPORT ZSPELL.
    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 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
    I hope it helps.
    Reward pts if helpful
    Regards
    - Rishika Bawa

  • Function to call to convert amount in words in R12

    Hi Experts,
    I am creating a custom report that will display invoice details. Included in the fields are AMOUNT and AMOUNT_IN_WORDS. I don't have problem for the AMOUNT field since i can retrieve it directly from the table. My concern is on the AMOUNT_IN_WORDS. Is there any function in EBS R12 which i can call directly in the SQL statement of my report to convert the AMOUNT into Words.
    Thanks,
    Nestor

    Hi mpautom,
    What i'm looking for is a built-in function within EBS R12. Because the client doesn't allow creation of function.
    Nestor

Maybe you are looking for

  • Blackberry app world not working. Please help me.

    Okay, basically I'm having this major problem. I have a blackberry torch 9800. I've just had my phone replaced as I dropped it into a puddle.. So i'm happy I got a replacement phone, the only problem I'm having is downloading one app in particular. I

  • Defining Accounts for Materials Management

    Dear sir, Now, I have to Define Accounts for Materials Management, but I dont know what are procedure or group to match my account number. Can you explain the definition of following procedure: Expense/revenue from consign.mat.consum Expense/revenue

  • Capture DocEntry of purchase order created by Proc. Confirmation Wizard

    Dear all, in SAP B1 2007 I developed a UI DI API addon to read the docentry of all purchase orders created by Procurement Confirmation Wizard. I used the et_FORM_DATA_ADD  event created by the wizard when I confirmed the creation of the purchase orde

  • Looking for third party driver for Bentley Nevada 208P data acquisition unit.

    We have a Bentley Nevada 208P data acquisition unit used with their Adre system (software/hardware). We would find it benifitial to utilize it on another application other than monitoring proximitors, and do some calculations on the voltage signals r

  • Customer Exit for BW Variables

    Dear all, I am a BW Consultant and have a very limited knowledge in ABAP. I have the following scenario: My BW query has the following input variables: 0P_FYEAR      Fiscal Year (Single Value Entry) 0P_PER3      Posting Period (Single Value Entry) an