Reg : conversion from BigDecimal to Decimal

Hi All,
I have a BigDecimal value in my application . I want to change it to decimal value. What is the method to be used and what is  the procedure?
Thanks in advance.

Hi Bharath,
  I think  You want to convert BigDecimal to a double valueI (Since No 'Decimal'   type is there in java)
Trythe method,
public double bigDecimalToDouble( java.math.BigDecimal bigDecimalVal )
    //@@begin bigDecimalToDouble()
    double val1=Double.parseDouble(""+bigDecimalVal);
    return val1;
    //@@end
let me know whether oit is useful for you.
thanks
Smitha

Similar Messages

  • Calling a procedure from java, conversion from bigdecimal to number(13,3)

    Hello
    i have a procedure that i call from a java api
    among the parameter that i give to the procedure there is a bigdecimal parameter
    then i have to insert this value in a table
    the colum concerned has number(13.3) as a type
    here is the java call :
    ps.setBigDecimal(5,value );
    so what type should i declare for the procedure parameter for the bigdecimal parameter
    and is there a conversion to do
    Regards
    Sallemel

    Data types are defined by the data not a column definition. What are the range of values possible in the data that must be manipulated. Give examples.

  • Conversion from Binary to decimal - Need help

    Hi guys,
    I am new here and learnt some very basic Java before. I have a program that is in C++(to convert a binary number to decimal) that I found in the internet that interest me a lot. I am thinking whether this can be re-write in Java. I have tried to searh for solution but to no avail. I am wondering whether you guys can suggest a solution to this. Below are the source code in C++ :
    #include <iostream.h>
    #include <stdlib.h>
    int main()
    // part 1 : declaration
    int Bin, Dec, TempBin;
    int div;
    char valid, again;
    do {
    // part 2 : Repeat asking the value of the binary number
    Bin = TempBin = 0;
    do {
    cout << "Please input a binary number (1 to 10 bits) : ";
    cin >> Bin;
    TempBin = Bin;
    do {
    if ((TempBin % 10)==0 || (TempBin % 10)==1) // Note (1)
    valid='Y';
    else {
    cout << "Invalid pattern! use 0's and 1's only\n\n";
    valid='N';
    break;
    TempBin = (TempBin/10);
    } while (TempBin>0);
    } while (valid=='N');
    // part 3 : Convertion
    div = 1;
    Dec = 0;
    TempBin = Bin;
    do {
    Dec += (TempBin % 10)*div; // Note (2)
    div *= 2;
    TempBin = (TempBin/10);
    } while (TempBin>0);
    cout << "\nThe binary pattern " << Bin << " is equal to "
    << Dec << " in decimal pattern.\n" << endl;
    // part 4 : try another number ?
    cout << "\aTry another number (Y/N) : ";
    cin >> again;
    cout << "\n";
    } while (again=='Y' || again=='y');
    cout << "\n" << endl;
    system("PAUSE");
    return 0;
    Appreciate your help. Thank you.
    CK

    So for Java, in your example, it takes a Java
    String like "1001" and converts it to an int whose
    value is one thousand and one. Can suggest a code for
    this that takes user input str and convert to bin int.
    I read books and noticed they are various ways to do
    that. I am quite confused actually. It is like there
    is no fix way to do that, unlike C++ which is more
    easier to understand(in my opinion). Probably, because
    I knew C better than Java.
    The 'standard' way to take a String and convert it to an int...
    int TempBin=Integer.parseInt(your_string);
    You seem to be saying that you do not want to use the standard method, so you should not complain that there is no standard method. Here's some code that re-uses most of your modulo 10.
    import java.io.*;
    public class Test {
         public static void main(String []args) throws IOException {
              BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
              String result=null;
              while(true) {
                   String input=bf.readLine().trim();
                   try {
                        long v=Long.parseLong(input);
                        result=toBin(v);
                        System.out.println(result);
                   } catch(NumberFormatException e) {
                             System.out.println("Only enter 1 or 0, nothing else!");
                   System.out.println();
           public static String toBin(long btemp) {
              long temp=btemp;
              do {
                   if ((temp % 10)!=0 && (temp % 10)!=1) {
                        System.out.println("Invalid pattern! use 0's and 1's only\n\n");
                        return null;
                   temp = (temp/10);
              } while (temp>0);
              // part 3 : Convertion
              int div = 1;
              int Dec = 0;
              long TempBin = btemp;
              do {
                   Dec += (TempBin % 10)*div; // Note (2)
                   div *= 2;
                   TempBin = (TempBin/10);
              } while (TempBin>0);
              return ""+Dec;

  • Measuring point reading conversion from FLTP to Decimal

    Hi Friends,
    I want to create view for measuring document (Plant Maintenance). In view I want to select following fields.
    Counter Reading
    Measurement Reading/Total Counter Reading
    Counter Reading Difference
    All above columns have data type FLTP where as I want to convert it into decimal and want to show using view.
    Kindly suggest...
    Pankaj

    CALL FUNCTION 'MURC_ROUND_FLOAT_TO_PACKED'
    EXPORTING
    IF_FLOAT = v_values_tc-atflv
    IF_SIGNIFICANT_PLACES = 15
    IMPORTING
    EF_PACKED = numerico
    * EXCEPTIONS
    * OVERFLOW = 1
    * OTHERS = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE numerico TO v_atwrt_tc.

  • Reg: Conversion from amount in values to amount in words

    Dear All,
    Want to convert amount value into words and it will displays on UDF which is created in Marketing document. How can i do that.
    Plese help me
    Thanks & Regards
    Venkatesh N

    Hi Venkatesh,
    You need to write a UDF to achieve the requirement.
    Check the below link, this will help you to code:
    http://www.java-samples.com/showtutorial.php?tutorialid=1156
    Thanks,

  • Problem in price conversion from INR to USD- Urgent

    Dear All,
    In the export sales scenario, we are having the contract with customer in INR and based on that value only the excise invoice should be raised. After 2-3 days commercial invoice is to be raised based on the exchange rate applicable on that date.
    I have created sales order in INR, did proforma invoice based on order then delivery document & then excise invoice based on proforma order. Then to raise the commercial invoice, i go to change mode of order to change the currency from INR to USD. The conversion from INR to USD is not happening correctly, it is showing the lesser value than the actual value.
    I have maintained exchange rate type as BLB under CIN company code settings & then assigned same in sales data of customer master. The exchange rate is also maintained in OB08 for M as well as BLB type but still the conversion is not happening correctly.
    Can anybody please suggest me the cause & solution for this urgently.
    Thanks & Regards,
    Antima

    Hi
    When you change the copy control settings it will consider the exchange rate that is maintained at the time of billing.
    i.e. if you have order of a previous day and billing of some other day then in that case if the exchange rate is changing on the billing date then it will consider the exchange rate of the billing date.
    Hence when you are creating the billing document check the exchange rate getting picked (Whether it is on the billing date or order date).
    I didnt get your other problem. Do you want to change the decimal places in the Currency? (You are in big trouble. If that is so). The settings for the same is available in customising SAP Netweaver > General Settings > Currencies > Set Decimal Places.
    BE EXTREMELY CAREFUL BEFORE USING THIS.
    Please clarify your doubt if that is not the case.
    Regards
    Sunil

  • Getting ÿþ as saved conversations from Lync in Outlook in Office 2013

    Hi,
    I've been trying to get to the bottom of this and have found similar posts, but no one seems to have an answer.
    When I IM someone using Lync 2013, they get a pop up notification but instead of the message they see ÿþ<.  Once they open the chat window, they can see my typed text.  Occasionally, certain people can't see the first line of my chat, but as
    long as they keep the chat window open, they can see everything new I type.
    All my conversations that are saved in outlook show ÿþ< for the text and are unreadable.  I've disabled the saving of conversations because they have become worthless.
    I believe it has to do with BOM but have not been able to find a way to fix this.
    If I copy a conversation from the chat window and paste it into Microsoft Word it shows ÿþ<, but if I paste it into notepad the conversation appears.
    (I had inserted a screenshot here, but am unable to because I am unable to figure out how to get my account "verified")
    I've tried changing the preferred encoding for outgoing messages: to Unicode (UTF-8) in Outlook, but this had no effect and I can't find a similar option in Lync 2013.
    (I had inserted a screenshot here, but am unable to because I am unable to figure out how to get my account "verified")
    I enabled logging for Lync and the event IDs that come up are 1, 11 and 12, to which I cannot find any information for at the moment.
    Any help and or suggestions would be appreciated.

    Hi,
    Did the issue happen only for you or for multiple users?
    Please try to delete Lync User Profile and information on Registry, then repair Office 2013.
    The path of Lync User Profile: %UserProfile%\AppData\Local\Microsoft\Office\15.0\Lync
    The path for information on Registry: HKCU\Software\Microsoft\Office\15.0\Lync\[email protected]
    Then test the issue again.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Project Conversion from 11.03 to R12- need help

    Hi All,
    I need some information regarding conversion from 11.03 to R12 along with Capital Project's conversion, do we need to take care Asset Assignment and Assets information at the time of Project Conversion. Iam doing Project and Task conversion different. Is there any good mapping document or Conversion FD, if any body have please send my mail ID. [email protected]
    Thanks for your help.
    Thanks,
    Srini..

    Usually only Open Invoices and Unapplied Receipts are migrated from Old system to New Instance.
    Post Migration Reconciliation shall be tough in that scenario. Reconsider/Rediscuss with Client.
    Migration can be done using APIs or Custom Scripts using Standard Interfaces.
    Hope this is helpful
    Regards,
    Sridhar

  • Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view. Also, when I go to enter a new event in google calendar, I now have to click the cursor in the box to type the event (it used to let me just start typing).

    Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view (either one or several conversations) as it says "No Conversations Selected" when I have selected one or several. Also, when I go to enter a new event in google calendar, I have to click the cursor in the box to type the event (it used to let me just start typing) or else it flips out and starts jumping to day view or another month. Does anyone know how to fix either of these?

    I have had this problem; but while trying to fix another problem, I reset my preferences for Firefox and it fixed this problem as well. To reset preferences, follow this link: http://support.mozilla.com/en-US/kb/Resetting%20preferences

  • How can I print a text message conversation from my iPhone? Not using screenshots.

    How can I print a text message conversation from my iPhone? Not using screenshots. It's around 500 messages so screenshots is not a option.

    Yes, you can delete from iphone:
    http://manuals.info.apple.com/enUS/iPhone_iOS4_UserGuide.pdf
    It is covered in the manual.
    Page 172:
    "Delete a podcast: In the Podcasts list in iPod, swipe left or right over the podcast, then
    tap Delete. "

  • Page numbers incorrect after conversion from Excel to pdf

    Page numbers incorrect after conversion from Excel to pdf
    ""This above link (thread:834599) is from a case back in 2011 that claims to solve this problem, but it does not solve this problem. I think that customer only cared about having continuous page numbering, not discrete page numbering per sheet.
    ========================
    I still have this issue in Acrobat XI and MS Office Professional Plus 2010. I keep upgrading to no avail. This regression has resulted in a huge time drain for me. If you fixed it, please explain how I can get my hands on the resolution.
    Previous versions of Excel and Adobe Acrobat enabled flexibility around the "Page #" of "Number of Pages" (Page &[Page] of &[Pages]) token, depending on context and usage. The "# of pages" token could represent EITHER the number of pages in the workbook OR the number of pages in the tab/sheet, depending on how you generated the PDF:
    You could select "Selected Sheets" and then select all or some of the individual sheets in the workbook, and the PDF would honor the discrete numbering of each of the sheets, so the first page of each sheet was p1 and the "# of pages" was the number of pages in the sheet; not the number of pages in the workbook; or
    You could select "Entire Workbook" and the PDF would honor continuous page numbers across all sheets, as a single document.
    Now, it only honors the total number of pages in the workbook, regardless of the method you use to publish to PDF: saving as PDF, printing to PDF, using "createPDF" from Acrobat plugin to Excel's menu ribbon; selecting all sheets, some sheets, or Entire Workbook; automatic First page number or "1" under Page Setup > Page> First page number. (This last option, btw, does restart every sheet at p1, but it hardly makes sense if the total number of pages is still the total number in the workbook instead of the number in the sheet.)
    I spent a lot of time trying each which way that the blog posts recommended and have tried this on multiple versions of Excel and Acrobat now.
    NONE of these time-consuming experiments gave me what I wanted.They all insist that "Page #" of "Number of Pages" (Page &[Page] of &[Pages]) is the total number of pages in the workbook or the total number of pages in the selected sheets combined.
    The numbering are correct in Excel Page Layout.
    The same issue happens when using LibreOffice calc. (Although, I never tested with Libre Office before, so I don't know that it ever worked).
    The workaround now is to create PDF for each spreadsheet one at a time, and then compile them using the Acrobat combine/binder feature. All alternatives are extremely time consuming and tedious. It used to be automatic. This is a major regression that has gone untreated for over a year now, maybe two years.
    My task takes infinitely more time to complete than it did with previous versions of Acrobat. That means that days are added to my project, when the functionality used to enable a quick pdf generation that was ready for review, now I have to do this very manual time-consuming set of steps to generate a draft. As the project has grown and more tabs are added, my pdf-generation task takes that much longer. We require lots of drafts. It used to be easy and fast. Now it is hard and time-consuming.
    In my opinion, the problem is not Excel; it is Acrobat because it was introduced with an upgrade in Acrobat, not an upgrade in Excel. The problem was introduced in Acrobat 9 or 10. Please provide a patch or add-on or something.

    If you are setting up the page numbers in Excel, the resulting PDF would display the the page numbers created in Excel. On Excel 2010 support page, (http://office.microsoft.com/en-us/excel-help/insert-and-remove-page-numbers-on-worksheets- HA010342619.aspx#BM2) is stated the following "tip" which indicates by default Excel 2010 starts numbering each tab with 1. Exel's workaround tip is below - 
    Set a different number for the starting page
    Tip   To number all of the worksheet pages in a workbook sequentially, first add page numbers to all worksheets in a workbook, and then use the following procedure to begin the page number for each worksheet with the appropriate number. For example, if your workbook contains two worksheets that with both be printed as two pages, you would use this procedure to begin the page numbering for the second worksheet with the number 3.
    On the Page Layout tab, in the Page Setup group, click the Dialog Box Launcher next to Page Setup.
    On the Page tab, in the First page number box, type the number that you want to use for the first page.
    Tip   To use the default numbering system, type Auto in the First page number box.
    Also helpful in the same section is the note on viewing page numbers. To see if the page numbering dilemma originates in Excel make sure you are using the Page Layout View see below:
    Hide All
    If you want numbers shown on pages when you print a worksheet  you can insert page numbers in the headers or footers of the worksheet pages. Page numbers that you insert are not displayed on the worksheet in Normal view — they are shown only in Page Layout view and on the printed pages.
    Overall it may be easier not to create the page numbers in Excel but instead create then in Acrobat using the Headers and Footers option in Acrobat.  I hope this helps - it sounds like a frustrating issue you are experiencing.

  • I can´t sync iCal events written in the iphone4 to the macbook ical, but conversely from macbook to iphone there´s no problem, can somebody help me?

    I can´t sync iCal events written in the iphone4 to the macbook ical, but conversely from macbook to iphone there´s no problem, can somebody help me?

    Thanks for your answer! I tried as you say, erase the Sync History, but now does not sync any calendar, only displays the birthday ...do not know whatelse to try.

  • Conversion from string "20041023 " to type 'Date' is not valid.

    Hi ,
       I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report. 
    Following methods i tried in textbox expression but no luck.
    =Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
    =Cdate(Fields!EmpHireDate.Value)
    Error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023  " to type 'Date' is not valid.
    Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
    Thanks,
    Kittu

    Hi Jmcmullen,
         Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
    , when i use above expression values(ex:"20141023")
    are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
    Even i tried to pass its original value("00000000") as below but no luck.
    =IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Also tried this:
    =IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Please Suggest. 
    Thanks ,
    Kittu

  • Error while loading : Time conversion from 0CALDAY to 0FISCPER

    Hi ,
           I get the following error when loading to an ODs .
    My 0FISCPER is mapped to one of the date fields from the extractor (Document date) and also Have 0FISCVARNT as part of data fields  .
    " Time conversion from 0CALDAY to 0FISCPER (fiscal year ) failed with value 20060405 " .
    thanks .

    Hello CG
    Please refere this forum
    Time conversion problem
    Thanks
    Chandran

  • ITunes will no longer play nor add to the library any mp3 files which I have created by conversion from a wav file.

    I am running iTunes 10 on XP Pro and it will no longer play those mp3 files which I have created by conversion from wav files.  I tried to delete some from the library and then re-add them but iTunes will not add them back to the library.
    Can anyone help solve this, please?

    Back up your purchased music before you upgrade, I've read at least 5 cases where purchased music has just gone.....missing.
    That is not supposed to happen, didn't happen to me or thousnds of other iTunes users, but you don't want to be the 6th person, do you?
    There are two things to try before you upgrade:
    Barbara Hall, "Unknown Error (-208)" #1, 07:42pm Oct 19, 2005 CDT
    http://docs.info.apple.com/article.html?artnum=302478

Maybe you are looking for

  • Excise Invoice Number column in T code FAGLL03

    Hi All, In the standard SAP Report (T code FAGLL03) G/L Account Line Item Display,client wants Excise Invoice Number column. We have brought the Billing Document Number for G/L account reconcilation. Please help me out for the above. Regards, Hemant

  • Issue with isMultiSelected

    Hi I have a scenario where I have to select two rows from ATable and one row from BTable. The issue with multiselected method is : It will always ignore the first row slection from the A table. i.e We are able to select the first row of the A table b

  • Data in Matrix not showing

    I cannot get the data from my query to show in the relevant matrix columns: oForm.DataSources.DBDataSources.Add("OQUT")             'Create Datatable and populate with query             oForm.DataSources.DataTables.Add("oMatrixDT")             oForm.

  • How startTValue works ?

    Hi, When I draw a Path in Illustrator then I write a text on it, I wan't to get back the startTValue of the TextFrame. When the drawn path isn't closed, I understand the startTValue : If I have 3 points drawn, the startTValue of the text will be betw

  • I attmepted to down load firefox to my laptop. The download stops at 70% complete and doesw not finish.. I have tried downloading it twice.

    I am attemptin to install firefox on my laptop. I have tried it 2 times. Both times it stopped at 70 or 80 percent conmplete and did not finish . The first time it timed out because it was taking to long.