Formatting Currency Value

hi,
In my page i have a table that displays values from the database. To do this, i have created a VO programmatically, since the VO has to change dynamically.
In my database one of my column is of type NUMBER and shows the value like 10000.00. What i want is when i display this value in my OAPage, i want it to be formatted to 10,000.00. I dont have any EO, i have created the VO also programmatically.
I have a basic idea that i have to use decimalFormat for this, but i am not know where and how should i use it.
Please help me regarding this.
Thanking you
ri

Hi,
Using OATotalRowBean, i have wrriten the following statements to format the total values displayed in each and every column of a table whose Totalling is set to true.
OATableBean tableBean = (OATableBean)webBean.findChildRecursive("Table");
     if(tableBean != null)
          OATotalRowBean totalRowBean = (OATotalRowBean)tableBean.getColumnFooter();
System.out.println("Formattotal : "+totalRowBean);
if (totalRowBean != null)
oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
totalRowBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
In the guide its mentioned to use getColumnFooter method of a tablebean. Even the example uses like the above. But when i do a dot after the tableBean ie in its intellisense the getColumnFooter() method is found striked. Still if i use it as above to format the total value, nothing is being formatted in my page and the variable totalRowBean returns a null value. I dont know where and what is wrong with this.
Please help me in formatting the total value of table's each and every column to currency as formatted in the column values.
Thanking you
ri

