SPListItemCollection.GetDataTable() delivers wrong Double Values

Hi there,
i have a Problem with the .getDataTable() Method of a SPListItemCollection Object. Within the SPListItemCollection all Double Values are displayed correct. But the DataTable Edition puts the decimal point to the End of the number. And i have no idea why,
and how to get rid of this. Any hints?
DataTable dt = new DataTable("ChargeData");
listItems[0]["PRICE"] -> 107.10 | object {double}
dt = listItems.GetDataTable();
dt[0]["PRICE"] -> 10071.0 | object {double}
P.s.: If this is realted in some way, the initial List for the SPListItemCollection is a External List with a MSSQL Connection. The 'Price' Column within the SQL Server is a "float".
My Best Regards
THO
EDIT #1
I've try to figure out when this problem appears. Always or only on BCS lists, so i tried (with Powershell), and found out, this seems to be a Problem with the Autogenerated BCS List.
$nonbcslist.Items[0]["PRICE"] -> 107,10 | double
$dt = $nonbcslist.Items.GetDataTable()
$dt.Rows[0]["PRICE"] -> 107,10 | double
$bcslist.Items[0]["PRICE"] -> 107,10 | double
$bcsdt = $bcslist.Items.GetDataTable()
$bcsdt.Rows[0]["PRICE"] -> 10710 | double

I noticed that in one example you are using a period to segment the double and in the other a comma. I wonder if that is somehow tied into the wrong conversion when returning a data table.
I have seen GetDataTable() break some other formatting in the past, specifically when working with multi-select user fields. Your best bet may be to iterate through the collection and manually populate a blank table.
Dimitri Ayrapetov (MCSE: SharePoint)

