Decimal output format

How to print 1.25756 into 1.26?
Is it using DecimalFormat?

Just to add another point, resist the temptation to declare anything static until you need to, especially when you start programming. Static variables may be accessed across all objects of that class. Their counterparts are instance variables, which are non-static and are accessible only to the current object, not all objects of a given class. Static methods work slightly differently. A static method may be called without instantiating a class. That is why main() is static. Java needs an entry point for your application, before even creating an instance of an object.
- Saish

Similar Messages

  • Output Format for Amount in SAP Script PO

    Hi,
    In my Standard SAP Script PO Form 'MEDRUCK', all amount values are getting printed in the form 1.234.567,89 but I want them to be in the Form 1,234,567.89 .
    For doing this I have gone in T-Code SU3 and set the default decimal notation as
    X 1,234,567.89 . 
    I have also tried by giving the command
    /: SET COUNTRY 'IN'
    But still the amounts in the ouput format is coming in the same way 1.234.567,89 .
    If anyone has faced similar situation, plz tell how to change the output format of amount in SAP Script.
    Thanks and Regards,
    Nitin Gupta

    I have tried using SU3 but it's not worknig. Is their any other method also of which maybe I am not aware of?

  • New  Decimal Notation Format Required  For Indian Projects

    Respected Members,
    As at the user level or tcode SU01 only three decimal notations are provided.
    But for country India the decimal notation format is totally different.
    Given decimal notation format is
    1,234,567.89
    And the Required Format For India is
    1,23,456.78
    Becoz we mention the Rupees in this format only.
    And this second format is not available in SPRO also .
    How to create the desired decimal notation and add the corresponding functionality.
    And if we use the given format (1,234,567.89) then when we converting the amount in words through Function module
    SPELL_AMOUNT ,it is not converting properly even though we have maintain the entries in View V_T015Z.
    Suppose our amount is 1,00,000 that is One lakh but it will show in the output  ONE HUNDRED THOUSAND.
    I know that there is another function Module HR_ch_ something to convert in words according to indian currency.
    But it does not solve the issue properly.
    THis DECIMAL NOTATION format for Indian Projects is a BIG MESS.
    So kindly tell me any solution or it is the drawback of SAP.
    So that we can ask SAP to append this Decimal Notation and required Functionality for the Indian Projects.
    Kindly Send Your Valuable answer and Try To Make clear picture and SAP Technical People if Reading this thread then kindly give stress on the REQUIRED DECIMAL NOTATION.
    THANKS A LOT.

    Hi Manish please you can 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.
    create a function module with this code .hope this will solve the issue.

  • Problem with Excel output format

    Hi Guys,
    I am creating a report in XML Publisher (not standalone). I am facing some problems could anyone please help me to figure out the issues.
    Is it possible to have all three output format (PDF, HTML & EXCEL) exact (same aligned) only by creating a single RTF Template? I am facing the problem with Excel output format the output format of excel is taking excels cell formatting.
    Example Numeric fields --> Right Aligned, text fields --> Left Aligned
    One more issue with excel is -ve(negative) values are getting displayed in red and in brackets like ($13) (with red color).
    Our client want excel output on priority.
    Is there any limitation for excel output format of reports?
    It is very urgent for us please help.
    Any help would be highly appreciated.
    Thanks,
    Pragati
    Edited by: user11237443 on Aug 27, 2009 1:22 AM

    Hi Mahi,
    Thanks for your response. But i could not understand how can we write wrapper program could you please give some light on this or provide some link it would be helpful for me:-)
    I have read that blog for excel limitations but i have more question?
    1) What about the negative values?
    if any field is displaying negative amount then excel not displaying right value for that:(
    2)How can we align header or data?
    Do XMLP with EBS provide any solution for formatting in excel?
    3) If for the alignment of numeric value we concatenate them with any special character then how can we perform calculation that field?
    Here are so many formatting issues do we need to write any code in xml for that?
    Please help.
    Many Thanks,
    Pragati

  • Changing Oracle Report Output Format at runtime

    Dear All,
    I've custom Oracle Report in Oracle Apps., and would like to give the users an option to select the output format (XML, TEXT, PDF, etc.) whilst submitting the request.
    As a SYSADMIN, we can modify the Output Format value of the concurrent program(Oracle Report in this case) to one we like.
    But I would like the user to select this output format option at runtime, rather then hard coding at SYSADMIN level. For that I've to create a Value Set with the desired report output format options, and attach this to the concurrent program.
    My question is, how we can make the desired output format to work at runtime?
    If any one can help?
    Thanks,
    Sandeep

    Hi Steve,
    I couldn't get it...???
    I'm running an Oracle Report in Oracle Apps. release 11.5.9
    The default output format of this report is TEXT, which is defined in its concurrent program.
    This report is submitted using standard request submission screen, and after successful completion we can view the output by pressing "View Output" button on "Requests" screen. This will open an another window and we can view the output page by page. Using "Tools>Copy File..." menu option, we can view the same output in IE window.
    Now, how does your resolution fits here and how can I view the same report in XML format?
    Many Thanks,
    Sandeep

  • Output format in background is not same as Foreground

    Dear All,
    I am running a report in Background but output is not coming in desired format. Suppose output contains 35 columns ( while running the report in Foreground) but in doesn't show all the columns in background. Is there any SAP Standard settings by which we can set the output format as per our requirement while running the job in background.

    Thanx Sourabh for your reply,
    I have check the variant , it is correct. It's a common problem that end users are facing in my organization.
    What I want that if standard output has width of 35 columns ( in foreground ), it must show all the columns in background also.

  • What output formats are supported by SAPConnect in SAP CRM 7.0

    Is MHT document format and .doc format the only filetypes that are supported in SAP CRM 7.0? Could anyone please answer what are all the other output formats supported by SAP CRM 7.0.

    Hi,
    For interactive CRM report, please try link
    http://help.sap.com/bp_crm70/BBLibrary/Documentation/C41_BB_ConfigGuide_EN_DE.doc
    On page of
    http://help.sap.com/bp_crm70/CRM_DE/HTML/index.htm
    you may find some other info related to BW analytics, maybe there is info for dashboard? I am not so sure.
    Hongyan

  • How to align output formatted and output text in the same line?

    Hi All,
    I want an output formatted label and a text on the same line,. I've surrounded these components wth a panel form layout and they automatically align one below the other. how do I kepe them in the same line?
    Thanks.

    Try as per the code snippet below:
    <af:document title="TestPage.jspx" id="d1">
    <af:messages id="m1" inline="true"/>
    <af:form id="f1">
    *<af:panelGroupLayout id="pgl1" layout="horizontal">*
    *<af:outputFormatted value="outputFormatted1" id="of1"/>*
    *<h:outputText value="outputText1" id="ot1"/>*
    *</af:panelGroupLayout>*
    </af:form>
    </af:document>
    Thanks,
    Navaneeth

  • Want text input containing HTML tags to appear as HTML in output format

    Hi,
    We have a table in Oracle database that has a column named detail,one of its values is like this: <bold><italics>Good Morning</italics></bold>. What our client wants is that the output format should show: <b><i>Good Morning</b></i>. That is,Bi Publisher should be able to parse the HTML tags and provide the desired output. Please tell me how to achieve this. Any help is much appreciated.
    Thanks and regards,
    Debarati,
    [email protected]

    Hi,
    have a look here (http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html) to get an idea.
    regards
    Rainer

  • Tutorials in SWF output format prompted "Do you trust this content to connect to the Internet?" when opening another SWF file

    Please help.
    I have a tutorial with in the output format of SWF and HTM. I have click boxes that On Success will open another tutorial (SWF file). When I click on the click box, I get prompted “Do you trust this content to connect to the Internet?” by the Adobe Flash Player. I can click “Yes” and continue, however I don’t want the user to get prompted for every click box with this action (there is one for every tutorial and navigation buttons to each tutorial). I also think that SCORM can't handle the prompt, because when I run the tutorial from the LMS the click boxes do not work at all.
    I have tried selecting “Always allow” in the Global Security Settings panel as per the instruction on this website: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l.
    Any ideas?

    Hi,
    I wanted to add on a question to this posting.... I believe Rod's instructions must be followed on a per-PC basis, correct? Is there any way to disable this globally when/after I publish the files rather than telling 1000 users across the globe that they have to change their security settings? I don't think so from the article (very thorough) but just hoping there's something I can do?!
    Thank you!
    Michele

  • QM-How to add a New "Output Format" in Certificate Profile?

    Hello QM Functional Experts,
    Can any of you tell me how we can add a custom "Output Format" in the Certificate Profile (QC01/2/3). I tried the Configuration approach via QM-Quality Certificates-Certificate Profile-Define Data Origin. I do not see an option here to add a New Output Format.
    If this is posted in a wrong forum, I apologize. I am not able to find the correct forum for QM. Please redirect me and I will be glad to post it in the right forum.
    Thanks,
    Nagesh

    Hi,
    You can use the FM ..RV_MESSAGE_UPDATE..
    Thanks
    Naren

  • Convert the money datatype to a 2 decimal point format.

    Whats the best way to convert the money datatype to a 2 decimal point format in ms sql 2005 for use in my applications.
    this?
    CAST(tr.depositReceivedAmount AS decimal(10 , 2))

    I respectfully disagree with the notion that you should change the SQL column from a 'money' data-type to something else.
    In most database servers, 'money' is a data type that is designed to provide very consistent behavior with regard to arithmetic accuracy.  In Microsoft Access, the representation is a scaled-integer.  In MS SQL Server, it is obviously similar.  Ditto Oracle and all the others.
    You want the money data-type in the database to have this accuracy, because "hell hath no fury like an accountant in search of one lousy penny."   The database column storage-formats are designed to satisfy accountants, and that is a Good Thing.
    Meanwhile, you also want to take care as to exactly how you deal with the values.  There are several points where rounding could take place.  You do not have at your disposal the strongest possible handling of floating data-types in ColdFusion.  You are also somewhat at the mercy of whatever interface software may lie between you and whatever SQL server you may use.  "It's okay to round values once, but not multiple times."
    I suggest rounding the value right before display, and stipulating that the user's input must be two decimal places.
    Then, you might have to do some things at the SQL server's end.  For instance, when you update a value in the table, you may need to use server-side logic to explicitly truncate the value to two decimal-points, so that an update of "$34.56" explicitly updates the column to "$34.5600."  (This sort of thing has to happen within the SQL server context.)  You know that the user's input has exactly two significant digits, but maybe (maybe not...!) the SQL server might not know this.  You want to ensure that the server's internally-stored value represents exactly two significant digits, when the value originates from a user-input.
    Don't err on the side of "your convenience" or "what looks good on-screen."  (If you do, get ready to get phone-calls from the accountants, always at inopportune hours of the night.)

  • (Input and) output formats from Photoshop Elements 6 for Mac

    I noticed that (until midnight PT, anyway) Amazon has Photoshop Elements for the Mac at a lower price than usual.  This brings up a question for me: What output formats can Photoshop Elements 6 produce?  In particular, can it produce PNG?  Also, can it accept PNG as input?

    I think that all the formats like .bmp, camera RAW, EPS,PICT, TIFF, Filmstripn, IFF, JPEG, Photoshop pdf, Photoshop RAW,PNG etc are supported for both input and output.

  • Different resolution in preview and output format

    Hi Folks
    I need your help. We already captured a lot of e-learning material but come to a problem.
    The output format quality is less good than the preview quality.
    Win7 /Captivate 6
    Capture resolution for software simulation is 1024x768.
    Producing the material in swf and html. No compressing, set to best quality.
    Open the preview: quality is nearly the same as the original source.
    Open the swf directly or the html --> output looks cloudy, diffuse.
    Test with an without scalable html. In case of scalable html it is hard to find the right resolution (1024x768) on a 1280x1024 resolution monitor, but you can find it and the the output is clear as the preview.
    The output format resolution within the project is set to 1024x768. We measured the "true" output resolution on different produced output formats, and they are all a little bit higher than 1024x768, about 4% more heigh and width.
    Of course, I was able to change the html-script which sets the start-format for an swf to open, if I change it to 1024x768 and save it, the quality of the swf is like the preview and sharp and ok. But in case of scalable html I cannot set the format. However, why the swf -even when i start/opeen it directly- didn't start with the right resolution set in the settings within the project?
    Also our target group should not "search" for the sharp resolution by scaling the output window.
    Why does captivate change the resolution? why is the preview ok and the produced swf not? I didn't understand that fact.
    Also we like to produce with TOC, so the widht for TOC is 250. If I change the html script in that case to 1024+250=1274x768 the swf is also unshapr/cloudy and I havee no change to fit it to the right resolution (1024+TOC).
    Regards
    Rob

    Vamsi mailed me offline and I have suggested looking at Using RH7 on my site where this problem is covered.
    See www.grainge.org for RoboHelp and Authoring tips
    Follow me @petergrainge

  • Problem with output format

    Hi ,
    Whle submitting AP prepayment balance report able to get the output in XML format.
    But, if for the same report when the output format is changed to PDF or Text not able to get the report.
    Anybody pls suggest any changes to be done in setup to resolve the problem.
    Thank you in advance.
    Raj

    Are there any errors recorded in the log file of the concurrent request ?
    HTH
    Srini

Maybe you are looking for