Currency: valid ISO 4217 codes still throw IllegalArgumentExceptions

java.util.Currency is supposed to support ISO 4217 currency codes (as written in its javadoc). But I still get IllegalArgumentExceptions for the currency codes GHS, RSD, SDG that are still active as I read in wikipedia (http://en.wikipedia.org/wiki/ISO_4217). I also get this exception for some other currency codes that are obsolete but still valid (XEU, ZAL, ...).
It seems that java.util.Currency only supports a subset of the ISO 4217 currency codes. That makes it unusable as I have to work with the currency codes (Strings) to also handle these other (valid) currency codes. What is this class good for if it only can handle a subset and you can't create your own (new) Currency objects?

yup. I guess the Currency class was someone's idea of a bright idea at the time, like so many things.
But someone (probably that same someone) didn't think about the consequences of implementing it the way they did and now Sun's stuck with it.
Can't remove it because someone may depend on it, and maintenance is expensive and never fast enough for some yet always too quick for others (who have come to depend on the exact content).

Similar Messages

  • A table mapping between ISO country code and ISO currency code

    Hi experts,
    I want to know whether there is a table mapping between ISO country code and ISO currency code.I have searched T005(Countries) and TCURC(Currency Codes).why the filed of WAERS(Country currency) hasn't maintained in talbe T005?Whether ISO country code and ISO currency code hasn't direct relation?
    Regards,
    Kelvin

    Kelvin,
    If you know the table which is having ISO Country Code or ISO Currency code,then go to that table and clik on GRAPHIC(ctrlShiftf11) which will give the foreign key relationships.I guess checking all those table displayed in the graphic will give you some lead.
    K.Kiran.

  • How to activate Compny code validation ( cross company code)

    *Hi ,*
    *We migrated classic GL to New GL before one month Now*
    *I am rollout new company code, after completed all configuration I found uncopmplit  configuration of company code validation is not active in  controlling area config ( Transaction Code- OKKP) , which is related to cross company code ( Indicator for company code validation )*
    *can anybody provide solution to activate company code validation*
    Thank ,
    Jeetendra

    Hi ,
    I want to activate company code validation for cross company code still it is inactive
    without  activation I can not use cross company code for costing
    Edited by: jitu konde on Jun 15, 2011 9:38 AM

  • Adding currency validation in OY03 transaction

    Hi Experts,
    I want to add a currency validation in the transaction OY03, since OY03 is transaction for table maintenace I have to add an event to vaidate the data entered in the sm30 screen. Since it is a standard table SAP is not allowing me to add an event. Please let me know how to overcome this problem, is there any way to add events to a standard SAP table maintenace?
    Your suggestions are really appreciated.
    Thanking you in advance,
    Faar.
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Sep 8, 2009 4:33 PM

    Hi Rob,
    Thank you very much  for your reply.
    I tried to add an event in the maintenace using SE54 transaction, I am able create an entry for the event. but it is neither allowing me to include that particular part of code in any of the  available includes nor creating a  new include.
    This is the issue I am facing.
    Faar.

  • Foreign currency validation

    Hi, Experts,
    I was wondering when doing Foreign currency validation,  The system get the Profit center defaultly, when posting the variance.
    I am wondering where did system get the Profit center when we do FAGL_FC_VAL?

    Hi Bryan Shala,
    When you execute T-code FAGL_FC_VAL for sub-ledger like Customer and Vendor. It will check the open item posted with Profit Center.
    It will post the Gain/Loss to same Profit center, to the Profit center which posted in open Item.
    Regards
    Rakshith

  • Validation for tax code not to use

    Dear Gurus,
    i had done validation for purchase/sales tax code not use while doing transction.
    Prerequisite
    BKPF-BUKRS =1000
    CHECK
    NOT BESEG-MESKZ IN ZTAXCODE
    Message
    you can't use this tax code
    i had done this validation for parent company code(1000) but it is giving error for our subsidiary company(3000), though the tax procedure is differnet for both the company taxinj(india) and taxusj(usa). Also the end user is making transction in company code 3000 without tax code still system give him error.
    Please advice how to rectify it.
    Regards,
    Rajesh K

    Hi,
    As per my understanding the Tax Code is same but the Tax Procedures are different for the two Company Codes. The solution is to add Company Code 3000 also in the validation Prerequisite. With this it could work.
    Regards,
    Kiron Kumar T.

  • Throws IllegalArgumentException when use BufferedReader.readLine()

    hi
    when i use BufferedReader.readLine() to read a html file of Internet,it throws IllegalArgumentException like blow:
    java.lang.IllegalArgumentException
    at java.nio.Buffer.position(Buffer.java:218)
    at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:575)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:442)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    but it occured sometimes or occured never in a long time!
    Why?

    It does it because of this bit of code in java.nio.Buffer.position
    if ((newPosition < 0) || (newPosition > limit))
          throw new IllegalArgumentException ();So for some reason a bit of the java code has tried to set the position to either less than zero or greater than the limit of the buffer. Not a good idea in either case.
    Since this is not your code you can't really do much about it. Try catching the exception and handling it.

  • Validation in T Code F-02 in which Bank outgoing GL A/c should be restricte

    Dear All,
    Please advice me regarding the following:
    User is posting the payment to vendor through T Code F-02, resulting in the not creation of the liability.
    Client wants to stop it by validation in T Code F-02 in which Bank outgoing GL A/c should be restricted, so that user would not be able to post the payment with this T Code.
    But this Bank GL should not be restricted in BDC for upload to F-02.
    What should be the Prerequisites, Checks and messages for that?
    Regards
    BIJUDAS

    Hi Biju
    Lot of companies just dont give the auth of F-02 to the employees... Because you have T codes like F-43, FB60/70, F-48, F-53 etc which serve the defined purpose, where as In F-02, the employee can do any thing and every thing....
    If you write a validation, it would apply for F-02 (Manual as well as BDC)... you cant restrict it partially, as far as I know
    In my opinion, you should control it by authorization and only one or key people should be allowed F-02
    Br, Ajay M

  • How to pass the currency of particular company code into a text variable.

    Hi
    I want to pass the currency of particular company code into a text variable.
    The company code is selected by the user using Input variable "0S_COM_M".
    I have created a text variable "ZD_CURR" with processing type customer exit.
    I have written the following abap code but its not working.
    DATA : LV_CURR type /BI0/OICURRENCY.
      WHEN 'ZD_CURR'.
        IF I_STEP = 2.
          CLEAR  XTAB.
          READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = '0S_COM_M'.
          SELECT SINGLE CURRENCY FROM /BI0/PCOMP_CODE INTO LV_CURR WHERE COMP_CODE =  XTAB-LOW.
          L_S_RANGE-LOW = LV_CURR.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          CLEAR E_T_RANGE.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    Pls let me know how to resolve this issue or what modification can be done to this code.
    Is there a way where we can debug customer exit code for variables.
    Thanks.

    Hi.
    You should debug your code to check behaviour of it.
    Just set external breakpoint (or create checkpoint via tc SAAB) and run your query.
    You may run query via RSRT.
    Regards.

  • Any SAP standard approach to display the currency symbols without hard code?

    Hi,
    I want to display $ symbol on the report ouput, for the how can we display currency symbols without hard code?
    Thanks,
    Aarti

    Not much chance... If such a standard table exists, then during Euro creation, an OSS note would have been released to add the € character, and I found none, fell free to perform some search on OSS with keywords I didn't try.
    So better build your own customer table with foreign relaction to TCURC.
    NB: Look for symbol list ($, £, €, ¥, etc.) in sites like Currency symbol - Wikipedia, the free encyclopedia. I hope your system is Unicode.
    Regards,
    Raymond

  • Field ISO country code required in FBLN

    Hi Friends,
    We want to add field ISo country code from customer master in FBl5N display & we want to make subtotals on the basis of these fields.
    This field ( KNA1- LAND1) is not available in the dynamic fields . We also tried to add it in customisation in additional fields for line items,
    ( path : SPRO> FI> ARAP> Customer A/cs > Line items > Display Line items > Define additional fields for line item display),
    but we got error message No FC251- Table KNA1 is not allowed.
    Please Help
    Thanks & Regards
    Bhairavi

    Hello Meg
    Thanks for your reply. However I find that quite troublesome, as I'm based in the US most of the year for work, while during the rest I'm traveling overseas changing SIM cards in every country. After two years this is the first time experiencing this situation, and I already have several clients from abroad indicating a change on my phone number when they text me trough iMessage.
    Hope I can find a solution soon.
    Thanks and Best Regards

  • CJ718 - Currency in requesting company code must be company code currency

    Hi Colleagues,
        I need to define in the WBS element "Requesting cost center field" in (CJ20N tcode) the cost center with different currency and controlling area, howerver the system does not allow and the follow message was showed "CJ718 - Currency in requesting company code must be company code currency".
        I would like to know,  is this possible? How can I do it?
    Kind Regards,
    Lima, Vanderlin.

    I dont think this is possible. Read this Note 201049 - Different company code currencies in WBS element , This note doesnt solve your purpose it is to correct if system allows you to assign different company code currencies and it clearly says that if you have different company code currency in a WBSE then you will have problem in settlement, so this is not allowed.

  • Multiple currencies under one company code for contracts

    Gooday!
    We have a new schenario ( In RE-FX) where we have a couple of contracts which were negotiated with the landlord that needs to be settled in Rand, whilst the company code are setup for another currency, which is dollar (caters for the bulk of the contracts). So each time you create a new contract the currency is already greyed out (Dollar), which obviously means that it cannot be changed there.
    Apparently the company code can be setup in FI to accommodate secondary currencies, however, this seems not to be the case in RE-FX.
    My question is this, is it possible to have multiple currency contracts under one company code in RE-FX, and if so, do one set it up in FI or RE-FX?
    Any assistance would be greatly appreciated!

    Conditions in Foreign Currency (New)
    As of SAP ECC 6.0, Enterprise Extension Financials, Enhancement Package 2 (EA-FIN 602), Business Function Real Estate (RE_GEN_CI_1), you can enter conditions for contracts, rental objects, or contract offers that are in a currency that differs from the local currency of the company code.
    You can enter the currency directly when processing conditions. You can also enter a currency translation rule in the posting term. The rule is then used for all conditions to which this posting term is assigned.
    You specify in Customizing which currency translation rules are allowed for each contract type and usage type.
    See SAP Note 123819.

  • Different currencies in cross company code customization

    how to assign to company codes with different currencies in cross company code customization ( ex : inr and usd )

    Hi Manasa,
    Check the tcodes OB22 and FAGL_FC_VAL for currency related issues.
    Also check the folowing links for your answer.
    http://scn.sap.com/thread/3312076
    http://scn.sap.com/thread/1880759
    Thanks,
    Rutivk.

  • Java security error after 8u31 (Timestamped Jarsigned Applet within valid period of Code Signing certificate)

    Hello,
      I have an applet running in embeddad systems. This program runs without any problem since 8u31 update! After this update it starts to give java security warning and stops running.
    Here is the warning message:
      "Your security settings have blocked an application signed with an expired or not-yet-valid certificate from running"
    What it says is true; my Code Signing Certificate (CSC) is valid between 24 Jan 2014 and 25 Jan 2015. And it expired! However, while i was signing my applet with this certificate i used "timestamp". The authority i choosed was DigiCert. My signing date was 26 Jan 2014 (when my CSC was valid).
    When i started to have this Java Security Error, first i thought i mis-timestamped my code, and check by using the jarsigner -verify command. Here is a partial result:
    s      19607 Mon Jan 27 13:17:34 EET 2014 META-INF/MANIFEST.MF
          [entry was signed on 27.01.2014 13:19]
          X.509, CN=TELESIS TELECOMMUNICATION SYSTEMS, OU=ARGE, O=TELESIS TELECOMMUNICATION SYSTEMS, STREET=TURGUT OZAL BLV.NO:68, L=ANKARA, ST=ANKARA, OID.2.5.4.17=06060, C=TR
          [certificate is valid from 24.01.2014 02:00 to 25.01.2015 01:59]
          X.509, CN=COMODO Code Signing CA 2, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB
          [certificate is valid from 24.08.2011 03:00 to 30.05.2020 13:48]
          X.509, CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
          [certificate is valid from 07.06.2005 11:09 to 30.05.2020 13:48]
          X.509, CN=AddTrust External CA Root, OU=AddTrust External TTP Network, O=AddTrust AB, C=SE
          [certificate is valid from 30.05.2000 13:48 to 30.05.2020 13:48]
    sm       495 Thu Jan 23 14:55:22 EET 2014 telesis/WebPhone$1.class
    As you may see the timestamp was correctly done. And it is in the valid period of CSC.
    Than i started to check how Java confirms the Certificate, and found some flowcharts.
    Here is an example from DigiCert:
    Code Signature Verification Process
    After the Web browser downloads the Applet or Web Start application, it checks for a timestamp, authenticates the publisher and Certificate Authority (CA), and checks to see if the code has been altered/corrupted.
    The timestamp is used to identify the validation period for the code signature. If a timestamp is discovered, then the code signature is valid until the end of time, as long as the code remains unchanged. If a timestamp is not discovered, then the code signature is valid as long as the code remains unchanged but only until the Code Signing Certificate expires. The signature is used to authenticate the publisher and the CA, and as long as the publisher (author or developer) has not been blacklisted, the code signature is valid. Finally, the code is checked to make sure that it has not been changed or corrupted.
    If the timestamp (or Code Signature Certificate expiration date) is verified, the signature is validated, and the code is unchanged, then the Web browser admits the Applet or Web Start application. If any of these items do not check out, then the Web browser acts accordingly, with actions dependent on its level of security.
    So according to this scheme, my applet had to work properly, and without security warning.
    However i also found that from Oracle, which also includes the timestamping authorities Certification validity period??? :
    The optional timestamping provides a notary-like capability of identifying
    when the signature was applied.
        If a certificate passes its natural expiration date without revocation,
    trust is extended for the length of the timestamp.
        Timestamps are not considered for certificates that have been revoked,
    as the actual date of compromise could have been before the timestamp
    occurred.
    source:  https://blogs.oracle.com/java-platform-group/entry/signing_code_for_the_long
    So, could anyone please explain why Java gives security error when someone tries to reach that applet?
    Here is a link of applet: http://85.105.68.11/home.asp?dd_056
    I know the situation seems a bit complicated, but i tried to explain as simple as i can.
    waiting for your help,
    regards,
    Anıl

    Hello,
      I have an applet running in embeddad systems. This program runs without any problem since 8u31 update! After this update it starts to give java security warning and stops running.
    Here is the warning message:
      "Your security settings have blocked an application signed with an expired or not-yet-valid certificate from running"
    What it says is true; my Code Signing Certificate (CSC) is valid between 24 Jan 2014 and 25 Jan 2015. And it expired! However, while i was signing my applet with this certificate i used "timestamp". The authority i choosed was DigiCert. My signing date was 26 Jan 2014 (when my CSC was valid).
    When i started to have this Java Security Error, first i thought i mis-timestamped my code, and check by using the jarsigner -verify command. Here is a partial result:
    s      19607 Mon Jan 27 13:17:34 EET 2014 META-INF/MANIFEST.MF
          [entry was signed on 27.01.2014 13:19]
          X.509, CN=TELESIS TELECOMMUNICATION SYSTEMS, OU=ARGE, O=TELESIS TELECOMMUNICATION SYSTEMS, STREET=TURGUT OZAL BLV.NO:68, L=ANKARA, ST=ANKARA, OID.2.5.4.17=06060, C=TR
          [certificate is valid from 24.01.2014 02:00 to 25.01.2015 01:59]
          X.509, CN=COMODO Code Signing CA 2, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB
          [certificate is valid from 24.08.2011 03:00 to 30.05.2020 13:48]
          X.509, CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
          [certificate is valid from 07.06.2005 11:09 to 30.05.2020 13:48]
          X.509, CN=AddTrust External CA Root, OU=AddTrust External TTP Network, O=AddTrust AB, C=SE
          [certificate is valid from 30.05.2000 13:48 to 30.05.2020 13:48]
    sm       495 Thu Jan 23 14:55:22 EET 2014 telesis/WebPhone$1.class
    As you may see the timestamp was correctly done. And it is in the valid period of CSC.
    Than i started to check how Java confirms the Certificate, and found some flowcharts.
    Here is an example from DigiCert:
    Code Signature Verification Process
    After the Web browser downloads the Applet or Web Start application, it checks for a timestamp, authenticates the publisher and Certificate Authority (CA), and checks to see if the code has been altered/corrupted.
    The timestamp is used to identify the validation period for the code signature. If a timestamp is discovered, then the code signature is valid until the end of time, as long as the code remains unchanged. If a timestamp is not discovered, then the code signature is valid as long as the code remains unchanged but only until the Code Signing Certificate expires. The signature is used to authenticate the publisher and the CA, and as long as the publisher (author or developer) has not been blacklisted, the code signature is valid. Finally, the code is checked to make sure that it has not been changed or corrupted.
    If the timestamp (or Code Signature Certificate expiration date) is verified, the signature is validated, and the code is unchanged, then the Web browser admits the Applet or Web Start application. If any of these items do not check out, then the Web browser acts accordingly, with actions dependent on its level of security.
    So according to this scheme, my applet had to work properly, and without security warning.
    However i also found that from Oracle, which also includes the timestamping authorities Certification validity period??? :
    The optional timestamping provides a notary-like capability of identifying
    when the signature was applied.
        If a certificate passes its natural expiration date without revocation,
    trust is extended for the length of the timestamp.
        Timestamps are not considered for certificates that have been revoked,
    as the actual date of compromise could have been before the timestamp
    occurred.
    source:  https://blogs.oracle.com/java-platform-group/entry/signing_code_for_the_long
    So, could anyone please explain why Java gives security error when someone tries to reach that applet?
    Here is a link of applet: http://85.105.68.11/home.asp?dd_056
    I know the situation seems a bit complicated, but i tried to explain as simple as i can.
    waiting for your help,
    regards,
    Anıl

Maybe you are looking for

  • How to generate a Unique key based on a some String value

    Hello every one, I am sorry , If I post this question in wrong group... I have a requirement to generate a unique key ( what every it may be alpha, numeric or alpha numeric) based on some String.. For ex : String str = "AbCX" - Gives a unique key bas

  • Scheduled Task as Service Account - Failed to Start 2147943785

    I am attempting to run some powershell scripts that update membership of groups based on role attribute on users, then also grabs members of some groups and updates other groups with these members. I've delegated access through "security" to give thi

  • What is the AS3 command to stop your Flex 2 Application

    I've been looking thru the documentation and I can't find the AS 3 command (or mxml command) that stops the Flex 2 application. I have a 'Log Out' button that will do some general clean up, then it should also cause the Flex application to cease oper

  • Single sign on wich 802.1x using MS IAS

    Hi! can i do a single sign on using 802.1x authentication and dynamic vlans? Im using MS IAS Radius server an a WIndows XP client.

  • Graph Theory question...

    My graph knowledge is still requiring maturing. ;) I was wondering if anyone could help me with this question: given a set of verticies in an undirected graph, (not all may be connected) I want to determine whether there exists a "walk" from Vi to Vj