Similar Messages

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • OpenSQLException - Cannot assign double value

    Hello,
      I have some table in database with field of type 'double'. I use JDBC to store data in this table and sometimes I would like to place special values in it, eg:
    preparedStatement.setDouble(1, Double.MIN_VALUE);
    Unfortunately I get exception like the one below.
    My question is: what is the allowed range of values for type 'double' in database according to OpenSQL spec ?
    Thanks!
    Marcin Zduniak
      com.sap.sql.log.OpenSQLException: Cannot assign double value 4.9E-324 to host variable 3 because it is not in the allowed range of +/- to +/-.
        at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
        at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
        at com.sap.sql.jdbc.common.CommonPreparedStatement.setDouble(CommonPreparedStatement.java:534)
        at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setDouble(PreparedStatementWrapper.java:281)
        at pl.com.bcc.hai.SpecificationBean0Persistent.ejb_iUpdate(SpecificationBean0Persistent.java:558)
        ... 42 more
    Full exception chain:
    com.sap.engine.services.ejb.exceptions.BaseEJBException: Transaction system failure in method pl.com.bcc.hai.SpecificationLocalLocalObjectImpl0.setTargetValue(java.lang.Double).
         at pl.com.bcc.hai.SpecificationLocalLocalObjectImpl0.setTargetValue(SpecificationLocalLocalObjectImpl0.java:4537)
         at pl.com.bcc.hai.conf.BCC_H_CConfig.setSTimeSeriesesAIM(BCC_H_CConfig.java:4129)
         at pl.com.bcc.hai.conf.wdp.InternalBCC_H_CConfig.setSTimeSeriesesAIM(InternalBCC_H_CConfig.java:1038)
         at pl.com.bcc.hai.conf.wdp.IPublicBCC_H_CConfig$ISTimeSeriesesElement.setAIM(IPublicBCC_H_CConfig.java:3651)
         at pl.com.bcc.hai.conf.wdp.IPublicBCC_H_CConfig$ISTimeSeriesesElement.wdSetObject(IPublicBCC_H_CConfig.java:3786)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdSetObject(MappedNodeElement.java:365)
         at pl.com.bcc.hai.conf.wdp.IPrivateSpecificationEditor$ISTimeSeriesesElement.wdSetObject(IPrivateSpecificationEditor.java:1737)
         at com.sap.tc.webdynpro.progmodel.context.AttributePointer.setObject(AttributePointer.java:223)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.transportPendingUserInput(DataContainer.java:1267)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.transportPendingUserInput(DataContainer.java:474)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.transport(ClientComponent.java:548)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.transport(ClientComponent.java:552)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.transport(ClientApplication.java:701)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.transportData(WebDynproMainTask.java:717)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [1a55ffffffb01205ffffffd4ffffffdd] ).
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:232)
         at pl.com.bcc.hai.SpecificationLocalLocalObjectImpl0.setTargetValue(SpecificationLocalLocalObjectImpl0.java:4486)
         ... 35 more
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is pl.com.bcc.hai.SpecificationBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:220)
         ... 36 more
    Caused by: com.sap.sql.log.OpenSQLException: Cannot assign double value 4.9E-324 to host variable 3 because it is not in the allowed range of +/- to +/-.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonPreparedStatement.setDouble(CommonPreparedStatement.java:534)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setDouble(PreparedStatementWrapper.java:281)
         at pl.com.bcc.hai.SpecificationBean0Persistent.ejb_iUpdate(SpecificationBean0Persistent.java:558)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:80)
         ... 41 more
    com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [1a55ffffffb01205ffffffd4ffffffdd] ).
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:232)
         at pl.com.bcc.hai.SpecificationLocalLocalObjectImpl0.setTargetValue(SpecificationLocalLocalObjectImpl0.java:4486)
         at pl.com.bcc.hai.conf.BCC_H_CConfig.setSTimeSeriesesAIM(BCC_H_CConfig.java:4129)
         at pl.com.bcc.hai.conf.wdp.InternalBCC_H_CConfig.setSTimeSeriesesAIM(InternalBCC_H_CConfig.java:1038)
         at pl.com.bcc.hai.conf.wdp.IPublicBCC_H_CConfig$ISTimeSeriesesElement.setAIM(IPublicBCC_H_CConfig.java:3651)
         at pl.com.bcc.hai.conf.wdp.IPublicBCC_H_CConfig$ISTimeSeriesesElement.wdSetObject(IPublicBCC_H_CConfig.java:3786)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdSetObject(MappedNodeElement.java:365)
         at pl.com.bcc.hai.conf.wdp.IPrivateSpecificationEditor$ISTimeSeriesesElement.wdSetObject(IPrivateSpecificationEditor.java:1737)
         at com.sap.tc.webdynpro.progmodel.context.AttributePointer.setObject(AttributePointer.java:223)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.transportPendingUserInput(DataContainer.java:1267)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.transportPendingUserInput(DataContainer.java:474)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.transport(ClientComponent.java:548)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.transport(ClientComponent.java:552)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.transport(ClientApplication.java:701)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.transportData(WebDynproMainTask.java:717)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is pl.com.bcc.hai.SpecificationBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:220)
         ... 36 more
    Caused by: com.sap.sql.log.OpenSQLException: Cannot assign double value 4.9E-324 to host variable 3 because it is not in the allowed range of +/- to +/-.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonPreparedStatement.setDouble(CommonPreparedStatement.java:534)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setDouble(PreparedStatementWrapper.java:281)
         at pl.com.bcc.hai.SpecificationBean0Persistent.ejb_iUpdate(SpecificationBean0Persistent.java:558)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:80)
         ... 41 more

    Hi,
       Thank you for your replay. I didn't touch DB directly, I defined db structure through NetWeaver Dictionary perspective and table that i'm interested in is defined like the one on this screen: http://zduniak.com/tmp/sap_dictionary_double.png
    So I'm looking for generic solution (SAP OpenSQL), not specific to any particular DB vendor.
    Maybe there is somewhere on help.sap.com (i couldn't find unfortunately) information what is the allowed range of values for type 'double' in database according to OpenSQL spec ?
    Thank,
      Marcin Zduniak

  • Getting Double values in Purchasing cube

    hi experts,
    I m getting double values for 0po_items and ocontr_item in purchasing data cube 0pur_c01.
    i have also applied the test rule in routine ,that values are fine.
    but in cube values are getting double.
    please help..........

    Hi,
    It seems like you are loading data into cube using 2 DataSource  and there is no (consolidated) dso in between.
    If the KF say (qty) you are mapping from both the datasource to the cube, it is going to be doubled in report as 2 records will be found in cube.
    I suggest try to load a single valid record (PO and lien item) one by one into the cube and do check the values in cube for each process. You will get good idea how cube behave while loading data from diff. sources.
    Also try to bring in the one dso where you consolidate the data as per report requirement and then move that data into Cube, will give you required output.
    Thank-You.
    Vinod

  • BO Webi report hierarchy with measure values showing more(almost double value) compare to BW Bex report

    Hi,
    In our BO Webi report hierarchy with measure values showing more(almost double value) compare to BW Bex report. Can any one please help on this.
    Is it BW problem or BO problem?
    I checked in some other threads but it's not given solution.
    Thanks,
    Manjunatha

    Hi,
    Is it BW problem or BO problem? : BO
    is it causing problem with hierarchly data only ?  without hierarchies data is matching or not?
    Post same in SAP BusinessObjects Web Intelligence  .
    Thanks.

  • Need some help in Rounding a double value to a whole number

    Hey Peeps,
    Need some help here, I got a method that returns a value in double after a series of calculation.
    I need to know how can I round the double value, so for example,
    1. if the value is 62222.22222222, it rounds to 62222 and
    2. if the value is 15555.555555, it rounds to 15556
    How can i do this
    Zub

    Hi Keerthi- Try this...
    1. if the value is 62222.22222222, it rounds to 62222 and
    double d = 62222.22222222;long l = (int)Math.round(d * 100); // truncatesd = l / 100.0;
    double d = 62222.22222222;
    System.out.println(d);
    long l = (int)Math.round(d * 100);
    // truncatesSystem.out.println(l);
    d = l / 100.0;System.out.println(d);
    for (int i = 0; i < 1000; i++)
    {    d -= 0.1;}
    for (int i = 0; i < 1000; i++)
    {    d += 0.1;}System.out.println(d);
    regards- Julie Bunavicz
    Output:
    62222.22222222
    62222
    62222.22
    62222.22000000000001

  • How do i convert a float value to a double value?

    How do i convert a float value to a double value? HELP PLEASE!! im very stuck!! i gota float data type and i need to convert it to a double data type in order to use it in another operation.....
    thank u so much!

    safe dint realise ppl were so arrogant. thanks for the reply but less of the sarcasm!

  • How can I format the double value?

    Hi,
    I am trying to format the double variable as like,
    double var = 1234.56789
    but i want that variable as like var = 1234.56
    How can i do that in java?
    Please help me.
    From
    Parshuram Walunjkar

    Try something like the following, assume the variable 'd' underneath is your double value that you want to format.
    double d = 4.45678;
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(5);
    nf.setMinimumFractionDigits(5);
    String number = nf.format(d);
    Then use the string "number" for printing out.

  • How to convert from scientific notations to double value ?

    Hi all,
    i need to convert a string 2E-23 to corresponding double values so that i can compare it one more existing double value. Is there any API present for this ?
    Thanks and regards,
    rosamama.

    Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

  • JSlider using double values instead of INT

    I need to create a slider that uses double values instead of ints...
    the default constructor is JSlider temp = new JSlider(JSlider.HORIZONTAL, int, int, int)....but i need to use
    JSlider temp = new JSlider(JSlider.HORIZONTAL, double,double,double)
    I want my slider to go from like 1.0 to 10.0 ....any ideas?
    thanks

    me has ritten a sample code fur ya... mite help...
    sorrie... not commented properly...
    import java.awt.event.*;
    import java.util.Vector;
    import javax.swing.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class Test extends JPanel {
         //Variable Declarations...
         JPanel valuesPanel;
         public JSlider slider;
         public JTextField midText;
         public JTextField lowText;
         public JTextField highText;
         int precision=1000;//to convert to double...(100-> 2decimal places, 1000->3decimal places.......)
         double lowLimit = 0;
         double midLimit = 5;
         double highLimit = 10;
         public Test() {
              initialize();
              addListeners();
              initComponents();
              addComponents();
         public void initialize() {
              valuesPanel = new JPanel();
              highText = new JTextField();
              midText = new JTextField();
              lowText = new JTextField();
              slider = new JSlider();
         public void addListeners() {
              addTextListenerTo( highText );
              addTextListenerTo( midText );
              addTextListenerTo( lowText );
              // if the slider is moved, the value of the mid will be updated in the testbox.
              // Sliders work on integers and not on double. so the limits are divided by precision to get a double number.
              slider.addChangeListener(
                   new ChangeListener() {
                        public void stateChanged( ChangeEvent e ) {
                             double n = ( double ) ( ( JSlider ) e.getSource() ).getValue();
                             midLimit = n / precision;
                             midText.setText( Double.toString( midLimit ) );
         * Sets different attributes and properties of the components
         public void initComponents() {
              highText.setText( Double.toString( highLimit ) );
              midText.setText( Double.toString( midLimit ) );
              lowText.setText( Double.toString( lowLimit ) );
              slider.setPaintTrack( true );
              slider.setPaintTicks( true );
              slider.setMinimum( ( int ) ( lowLimit * precision ) );
              slider.setValue( ( int ) ( lowLimit * precision ) );
              slider.setMaximum( ( int ) ( highLimit * precision ) );
         * Add all the components to the container (Panel).
         public void addComponents() {
              setLayout( new BorderLayout() );
              valuesPanel.setLayout( new GridLayout( 3, 3, 5, 5 ) );
              valuesPanel.add( new JLabel("Low") );          
              valuesPanel.add( highText );
              valuesPanel.add( new JLabel("Mid") );
              valuesPanel.add( midText );
              valuesPanel.add( new JLabel("High") );
              valuesPanel.add( lowText );
              add( valuesPanel, BorderLayout.CENTER);
              add( slider, BorderLayout.SOUTH);
         * Adds Focus and Action Listeners to the TextFields
         public void addTextListenerTo( JTextField textField ) {
              textField.addFocusListener(
                   new FocusAdapter() {
                        public void focusLost( FocusEvent evt ) {
                             updateLimits( ( JTextField ) evt.getSource() );
                        public void focusGained( FocusEvent evt ) {
                             String tempOldString = ( ( JTextField ) evt.getSource() ).getText();
              textField.addActionListener(
                   new ActionListener() {
                        public void actionPerformed( ActionEvent evt ) {
                             updateLimits( ( JTextField ) evt.getSource() );
         * This function is called when any action is performed on the text. It checks
         * if the value is valid and if not it displays a message. Also it updates the
         * slider value.
         *@param textField
         public void updateLimits( JTextField textField ) {
              double tempN = 0;
              try {
                   tempN = Double.parseDouble( textField.getText() );
                   if ( textField.equals( lowText ) ) {
                        lowLimit = tempN;
                        slider.setMinimum( ( int ) ( lowLimit * precision ) );
                   else if ( textField.equals( highText ) ) {
                        highLimit = tempN;
                        slider.setMaximum( ( int ) ( highLimit * precision ) );
                   else if ( textField.equals( midText ) ) {
                        midLimit = tempN;
                        slider.setValue( ( int ) ( midLimit * precision ) );
              } catch ( Exception ex ) {
                   JOptionPane.showMessageDialog( this, "Not a Number", "Error !!!", JOptionPane.WARNING_MESSAGE );
                   textField.setText( "0" );
         public static void main(String args[]) {
         JFrame f=new JFrame("test Frame");
         f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f.getContentPane().add(new Test());
         f.pack();
         f.setVisible(true);

  • Cash Flow Report (FSI3/FSI5) pulling double value

    Dear SAP Experts
    I am creating a Cash Flow Statement via FSI3 /FSI5. While selecting key figure "Total Credit Postings" system is pulling the double values for the assigned GL. Please see below;
    Please see the output.
    GL total credit value is 269610.68 where as report is showing value 539221, which is double the value.
    Any suggestions to correct the error??
    Regards
    Syed Zia Abbas

    Hi Melia
    For your calculation, you can cross check your logic with actual values form table and  see why it is not matching in case of INCORRECT amount.
    Cash Flow is genuinely generated per Fiscal year and that will show the comparison of Reporting year (For Ex Current Year) with comparison year (For Ex Last Year).
    As a correct solution, you can give selection parameter as below;
    Reporting Year
    Reporting Pd From
    Reporting Pd To
    Comparison Year
    Comparison Pd From
    Comparison Pd To.
    That is the way I have created CFS. Let me know if you need more info.
    Regards
    Syed Zia Abbas

  • SQ01 double value

    Hi,
    In my sq01 Query i am using LDB SDF ( FI/CO) .
    It running Successfully.
    only one Problem is that  it showing Double Value Why ?
    How to Solve this ?
    Thanks

    What is showing double value.
    It may be because the output may be at the line level.

  • SXPG_COMMAND_EXECUTE  return wrong parameter value

    Dear all.
    We have an Abap program that pulls an encrypted FTP file and saves it to our network.
    After that we activate an external command via transaction SM69 by calling FM SXPG_COMMAND_EXECUTE.
    This command is an execution of a batch file that executes a decryption method via PGP decryption software.
    The problem is that we get an output parameter of this FM (STATUS) as u201CEu201D (error) although the decryption is being executed successfully.
    We have the same process being activated same way successfully with another folders (rest is exactly the same).
    Why does SXPG_COMMAND_EXECUTE return wrong status value ?
    Regards,
    Rebeka

    SXPG_COMMAND_EXECUTE runs under certain operating system user account. Looks like that account does not have enough privileges to do what you want it to do. Look at the operating system for privileges (read,write,execute) of the user account SAPServiceuser or equivalent.
    /Simo

  • Converting String  into a Double value

    Hi
    iam really stuck can anyone please help that what i should do
    to convert a String variable into a double value
    iam using CLDC1.1 and MIDP2.0
    please tell me how its done
    Thank in advance

    hi,
    thanx alot it really worked now i want to convert the answer of the double variable back to string can you please tell me how to do it thanx alot

  • Can j2me draw line with double values.

    Hi,
    Can any body know how to darw line in j2me with double values.
    I don't want use draw Line with int.
    Shall i use svg or j2me has solution.
    Thanks and regards,
    Rakesh.

    not possible
    graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]

Maybe you are looking for

  • Lenovo G780 will not boot up after windows update

    My friend's G780 will no longer boot up after installing a windows update, one for which she cant remember, and ever since she updated it, the lenovo boot screen will appear, then turns black, and stays black. It will, occasionally, give her the opti

  • Business Area wise Proposal for Payment

    Dear All We have payment proposal created and distributed to our BU controller by business area. We are recently upgraded to ECC 6 and now planning to activate new gl with document splitting. We are having cases where one invoice belong to several bu

  • Gps maps in E71

    I am trying to use my maps GPS but my phone keeps telling me I'm in Russia when in fact I'm in UAE ( So's the phone ) How do I get it to recognise the place it's living.

  • Taking info off an old Imac dv

    I am upgrading someones old imacdv to a nice macbook. Trouble is, it's been so long I can't remember the OS9 way of doing things. How can I get information(i.e. word docs, addresses, etc.) off of that computer? I tried putting a cd in and the box jus

  • What happened to the title presets in PP CS6?

    Hello, I noticed recently the title presets selections are empty in my installation of PP CS6 (Mac version). It has been a while since using CS6 titling capability , and I don't remember ever using the presets. So... how do I enable access to the pre