RE: Using the Currency Object

Hi
I tried using the currency object to display the currency symbol for the UK and Europe, here is an example of what I did
String currency = Currency.getInstance("EUR").getSymbol();
or for the UK
String currency = Currency.getInstance("GBR").getSymbol();
but I ended up with unicode characters instead of currency symbols like this � or � what am i doing wrong

(I guess you made a little typo, the Great Britain Pound is GBP and not GBR.)
Currency.getSymbol returns the symbol that should be used for that currency in the current locale. So if you are in UK "GBP" comes out as the sterling pound symbol, in countries where they use Euro it comes out as €, but everywhere else the result is the three letter (?) currency code itself. This is because pounds and dollars are used in many countries and they have the same symbol; you wouldn't want users to confuse US dollars with Canadian dollars. So try these:
String pound = Currency.getInstance("GBP").getSymbol(new Locale("en", "GB"));
String euro = Currency.getInstance("EUR").getSymbol(new Locale("fr", "FR"));

Similar Messages

  • How to use the ViewRowImpl objects in JSP?

    Is there anyway for me to use the ViewRowImpl objects in the JSP (so I could call the set<attribute> methods and get<attribute> methods to retrieve the attributes? Right now I am retrieving all the information I need in the application tier from the database, marshal them myself, and then return the marshaled data back to the JSP side in the presentation tier, then demarshal the data, and finally interpret the demarshaled data. I did this because I want to return everything in one single remote method call, and I know this is really ugly, but I do not know of any other way for me to retrieve all information needed by a JSP page in one single method call. Any suggestions?

    I've done this in servlets.
    I created an application module (with an ic.lookup() call, see the documentation) and then used the appModule to create my view.
    Once you've got that you can iterate through rows and use the accessor methods.
    You might need a wrapper method to get the ViewObjectImpl in your jsp...

  • Special characters in XML built using the DOM object

    I am using the DOM object to build xml but I am having problems with special characters. I have a Element object that I create attributes in. Most special characters like the &, ", or ' are translated for me (amp; quot;, acute; put a & in front of those, if I do it here the browser will translate them into the logical character) but I am having a problem with the � character. The DOM object does not translate this. If I do it my self to(eacute; same here add a & in front) before adding the string to the attribute then the DOM object translates it to (amp;eacute; add a & in front of the amp; not in front of the eacute;). As you can see the DOM object translates the & instead of recognizing that it is a HTML character. Can anyone give me a hand?

    I am building this XML in a servlet so ,right, DOM does process XML (even though a valid HTML file can be loaded into a DOM object) but if you build XML using DOM then write the XML out using PrintWriter and Transformer objects this will cause the XML to print out in your browser. If you view source on this XML you will see that the DOM object has translated all special characters to there &xxxx; equivalent. For a example: when the string (I know "cool" java) gets loaded into a attribute using the DOM object then wrote back out it looks like (I know &xxx;cool&xxx; java) if you view the source in your browser. This is what it should do, but the DOM object is not change the � to the "&xxxxx;". This servlet is acting as a gateway between a Java API and a windows asp. The asp will call the servlet expecting to get XML back and load it directly into a DOM object. When the windows DOM object gets the xml that I am returning in this servlet is throws a exception "invalid character" because the � was not translated to &xxxx; like the other characters were. According to the book HTML 4 in 24 hours (and other references) the eacute; or #233; are how you say "�" in HTML or XML. How do you say it?

  • Can't create table that grows using the button object

    Im a beginner, and this seems like a simple issue. Appreciate your help in advance.  When I try to do this, the button fails to add a row.
    So, I printed out the Help section entitled, "create a table that grows using the button object" and started from scratch with a simple table as the only object on the form- and followed the instructions to the letter.
    When I go to preview and click the button, a row is not added.
    Can you suggest something?

    Try this:
    Select body row of table from hierarchy palette that you want to repeat then on he object tab of the properties tab select binding tab. You need to click on "Repeat Row for Each Data Item"
    I hope this helps
    Murat
    www.muratkuru.com.tr

  • Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this.  If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
    This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum.

  • Error in Application.Run(DisplayLoginForm) and Remote Authentication in SharePoint Online Using the Client Object Model

    Hi guys
    I Think that is a simple error, but I don’t have enough knowledge in .NET apps.
    I make an console app that use Remote Authentication in SharePoint Online Using the Client Object Model, that a I downloaded from MSDN.
    This App run ok.
    But when I like to make a Windows From App. This component send me an error in Application.Run(DisplayLoginForm)
    This err msg :
     An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
    Additional information: Starting a second message loop on a single thread is not a valid operation. Use Form.ShowDialog instead.
    Is there any way to use a form inside a windows form?
    Thank in advance
    Ramiro
    Ramiro B

    Hi,
    Based on the error message, please do as following:
    1. Check your code logic below:
    void btn_Click(object sender, System.EventArgs e)
    Thread t = new Thread(StartMyForm);
    t.TrySetApartmentState(ApartmentState.STA);
    t.Start();
    public static void StartMyForm()
    Application.Run(new MyForm(..));
    2.Try to add the following code line in your code.
    Application.Restart();
    If the issue still exists, please provide your requirement and code for a further research.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • BILL OF MATERIAL USING THE DI OBJECT

    Hi All,
    IS IT POSSIBLE TO ADD THE BILL OF MATERIAL USING THE DI OBJECT.....
    Thanks,
    MADHUSUDHANA RAO.G

    Hi,
    Its very much possible, check the following from the sdk DI help file..
    ProductTrees is a business object that represents a completed product made up of parts and raw materials, which is described by means of a bill of materials.
    Hope it helps,
    Vasu Natari

  • Using the circle object

    My apologies if there is a simple answer to this question, but this is my first time using this program.
    I am trying to create a form from a word document and when I am in LC Designer and want to add the circle object, it is grayed out and the tooltip says: this type of object cannot be used in forms with PDF artwork.
    Can someone please tell me:
    1. What is PDF artwork?
    2. Is there a way to show what the PDF artwork in the form is?
    Thank you for your help.

    When you created the PDF in the first place you would have been given options of either creating an "Interactive Form with Fixed Pages" or an "Interactive form with a Flowable Layout". Sounds like you chose the former. If you want to be able to use the drawing objects you need to choose the "Flowable Layout" option. However, you will have to spend some time cleaning up the layout, since the import process isn't perfect.

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • Using the COM Object

    Hi ,
    Is it possible to use the COM object in Labwindows/CVI? If yes, please share the procedure?
    Thanks,
    Sumathi

    [Jongware],
    Thank you for the prompt reply!  Your information has been helpful.
    I'm not quite sure why what I'm wanting to do is against the EULA, unless it's because I'm doing it at a server level.
    Yes, COM is a Microsoft concept.  I do understand that InDesign uses the DOM, but I have seen code snippets where people have utilized the .tlb file from within .NET (C#, too).
    1. That sucks, but it is something I suppose I could live with.
    2. No comment.
    3. If my only objective is to create a thumbnail (whether it be INDD --> PDF --> JPG or INDD --> JPG), and if placing will achieve this, then that's ok.
    4. If InDesign server allows me to run a script that will do what I want, that'll work.
    5. No comment.
    6. I assume there's no way to try-before-you-buy InDesign Server?  I sure wish I could tinker with it before determining if it's the right solution.
    I know what I want is WAY overkill, but since we're a shop that uses Adobe products to print large graphics, our customers use Adobe, too.  I'm absolutely FLABBERGASTED that Adobe doesn't offer a way to easily convert their products.  And since what I want to do requires the use of Adobe in some way or fashion, I don't see any other alternative than to use a cannon to kill a fly.
    I spoke with "Travis" via chat after reading your post.  He states that Adobe does not offer a product that does what I want, nor does it offer a custom made graphic conversion program.
    What an absolute bummer.  I never thought converting an Adobe file to a thumbnail would be so difficult, especially after I noticed how Adobe Bridge flawlessly creates a visible thumbnail for all Adobe types, right in it's own window.
    Again, thanks for the information.  If you think of anything else, please let me know.
    Kyle

  • Saving a Template BOM Item using the oInventoryGenEntry object

    Hi
    I am trying to do a Good Receipt using the DI Object, It always works if the item is not a BOM object but if its a BOM parent I get an error :Item is not set as Inventory Item. The error continues to show me that the problem occurred on an Item that is a child Item of the BOM, This happens especially when the BOM TreeType is Template. According to my understanding,  As long as he parent Item of the BOM is set as inventory Item, every item should work fine.
    I can't set the child items as Inventory items because they are just components to build the parent Item.
    Please help. How can I solve this
    Private Function UpdateStock() As Integer
            Dim oAdjustmentIn As SAPbobsCOM.Documents
            Dim txtItemCode As SAPbouiCOM.EditText
            Dim txtStdCost As SAPbouiCOM.EditText
            Dim txtSize1 As SAPbouiCOM.EditText
            Dim txtSize2 As SAPbouiCOM.EditText
            Dim txtExtQty As SAPbouiCOM.EditText
            Dim errDescript As String
            Dim Result As Integer
            Dim CurrentStock As Double
            Dim iRow As Integer
            Dim tmp As String
            Dim i As Integer
            Dim StkItem As String
            Dim GLAccount As String
            Try
                oAdjustmentIn = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
                oAdjustmentIn.DocDate = Now
                oAdjustmentIn.Reference2 = "2"        
                oAdjustmentIn.JournalMemo = "Adjustment In"
                'oAdjustmentIn.PaymentGroupCode = "1"
                oItem = oAdjustmentInForm.Items.Item("13")
                oMatrix = oItem.Specific
                txtItemCode = oMatrix.Columns.Item("1").Cells.Item.oMatrix.RowCount).Specific
                If txtItemCode.Value = "" Then
                    i = oMatrix.RowCount - 1
                Else
                    i = oMatrix.RowCount
                End If
                For iRow = 1 To i
                    DocType = New PGG_IBT(mo_ParentAddon)
                    txtItemCode = oMatrix.Columns.Item("1").Cells.Item(iRow).Specific
                    StkItem = txtItemCode.Value
                    oAdjustmentIn.Lines.ItemCode = StkItem
                    oAdjustmentIn.Lines.AccountCode = GLAccount
                    oAdjustmentIn.Lines.Quantity = 2
                    oAdjustmentIn.Lines.Price = myPrice
                    If iRow <> i Then
                        oAdjustmentIn.Lines.Add()
                    End If
                Next
                Result = oAdjustmentIn.Add()
                If Result <> 0 Then
                    errDescript = oDICompany.GetLastErrorDescription()
                    SBO_Application.MessageBox("Error creating interbranch Receive  " & errDescript)
                End If
               UpdateStock = Result
            Catch ex As Exception
               UpdateStock = -1
                SBO_Application.MessageBox("Error in Class PGG_Inventory, function UpdateStock() " & ex.GetBaseException.ToString)
            Finally
                GC.Collect()
            End Try
        End Function

    Hi Ian
    Thanks for the insight, how ever, if I do a Goods Receipt direct in SAP Business One, the Item saves nicely and everything works. It even looks as though the BOM child items are not affeted. But when I use the DI object I then get an error, I don't know what the DI Object is doing different from what SB1 is doing.
    There is no doubt in my mind that the Template BOM item can be saved with the Goods Receipt because I am doing it direct in SBO client and it works. I just need to be able to do it via the Di Object
    Please help if you can think of another reason why this is happening
    Regards
    Dumisani

  • CP 8 crashes and closes when using the web object.

    Adobe Captivate 8 is crashing when using the web object, give me a box which says I need to close the program. How can I fix this issue?
    Message was edited by: Deborah Schonfeld

    Hi There,
    Can you please confirm your operating system ? Do you have the full administrative rights ? Are you getting any error when trying to insert Web Object interaction ?
    Would like to inform you Captivate 6 onwards interactions have been uploaded on server. Captivate pings this server on a regular basis, If there is any firewall or strict network policy then it might take some time to check the URL or might be result in crash or freeze.
    Regards,
    Ajit

  • Infoset query - cannot use the currency translatioin

    A query is built on an infoset(FIAR_SD01) whihc has been joined on the basis of Invoice number as the key.
    AR and SD infoproviders are joined in an Infoset based on 0BILL_NUM.
    in the report built on this Infoset, i need to show invoice Amount and AR amount per invoice. this amount is coming from the infoprovider in dcument currency and in the report it should be converted to USD. for this i'm usign the currency translation object - USD_VAR_DB- exchange rate based on DB with time ref characteristics as 0POSTNG_DATE.
    if i use this/ any translation object it gives an error -'Cannot apply translation to the cube/infoprovider"
    the reason is. in infoset, the object 0POSTNG_DATE is not retained as same but gets a new technical name like: FIAR_SD01__F8.
    to create a new trasnlation object DB based is not feasible. because in time Ref tab of creating a new translation object, if i select "Exact day"  and in the infoset selection FIAR_SD01 infoset doestno appear as 0CALDAY is not present in the DSO.
    we need a solution for this.as to how do we do the currency translation.
    is there any setting i have missed?

    I know INfoset doesnt store data...
    But in BI 7.0 its possible to load the data from INfoset to a data target...
    Just right click on  a cube, and say create transformation, you will get the option of infoset over there....
    I am suggesting you to push data from Infoset to cube and then build the report on the cube...
    Edited by: mansi dandavate on Aug 5, 2009 12:33 PM

  • How can I use the same object in the different jsp files?

    I am doing a project. I have finished my jave source files and compiled them successfully. And I also wrote a main method to test my classes, they also worked well. Now I am trying to use my jave code in the jsp files. But I meet a problem, in my method of java source file, I can generate a object of a class, and use it in the whole main method. But in the different jsp files, how can I do same thing?
    For example, in the .java file,
    Vector vl = new Vector();
    While ...{
    vl.add(...)
    In each of my .jsp file I want to do one loop of the above, meanwhile I want to do that in the same object.
    I hope you can understand what I mean. Really need your help!

    put your object into a session and you can the use it in all the jsps as long as the session is valid. Or you could create a static variable in the class that only creates one instance off an object and then create a static method to return this object.

  • Use the authorization object while creating RFC

    Hi All,
    I'm able to create a RFC, can login from one sap system to another sap system and use the  following FM.  Here my concern is how to make the RFC more secure, i mean any user can access the target system with my login. Meanwhile came across a authorization object text box in the LOGON and SECURE tab while creating RFC.
    so please put on light on how to authenticate the specific user to logon using the RFC.
    Thanks in Advance.
    Regards
    Lalitkumar.

    Hi Lalit,
    Usually for RFC connection will be done with the, user type   system user type (means,they should not be able to login to system thru GUI)
    2. Even if the user know the login id / password, he should  have auth to create RFC like (SM59 and related auth objects)
    and even for remote connection also we have different auth to restrict
    3. These type of authorization will be  given to basis guys only.
    4. Logon/Security 
                 Lang-En
                 Client-` client no
                 user-  user
                 Password - bw password.
    Here you will be specfying the  user id  ( system type)  / password for connecting from one system to another.
    and in next tab you can do Test connection.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a08fbe33-0501-0010-2d9c-fb37e9795fd9
    Thanks,
    Sri

Maybe you are looking for