Similar Messages

  • Is it possible to use format-currency() inside set_variable()?

    Hi gurus,
    I have a few numbers to sum up for the report, and I want to round the numbers according to the currency before they are summed up. What is the best way to achieve this?
    The way I can think of is:
    To around the number I can use <?format-currency:VALUE; CURRENCY; 'false'?> in the template. Then initialize a variable SUBVALUE=0 and then add each rounded numer to this variable:
    <?xdoxslt:set_variable($_XDOCTX, 'SUBVALUE’, xdoxslt:get_variable($_XDOCTX, 'SUBVALUE’) + (format-currency:VALUE; CURRENCY; 'false'))?>
    However, I'm getting error indicating that I can't use format-currency:VALUE inside set_variable() in this way...Am I using the function wrongly? Or is there another function that can achieve this?
    Appreciate your help :)
    Sophy

    Hi Tim,
    As you said, the reason that why I have to add after rounding is to avoid the 0.01 issue. Our PM requires the numbers shown in report to be mathematically correct, so if we add before rounding then we'll have sub-toatal and totals different by 0.01 or so.
    And since I need to round the values according to the currency, I can't round it in the query...I have to use format-currency in the template to do the rounding.
    Thanks :)
    Sophy

  • How to display currency values in indian format

    hi all,
       When I am displaying Currency values as output , those are displaying in U.S. format (ie.1,234,000.00) , But I need to display those in Indian Rupee format (i.e 12,34,000.00).
    Plz any one can help me that how to display this
    thank you,
    regards
    Hanuma

    Hi Hanuma kumar, please try this code.
    REPORT ZAMOUNT_CONVERSION.
    DATA : RESULT1(20).
    PARAMETERS : NUM TYPE P DECIMALS 2.
    DATA : num2 type STRING.
    DATA :  col_amt(20) type n,"15
             col_b type i,
             num_1(20) type C,"15
             Length type i.
    num_1 = num.
    write : 'default format      :',num.
    uline.
    skip.
    IF ( num >= 999999999 ).
           write num_1 using edit mask 'RR__,__,__,__,______' to col_amt.
           CONDENSE col_amt.
           length = STRLEN( col_amt ).
           if length = 16.
             REPLACE first OCCURRENCE OF ',' in col_amt with space.
             write :/'amount indian format:',col_amt.
           else.
           write :/'amount indian format:',col_amt.
           endif.
    ELSEIF NUM < 999999999 AND NUM >= 9999999.
           write num_1 using edit mask 'RR__,__,__,______' to col_amt.
           condense col_amt .
           length = STRLEN( COL_AMT ).
           if length = 13.
             REPLACE first OCCURRENCE OF ',' in col_amt with space.
             write :/'amount indian format:',col_amt.
           else.
             write :/'amount indian format:',col_amt.
          endif.
    ELSEIF NUM < 9999999  AND NUM >= 99999.
           write num_1 using edit mask 'RR__,__,______' to col_amt.
           condense col_amt .
           length = STRLEN( COL_AMT ).
           write :/'amount indian format:',col_amt.
    ELSEIF NUM < 99999.
       data : dumy(10) type c.
       dumy = num .
       CONDENSE dumy.
       length = STRLEN( dumy ).
         if length <= 6.
           write :/'amount indian format:',num.
           else.
           write num_1 using edit mask 'RR__,______' to col_amt.
           write :/'amount indian format:',col_amt.
          endif.
       ENDIF.
       uline.

  • How can i get currency values from flatfile to function module

    Dear All,
               I have to take  currency values from flat file and i have to assign those flat file value to function module .
    Eg: "Convert_to_local_currency".  I need technical code how to calculate those amount in work area and how to assign those amount value function module. 
              I need sample program for currency conversion from flat file to function module.  My requirement is based on flat file amount i have to calculate in work area and assign those work area to function module. 
    With Regards,
    Baskaran

    Hi Satish or Baskaran,
    First conform in which format the flat file is present, as abhi mentioned if it is there in notepad
    try to use F.M GUI_UPLOAD as shown below...
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
    FILENAME = 'C:\Desktop\rpf1.TXT'
    TABLES
    DATA_TAB =  ITAB.
    Now loop at ITAB Into Work_area and press the respect currency fields which you want and in the same way
    if the file is in EXCEL format use F.M ALSM_EXCEL_TO_INTERNAL_TABLE
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename = P_FNAME
          i_begin_col = 1
          i_begin_row = 1
        TABLES
          intern = ITAB
    LOOP AT ITAB INTO WA.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
            EXPORTING
              foreign_currency = wa-waers
              local_currency   = wa-waers
               IMPORTING
              local_amount     = tvals-gross.
        ENDIF.
    endloop.
    And as mentioned loop the records into work area and process the currenct field which is present in the
    ITAB according to its field name. And make sure within the loop you call your function module.
    Regards
    VEnk@
    Edited by: Venkat Reddy on Dec 9, 2009 5:51 PM

  • SSRS expression for difference between two currency values

    Hi All;
    I need to get the difference between two currency values
    Below is my report
    I need to get differene between Actual Income and Profile Income and this value should be in "£" In this example it should be £0.00
    Any help much appreciated
    Thanks
    Pradnya07

    =sum(Fields!ProfileIncome.Value - Fields!ActualIncome.Value)
    This could have either field first, but depends on which field is expected to be larger. You would then format the textbox to show in pounds.
    HTH

  • COMMA IN CURRENCY VALUE FOR INR

    value is coming like this 970,167,543.21
    i need the indian currency value  in this format  97,01,67,543.21 .
    i have used write statement with currency addition ...and am checking for any fm ot put the comma for indian currency .
    definitely this function module CONVERT_TO_LOCAL_CURRENCY will wont work....
    so any help on this ....

    Hi,
    Please find the code Below
    Define the variable W_amount as character:
    data: W_amount TYPE p LENGTH 8 DECIMALS 2 VALUE '10000.00'.
    data: w_amount(10).
    Then write the below statement
    write: w_amount to w_amount no-grouping.
    This statement will move the value of w_amount to w_amount without separator.
    Hope this helps.
    Thanks
    Kalyan B

  • How to enter the currency value Flex mobile

    Hi, friends, I type from Brazil
    how to enter the currency value in textinput
    format BR ( Brazil )?:
    Thank's

    Hello Ashok,
             Using the same BAPI , set the field R_3_USER of the tables parameter TELEFONDATA to 3 to save the mobile number.
    Hope it helps.
    Thanks,
    Sriram S

  • Formatting Currency as $#.#M

    Hi All,
    Within my SSRS 2012 report I have some currency values in either thousands or millions of dollars, i.e.
    $49,987, $1,234,483, $235,785, etc.
    Due to space limitations of a PowerPoint export I'm working on I'd like to translate the values into equivalents of
    $50K, $1.2M, $236K. 
    I've tried a few custom formats however I've not been able to get SSRS to display what I'm trying to do - anyone have any suggestions or tips?
    Thanks in Advance.

    Hi,
    Yes you cant find the format function which will give K or M .
    You can write IIF to do such kind of formatting as per the data.
    Create two place holders, first place holder you write expression as below:-
    =iif(len(cstr(Fields!Moneyformat.Value)) <=6 ,(round(Fields!Moneyformat.Value/1000)),(Fields!Moneyformat.Value/1000000))
    Second place holder, write below expression as below:-
    =iif(len(cstr(Fields!Moneyformat.Value)) <=6 ,"K","M")
    in first expression go to properties and go to format options and set below expression:-
    =iif(len(cstr(Fields!Moneyformat.Value)) <=6 ,"'$'#,0","'$'#,0.0")
    ThanksPrasad

  • Rounding when using format-currency

    Hi all,
    We're using format-currency in several places in out reports. I.e.
    <?format-currency:ssLfBonusAmountContributing;'EUR';'true'?>
    When using this formatting we always get the value with 2 decimals.
    Is it possible to round and display without decimals?
    Regards,
    Hakan

    Hi all,
    Haven't anyone come across this issue, with currency-format and display value without decimals?
    I know that I can use number-format, but this is not then first option.
    Regards,
    Hakan

  • Right Align the Currency values in ALV report

    Hi Friends,
    I have developed a report and displayed the output using the ALV. I have columns for currency values in the output table.
    The fields for currency values are character fields. The values in the table for display, is properly right aligned (default for currency values). But in the output, the currency values are left aligned.
    Since I need blank lines in the output table after each entry, I have used the character fields in the output table so that I can clear them and append it to get the blank line.
    Please suggest me to get the currency values right aligned.
    Thanks in advance.

    try with this field in field catalog.
             just(1)        type c,        " (R)ight (L)eft (C)ent.
    for the currency field add this field too in field catalog. it will work.

  • Display Currency Value of User POV for Entity & Value in Text Box (Header)

    I am looking for a function in Financial Reporting Studio that operates the same as the HsCurrency function in Smart View. This would allow batch reports displaying the currency value of the User POV for Entity based on the User POV for Value. Right now I have to have Member Lists for separate reports and different currencies as I am only able to display the Value dimension in the heading of a given report. Users will not be certain of the currency if the Value dimension is <Entity Curr Total>.
    I tried the HFMCurrency text function, however the entity is not defined in a Row / Column / Page reference as the entity is determined by the User's Point of View.
    Is there a way to display the currency value of a User's Point of View for Entity based on the User's Point of View for Value?
    Reference from Oracle Hyperion Smart View for Office, Fusion Edition, User's Guide:
    HsCurrency
    Data sources: Financial Management, Hyperion Enterprise
    HsCurrency retrieves the currency value of the specified dimension member. Entity and Value are the only valid members for the HsCurrency function.
    Syntax
    HsCurrency (“Connection,Entity;Value”)
    Example
    In this example, HsCurrency retrieves the entity currency where the currency for the East Sales entity is USD, and the currency for the UKSales entity is GBR. The EastSales entity displays USD, and UKSales displays GBR.
    HsCurrency(“Comma”,”Entity#EastRegion.EastSales;Value#<Entity Currency>.”)
    HsCurrency(“Comma”,”Entity#EastRegion.UKSales;Value#<Entity Currency>.”)

    Question answered in My Oracle Support Community - Hyperion Reporting Products:
    communities.oracle.com

  • Currency value in BAPI_ACC_DOCUMENT_POST

    Hi All;
    in order to post payments i use BAPI_ACC_DOCUMENT_POST. There are many payment lines (posting key 40) and one vendor line (posting key 31). i have filled in tables header, account_gl, accounts_payable and currency-amount accordingly. When i run the function it issues an error stating 'use another currency other than ..'. I have tried with different currencies but the error keeps coming. I pass the currency value in account payable and currency amount tables. how can i sole this problem, is it smt. with FI customising?
    Thx
    ali

    Hi,
    here is my code:
        clear header.
        header-comp_code = '1100'.
        header-username = sy-uname.
        header-bus_act = 'RFBU'.
        header-pstng_date = budat."kyt_tarih.
        header-doc_date = bldat."g_tarih.
        header-doc_type = 'SA'.
        append header.
        clear vendor.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = lifnr
          IMPORTING
            output = lifnr.
        vendor-vendor_no = lifnr.
        vendor-comp_code = '1100'.
        vendor-itemno_acc = sayac.
        vendor-tax_code = mwskz.
        vendor-pymt_amt = 0 - toplam.
        vendor-pymt_cur = waers."'TRY'.
        vendor-pymt_cur_iso = waers.
        append vendor.
       clear tax.
       tax-itemno_acc = sayac.
       tax-gl_account = zco_benzin_match-hkont.
       tax-tax_code   = mwskz.
       append tax.
        clear amount.
        amount-itemno_acc = sayac.
        amount-currency = waers. "'TRY'.
        amount-currency_iso = waers.
        amount-curr_type = '00'.
        amount-amt_doccur = 0 - toplam.
        amount-amt_base = 0 - toplam.
        append amount.
        loop at itab.
          sayac = sy-tabix.
          clear accountgl.
          clear tax.
          clear amount.
          clear zco_benzin_match.
         if itab-kostl co numbers.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = itab-kostl
            IMPORTING
              output = itab-kostl.
         endif.
          select single * from zco_benzin_match where kostl = itab-kostl.
          accountgl-itemno_acc = sayac.
          accountgl-comp_code = '1100'.
          accountgl-pstng_date = budat."kyt_tarih.
          accountgl-doc_type = 'SA'.
          accountgl-gl_account = zco_benzin_match-hkont.
          accountgl-vendor_no = lifnr.
          accountgl-tax_code = mwskz.
          accountgl-orderid = itab-plaka.
          accountgl-item_text = itab-tip.
          append accountgl.
         tax-itemno_acc = sayac.
         tax-gl_account = zco_benzin_match-hkont.
         tax-tax_code   = mwskz.
         append tax.
         it_accounttax-acct_key   = 'VST'.
          clear amount.
          amount-itemno_acc = sayac.
          amount-currency = waers.  "'TRY'.
          amount-currency_iso = waers.
          amount-curr_type = '00'.
          amount-amt_doccur = itab-wrbtr.
          amount-amt_base = itab-wrbtr.
          append amount.
         if not zco_benzin_match-hkont is initial.
           move itab-wrbtr to tutar.
           translate tutar using '.,'.
         endif.
        endloop.
        if not test is initial.
          CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
            EXPORTING
              DOCUMENTHEADER          = header
            CUSTOMERCPD             =
            CONTRACTHEADER          =
            TABLES
              ACCOUNTGL               = accountgl
            ACCOUNTRECEIVABLE       =
              ACCOUNTPAYABLE          = vendor
             ACCOUNTTAX              = tax
              CURRENCYAMOUNT          = amount
            CRITERIA                =
            VALUEFIELD              =
            EXTENSION1              =
              RETURN                  = messages
            PAYMENTCARD             =
            CONTRACTITEM            =
            EXTENSION2              =
            REALESTATE              =
            ACCOUNTWT               =
        else.
          CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
            EXPORTING
              DOCUMENTHEADER          = header
            CUSTOMERCPD             =
            CONTRACTHEADER          =
            TABLES
              ACCOUNTGL               = accountgl
            ACCOUNTRECEIVABLE       =
              ACCOUNTPAYABLE          = vendor
             ACCOUNTTAX              = tax
              CURRENCYAMOUNT          = amount
            CRITERIA                =
            VALUEFIELD              =
            EXTENSION1              =
              RETURN                  = messages
            PAYMENTCARD             =
            CONTRACTITEM            =
            EXTENSION2              =
            REALESTATE              =
            ACCOUNTWT               =
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait   = 'X'
            IMPORTING
              return = messages.
        endif.
    Thx .
    Ali.

  • Problem in formatting Total Value in advanced table

    I want to format Total Value for each column to USD format i am able to do for Column values but for Total Value i am not able to make it, i reffered all the previous threads and tried nothing worked out, can any one help me out its very urgent
    Thanks
    Babu

    First thing is as Tapash has pointed out, How did you do it which is not working? Second point is that there is straight forward mention of this scenario in Advanced table section of the Dev guide. Have a look.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to format the value in narrative ?

    Hi Experts,
    In BIEE 11,
    How to format the value in narrative , such as separator.
    In table or pivot property, I have set the separator for measure , but in narrative, the format will be disappeared. So how to implement this requirment?

    I had this problem with 11.1.1.6.0
    If you want this format as the default display format for this column everywhere, then you can save that format as default display format for the column or data type (Lower right corner of data format tab: "Save as Default" button, "Save as the system-wide default for "Table"."Column"). When I had the problem the narratives did use the default display format.
    Another workaround could be a direct database call to convert the data to a string. For example, in Oracle
    EVALUATE('TO_CHAR(%1,%2)' AS CHAR(30), “Table".“Column" ,'$9,999.00')
    but you may need to set EVALUATE_SUPPORT_LEVEL in your nqsconfig.ini, and this ties you to the database technology.

  • Exported currency values are not seen as numbers

    Hee Guys,
    I've asked this question a couple of weeks before but I didn't really get an answer. I am astounded that I'm the only one that has this problem but our application mostly works whith currency values. And our reports revolve around these numbers. But whenever I download these reports to excel the currency fields are seen as text and I cannot use any formula on this data. Even after I remove the currency sign and change the number into a number field. I just don't get it!
    We need to process the data from our reports and use calculations to compare the data with data which is not in CRM On demand. How do I do this when I can't use the reportingdata?
    Anyone any thoughts? The only workaround I found is by downloading as .CSV and then placing 'text to collumns' but this is very time consuming
    Thanks in advance!

    Hi,
    is it possible to show the report currency (=user currency) in the column header? I tried to use VALUEOF(NQ_SESSION.USER_DEFAULT_CURCY) in some way, but failed.
    We do not want the currency symbol in the column (because of excel export), but somewhere the currency should be written...
    Kind regards
    Michael

Maybe you are looking for

  • Sequence settings for HDV 720p 24 fps

    Okay, now that the French is gone I'm back on track, but still confused. I've captured my HDV 720p @ 24FPS footage using LumiereHD & it's separated & ready to go. What sequence settings/editing timebase should I use? I've noted people here saying DVC

  • How to access Workfow Container data in a program.

    Hello I need to a access Workflow COntainer data for a particular workitem in a program. How to access these using Tables or standard function modules. Thanks in advance.

  • Sending e-mail on i pad

    I have set up my account on my  I pad and can receive e-mails but am unable to send. I have no problem on the BT web Site All the settings seem to be ok. Using IMAP 993 incoming 465 outgoing ssl enabled . My password and user name are correct Solved!

  • Create jsp form?

    I have a very basic problem.I am a newbie and I have to construct a jsp page with two input fields and a submit button which when clicked runs a query, gets the data from tables and display it on the jsp page. Steps I have taken so far: 1. created a

  • Basic question on folders

    new to mac so hang with me but , can anyone tell me how to create a word document inside a new folder that i create on the desktop. No problem setting up the initial new folder. But how do i add text to that folder...thanks