Currency data type

Hi all
the currency column in java is mapped to which datatype in oracle?
regards
Raj

Number.
Currency is not a data type but a format, you would use the to_char function to format a numeric value as a currency.
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions189.htm#i79330
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements004.htm#i34570

Similar Messages

  • Handling Currency Data type in a Web Service

    hello,
    I have created a Java Web Service n i have tested the support for all the data types w.r.t to Java Client n C# Client.
    In case of other data types, they are supported by both the clients. But in case of currency, it is not supported since there is no currency data type in C#.
    For reference:
    public int testInt (int aValue) throws Exception
    mLogger.info("SampleAPI.testInt: Value: " + aValue);
    return aValue;
    I have created this method to test the support for Integer data type n it is working fine for both the clients. I want that same should be achieved for Currency Data type also.
    Problem is: Since Currency does not have a constructor. i cannot set the value at the C# client end n it shows the error "Cannot create the instance of java.util.currency"
    So, i reached this solution of handling the currency data type on the Service end itself by converting the currency value into decimal when the C# client sends a request for currency data type and convert it again into Currency from Decimal when the client sets the value at the Web Service end.
    But it cannot be achieved since currency is not defined in any monetary sense but is using only the currency codes, so it cannot be converted.
    Please tell me how to handle this thing?? Any suggestion will be appreciated.
    Thanks & Regards,
    Kapil

    hello
    i have created a transfer structure which contains the attributes of Currency class such as CurrencyCode, CurrencySymbol and FractionDigits. I can get these three attributes by:
        public CurrencyStructure getCurrency ()
            mLogger.info("SampleAPIImpl.getCurrency: ");
            Currency currency = mBackend.getCurrencyValue();
            CurrencyStructure currencyStructure = new CurrencyStructure();
            // Get the values
            currencyStructure.code = currency.getCurrencyCode();
            currencyStructure.symbol = currency.getSymbol();
            currencyStructure.fractionDigits = currency.getDefaultFractionDigits();
            return currencyStructure;
        }The C# client can get the values by calling mService.getCurrency();
    The C# client can also set/change the value like this on client-end:
      public void testSetCurrency ()
            CurrencyStructure currencyStructure = new CurrencyStructure();
            // Initialize the values
            currencyStructure.code = "EUR";
            currencyStructure.symbol = "e";
            currencyStructure.fractionDigits = 3;
            mService.setCurrency(currencyStructure);
    }Now i want that these values should be set on the Web Service side but i m not able to set since Currency class has no setters.
    I m setting the values at Service end like this, but there is no setCurrencyCode() method available in Currency class.
        public void setCurrency (CurrencyStructure aValue)
            mLogger.info("SampleAPIImpl.setCurrency: " + aValue);
            Currency currency = mBackend.getCurrencyValue();
            // Set the values
            currency.setCurrencyCode(aValue.code);
            currency.setSymbol(aValue.symbol);
            currency.setDefaultFractionDigits(aValue.fractionDigits);
        }How to achieve this??

  • Check for Currency Data Type

    Hello All,
    In my Dynamic Internal Table I've certain fields.
    Now I want to check whether those fields are of type Currency or Quantity .
    How to do this ?
    Using Describe Field  syntax I'm getting as TYPE C for both CURRRENCY as well as CHARACTER.
    Any clues ?
    Regards,
    Deepu.K

    Hello Vikram,
    Thanks for ur reply !
    But when I pass my Internal table data Name to ur said FM I'm not getting any data.
    So I tried with one more FM :
    * Get the Layout Fields Content
      call function 'LVC_VARIANT_SELECT'
        exporting
          i_dialog            = ' '
          i_user_specific     = 'A'
          it_default_fieldcat = gt_fcat
        importing
          et_fieldcat         = gt_fcat
        tables
          it_data             = gt_final
        changing
          cs_variant          = ls_variant
        exceptions
          wrong_input         = 1
          fc_not_complete     = 2
          not_found           = 3
          program_error       = 4
          data_missing        = 5
          others              = 6.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    By using the above FM i got my required content.
    In the FIeldcatalog I have all the DATATYPES, INTTYPEs, Decimals etc. and so by reading the values from the field catalog I coud resolve my isssue.
    Regards,
    Deepu.K

  • Currency Data type conversion to send as file.

    Hello, I have a requirement to pull the ID,total_amount field defined as currency from Salesforce and send  it to file as fixed width 10 bytes. Source values: 1  15.02  11.06 Amount 15.0 has to be changed to 2 decimals while sending it to file. I have multiplied 15.0 * 1.0 to make it 15.00 , but for the 11.06 * 1.0 , I am getting result 11.060. I have to get 11.06 as it is.I have coded the logic  this way.lpad(to_char(Total_Amount__c * 1.0) || '', 10, '0'). Any ideas.ThanksVara

    Hi, we are trying to connect to a server from where we have to fetch a fax documet or multiple ones using web services wsdl connection and using a metod call and get the  fax files and write it to salesforce. Below is the error I encounter:] [ERROR] Jul 14, 2015 7:44:47 AM org.ow2.easywsdl.schema.api.abstractElmt.AbstractIncludeImpl retrieveIncludeWARNING: This import is already include : http://ix1faxsvrtst.am.lilly.com:8000/OpenText/ImportingServiceBasic?xsd=xsd4. This probably mean there's a cyclic import Have attached the session log for reference. Connection DetailsConnection Name:CSP_RightFax to SFDC InboundDescription:
    Type:Webservices V2 (Informatica Cloud Labs)Created On:Jul 13, 2015 08:45:57 AMUpdated On:Jul 14, 2015 07:08:10 AMCreated By:
    Updated By:
    Webservices V2 Connection PropertiesRuntime Environment:mohawkWSDL Url:http://ix1faxsvrtst.AM.LILLY.COM:8000/OpenText/ImportingServiceBasic?wsdlHeader CSV Path:C:\CatchallBody CSV Path:C:\CatchallEndpointUrl:http://ix1faxsvrtst.AM.LILLY.COM:9001/OpenText/ImportingServiceBasicAuthentication Type:NoneUser Name:
    Pass Word:
    CertificatePath:
    Auto csv File Creation:Auto Creation of Body/Header csv filesDownload Path for Attachment:
    Upload Path for Attachment:
    Enable Logging:falseAllow Empty Tags:false

  • Simple currency data type  calculation doubt

    Hello All,
    net_price2 = '12.10'.
    DATA : NET_PRICE2 TYPE  CHAR20,
           NET_PRICE TYPE KBETR,
           NET_PRICE1 TYPE CHAR20,
           C TYPE CHAR20.
    C = 1.
    LOOP AT ITAB2.
    NET_PRICE = ITAB2-KBETR * C.
    C = NET_PRICE.
    SHIFT C LEFT DELETING LEADING SPACE.
    ENDLOOP.
    NET_PRICE1 = C * NET_PRICE2.
    in this code i have two values for ITAB2-KBETR .those are 5.00 and 2.00
    for first record in loop i am getting value of net_price as (5.00* 1 = 5.00)
    but for secodn record what the problem i am facing in i am getting net_price as (5.00*2.00 = 1000.00)......though i want it to
    come like 10.
    so that net_price1 should come like 12.10 * 10 = 121.....
    what i shd do..this type of code now working..please help
    Abhijeet

    Hello All,
    i have done like this........its working.....but do let me know your commnets ....
    CHECK PREISFINDUNGSART EQ 'B'.
    TYPES : BEGIN OF T_KONP ,
            KBETR TYPE KONP-KBETR,
            MATNR TYPE A073-MATNR,
            KNUMH TYPE A073-KNUMH,
            END OF T_KONP.
    TYPES : BEGIN OF T_A004,
            KNUMH TYPE A004-KNUMH,
            KBETR TYPE KONP-KBETR,
            KSCHL TYPE A004-KSCHL,
            END OF T_A004.
    DATA :  ITAB TYPE STANDARD TABLE OF T_KONP WITH HEADER LINE,
            ITAB1 TYPE STANDARD TABLE OF T_A004 WITH HEADER LINE,
            ITAB2 TYPE STANDARD TABLE OF T_A004 WITH HEADER LINE.
    DATA : NET_PRICE2 TYPE kbetr value '12.10',
    NET_PRICE TYPE P DECIMALS 6,
    NET_PRICE1 TYPE KWERT,
    C TYPE  P DECIMALS 4.
    NET_PRICE2 = '12.10'.
    SELECT KNUMH INTO CORRESPONDING FIELDS OF TABLE ITAB1 FROM A004 WHERE
           MATNR = KOMP-MATNR.
    IF SY-SUBRC = '0'.
      SELECT KBETR KSCHL KNUMH INTO CORRESPONDING FIELDS OF TABLE ITAB2 FROM KONP FOR ALL
        ENTRIES IN ITAB1 WHERE KNUMH = ITAB1-KNUMH.
    ENDIF.
    C = 1.
    LOOP AT ITAB2.
    NET_PRICE = ITAB2-KBETR * C.
    C = NET_PRICE.
    ENDLOOP.
    NET_PRICE1 = ( C * NET_PRICE2 ) / 10000 .
    XKWERT = NET_PRICE1.

  • How to split a value of currency data type...........?

    Hi Abapers,
                       Is there any way by which we can spit values like 1000.11
    i just want the values after decimal like 11 in this case
    Is it possible...?

    The answer is true with a NUMC/decimal field, but is false with a CURR/currency field, not every currency has 2 decimals (most have but not all) so when conversion to character you MUST use a
    WRITE <currfield> CURRENCY <cucyfield> TO <charfield>
    Look at [CURRENCY cur |http://help.sap.com/abapdocu/en/ABAPWRITE_TO_OPTIONS.htm#!ABAP_ADDITION_6@6@] in [WRITE - format_options|http://help.sap.com/abapdocu/en/ABAPWRITE_TO_OPTIONS.htm]
    Regards,
    Raymond

  • Not Able to Load the data type "Non Currency"in Planning accounts dimension

    Dear All,
    We are building Meta data in planning using HAL 9.2 ...while construction of accounts we were able to assign "Currency" Data Type ,but were unable to add the "Non Currency" data types to account members.
    We have mentioned "Non Currency" in the the Data Type Field.
    Thanks in Advance.

    Hi Guys my issue is resolved..... just wanted to let you know that you will need to write "Non-Currency" in the field name in the csv for marking accounts as Non currency data type.

  • Float data types

    I don't really know SSAS but have been a .NET programmer and worked with SQL Server and T-SQL for years.  I am working on a project where there is a database storing sales transactions and a cube that is created nightly so we can get MTD Sales, YTD
    Sales, Profit $, etc.
    I just ran into an issue where I got an error retrieving the Profit $ measure (using an MDX query inside of a SQL stored procedure using OPENQUERY) and found that the profit $ should be 0.07 but is coming back as 6.9999999999993179E-2. After talking
    to our DBA, he said all of the calculations in the cube are double precision floating point and I need to round all results to 2 decimal places (programs like Excel handle the rounding and I should too.)
    Our DBA also claims the measures can't be calculated and returned as currency. He claims that the potential for error is very small and no one has ever complained about a $ value being off.
    I am struggling with this answer because I have always been told never to use floating point for monetary values.  I am having a hard time believing there is no way to have a measure be a currency field that is accurate.  I looked for articles
    online but can't seem to find anything to answer my questions.
    Could someone please point me in the right direction? Thanks so much!

    Your DBA is not completely correct in his claims. All calculations are not floating point below is a link to all of the data types supported by SSAS (Multi-Dimensional)
    https://technet.microsoft.com/en-us/library/gg471558%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396
    SSAS supports a currency data type. It's 4 decimal places not 2, but it is the recommended data type for currency values as it does not suffer from the imprecision of the double data type.
    The other thing measures in a cube have is the concept of a format string, so you can ask the cube to return a pre-formatted value to you. But default an OPENQUERY will just return the raw value, but if you add the following:
    CELL PROPERTIES FORMATTED_VALUE
    to the end of your MDX query that should tell it to return the formatted value (which could be something like "$#,##0.00")
    See here https://msdn.microsoft.com/en-us/library/ms146084.aspx for a list of all the different format masks that can be applied
    http://darren.gosbell.com - please mark correct answers

  • Local Currency - Translation Date Type

    Hi:
    We are on ECC 6.0 with New GL.
    I wanted to check if we can change the Translation Date Type for 1st local currency (10) from Translation date to document date? There are three options in this field - Posting date, document date and translation date. But when we maintain it (under additional local currencies for a company code), local currency has this grey out and comes default to translation date. Not sure where it is defined that local currency can be translated only based on translation date.
    However for 2nd and 3rd currencies this field is open and allow to choose any date type.
    Please advise.
    Thanks,
    Rahul

    Hello Rahul,
    For the local currency, it is hard-coded in the system to
    choose the translation date as the transalation date (type 3). If you
    change this translation date when you enter a document, the system will
    use this new date. However, if you don't change this, the system will
    always use the posting date as translation date for the local currency.
    hope thic clarifies
    Ray

  • Data Types for Currency and Percent?

    I am struggling to find data types in the Power BI Designer for Currency ($) and Percent (%). I see these in many preview screenshots from Microsoft, but I cannot figure out how to implement these critical symbols for visualizations. Also, did someone
    forget to include data labels in the charts? I am finding this tool set to be very limited compared to the previous iteration of PowerQuery and Power BI for Office 365.

    Hello,
    The data type of your field is smallmoney or you want to convert a int or varchar value to smallmoney?
    Hugs!
    Bruno Destro
    Dicas de programação em .net, C# e SQL - http://smcode.com.br/blog.aspx

  • APD problem - data type & currency translation

    Hi,
    I am using APD to get hung number of records from mulitprovider. I use a query to as a source of APD.
    In the query, there is an option to select currency translation in variable screen.
    But I encounter the following problems:
    1. key figures in the output file are in floating point. is it possible to change data type in APD?
    2. when I select currency translation in this query, does APD support currency translation?
    Thanks a lot.
    Regards,
    Helen

    Hi Helen,
    You can use an routine ABAP to change the format of your data type & currency transation.
    Regards
    Romain

  • Create Characteristics, Data Type - Currency

    Hi All,
    I am trying to create characteristics in transaction CT04 for our PO release strategy.
    Data type is Currency. After giving all required details when I press enter the value range becomes NNNNNNNNNNNNN.NN. So I am unable to select value in release strategy classification tab.
    Does anybody have any idea that why values are getting converted to  NNNNNNNNNNNNN.NN.
    Is any configuration missing?
    Is the problem with template?
    Regards
    sapmm1234

    I have done the following settings:
    Charateristrics PO_Value
    Valid from Today Date
    Decription Total Net Order Value
    Status Released
    Data Type Currency
    Number of Class 15
    Decimal Places 2
    Currency QAR
    Template I ahve not selected anything but defaults it is taking NNNNNNNNNNNNN.NN
    Even If I delete this when I press enter It is taking NNNNNNNNNNNNN.NN
    Multiple values & Interval Values allowed
    Additional Data:
    Table CEKKO
    Field GNETW
    Not Ready for Input Checked
    Unformatted Entry Checked
    Propose Template is not checked
    Values
    <= 2500
    > 2500
    <= 10000
    > 10000
    After giving this value when I press enter all values becomes
    <= NNNNNNNNNNNNN.NN QAR
    > NNNNNNNNNNNNN.NN QAR
    <= NNNNNNNNNNNNN.NN QAR
    >= NNNNNNNNNNNNN.NN QAR
    So I could not select any value in RElease strategy --> Classification tab
    Any Idea why Value are getting converted into this format.
    Regards
    sapmm1234

  • Planning metadata - data type "currency" to "text"

    Hi.
    There is a problem.
    As in Calculation Script the data stored in Oracle Essbase (Planning) as number (property data type = currency or nonCurrency or unspecified) to transfer to an element at which property data type = "text".

    Hi,
    Can you clarify your question?
    Data for Planning apps is stored in Essbase. Text is usually stored in the Planning relational database.
    Im not sure I understand what you re trying to achieve. Are you asking about members tagged with the "Text" data type?
    Seb

  • When saving sales order Error determining local currency: ER type 'M' date

    Hi experts
    we have created new sales area for intercompany billing process. we are doing testing for this.
    Update was terminated    
    after saviing sales order express document update was terminated received from author
    sales order Error Info...   M2 802: Error determining local currency: ER type 'M' date 02.08.2011.
    i need your input
    thanks

    Dear Manoj Verma,
    Check the pricing date of the sales order.
    Check the valid from date for the currency types/exchange rate type M in OB08
    Now check whether the pricing date in sales order is before the valid from date in OB08.
    If so , make the valid from date in OB08  as the pricing date in sales order in OB08 and then save.
    Thanks & Regards,
    Hegal K Charles

  • Currency Translation Type in queries using currency conversion

    I have a question on the Currency Translation Type (EUR_VAR) that is used in all of the queries using currency conversion on the fly. (currency is maintained automatically nor in table.)
    User wants to use 2 different exchange rates in a single query. The months in 2010 (Actuals) are to
    be converted using Xchangerate-type EURO and the months in 2011 (Planned) to use Xchangerate-type USD.
    But store different rates with different starting dates. This is however not possible because the Currency Translation
    Type is set-up (1) to work with Query Key date - rather than a characteristic in the data and (2) apparently these
    currency translation types only work with time characteristics like 0fiscyear
    My idea is therefor to:
    1. Create a new variable (similar to EXC_RATE) to prompt for a 2nd Exchange Rate type when query starts
    2. Create a new Currency Translation Type (next to EUR_VAR), referencing the new variable or sticking to fixed Xrate type, fixed to EUR
    Is this possible to create Idea (2)
    Many Thanks in Advance.

    The best way would be to create two curr conversion types , one converting to EUR and other to USD .Put them in properties of coressponding KFs in query.For timref in RSCUR , variable time ref can be used individually for two conv types.

Maybe you are looking for