Date formatting, too many decimal places for milliseconds.

Is there any cirmumstance where the SimpleDateFormat string of:
"yyyy.MM.dd HH:mm:ss.SS "
could result in some dates being output correctly with two digits for milliseconds, and others being output with three digits!

Hi ,
Sorry for the delay .
    x_fieldcat-scrtext_m = 'Interest Rate'.
    x_fieldcat-fieldname = 'INTEREST'.
    x_fieldcat-tabname = 'IT_BSID1'.
    x_fieldcat-col_pos = l_pos.
    x_fieldcat-outputlen = '13'.
    x_fieldcat-edit = 'X'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    l_pos = l_pos + 1.
the strcture if it_bsid1 is
DATA : BEGIN OF IT_BSID1 OCCURS 0,
INCLUDE STRUCTURE ZFTHUNDI_NO.
BUKRS TYPE     BUKRS,
HUNDI_NO  TYPE          ZHUNDI_NO,
VBELN      TYPE      VBELN_VF,
KDMAT      TYPE      KDMAT,
KUNNR      TYPE     KUNNR,
NAME1      TYPE      NAME1,
ORT01      TYPE      ORT01,
BUDAT      TYPE      BUDAT,
TYPE      TYPE      ZTYPE,
GRN_NO  TYPE     MBLNR,
GRN_DATE  TYPE          BUDAT,
DUEDATE      TYPE     ZDUEDATE,
QTY      TYPE     FKIMG,
REC_QTY TYPE     ZREC_QTY,
ACC_QTY TYPE     ZACC_QTY,
REJ_QTY TYPE     ZREJ_QTY,
BAL_QTY TYPE     FKIMG,
PRCTR     TYPE PRCTR,
DMBTR     TYPE DMBTR,
WRBTR     TYPE WRBTR,
TOTAL     TYPE WRBTR,
FAHA_NO1 TYPE     ZFAHA,
FAHA_DATE TYPE     ZFAHA_DATE,
HSDATE TYPE     ZHSDATE,
HRDATE TYPE     ZHRDATE,
DISDATE TYPE     ZDISDATE,
HBKID     TYPE HBKID,
INTEREST TYPE MENGE_D, ( i ve tried it with diff data types like dmbtr etc)
W_FLAG TYPE C,
W_FLA TYPE C ,
LIGHT TYPE C,
END OF IT_BSID1.

Similar Messages

  • Error stating "too many decimal places (max allowed 0) while getting input

    Hi experts
       In one of my reports the input is accepted for the user for a field . The field was initially declared as AZINSSATZ ( Data Type  DEC    Length     10         Decimal Places   7 ) . It did not accept the values like 12.5 .Inorder to give 12 5 we need to give as 12.0000005 .Later i changed it ot menge_d , dmbtr and various other data types  but shows the above error.
    please advise on how to correct it

    Hi ,
    Sorry for the delay .
        x_fieldcat-scrtext_m = 'Interest Rate'.
        x_fieldcat-fieldname = 'INTEREST'.
        x_fieldcat-tabname = 'IT_BSID1'.
        x_fieldcat-col_pos = l_pos.
        x_fieldcat-outputlen = '13'.
        x_fieldcat-edit = 'X'.
        APPEND x_fieldcat TO it_fieldcat.
        CLEAR x_fieldcat.
        l_pos = l_pos + 1.
    the strcture if it_bsid1 is
    DATA : BEGIN OF IT_BSID1 OCCURS 0,
    INCLUDE STRUCTURE ZFTHUNDI_NO.
    BUKRS TYPE     BUKRS,
    HUNDI_NO  TYPE          ZHUNDI_NO,
    VBELN      TYPE      VBELN_VF,
    KDMAT      TYPE      KDMAT,
    KUNNR      TYPE     KUNNR,
    NAME1      TYPE      NAME1,
    ORT01      TYPE      ORT01,
    BUDAT      TYPE      BUDAT,
    TYPE      TYPE      ZTYPE,
    GRN_NO  TYPE     MBLNR,
    GRN_DATE  TYPE          BUDAT,
    DUEDATE      TYPE     ZDUEDATE,
    QTY      TYPE     FKIMG,
    REC_QTY TYPE     ZREC_QTY,
    ACC_QTY TYPE     ZACC_QTY,
    REJ_QTY TYPE     ZREJ_QTY,
    BAL_QTY TYPE     FKIMG,
    PRCTR     TYPE PRCTR,
    DMBTR     TYPE DMBTR,
    WRBTR     TYPE WRBTR,
    TOTAL     TYPE WRBTR,
    FAHA_NO1 TYPE     ZFAHA,
    FAHA_DATE TYPE     ZFAHA_DATE,
    HSDATE TYPE     ZHSDATE,
    HRDATE TYPE     ZHRDATE,
    DISDATE TYPE     ZDISDATE,
    HBKID     TYPE HBKID,
    INTEREST TYPE MENGE_D, ( i ve tried it with diff data types like dmbtr etc)
    W_FLAG TYPE C,
    W_FLA TYPE C ,
    LIGHT TYPE C,
    END OF IT_BSID1.

  • Too many decimal places to fit in JTextField

    I'm putting a Double value into a JTextField (by adding it to ""), and occasionally the value has too many places to fit in the text field.
    Suggestions on limiting the number of decimal places (least significant digits)?
    Thanks.

    Have a look on this one
    http://java.sun.com/j2se/1.5.0/docs/api/index.html?java/text/DecimalFormat.html

  • Decimal places for JPY currency in change documents

    Hi Gurus,
    For opportunities in SAP GUI the change documents for JPY show incorrect numbers.
    The number is divided by 100 (two decimal places added).
    Checked the CDPOS table and found the values already divided (two decimal places added).
    SPRO->General Settings->Currencies->Set decimal places for currencies is set for 0 decimals for JPY.
    Is there any way I can get correct values in the change documents?
    Please advice. Any hint is useful.
    Thx,
    Martin Kuma

    Hi Naren,
    Thank you for the tip, however the TCURX table is changed via customizing and should be changed only during the system initialization.
    What I would like to do, is to assure that the system displays the values in change documents correctly. It should apply the currency conversion for the data displayed the same way it does for all the tables.
    Do you have any idea, how should I do this?
    Regards,
    Martin Kuma

  • Clearmake: Warning: Too many command lines for "pcscfg.cfg"

    Hi,
    We are in the process of migrating an application(contains pro*C code) from oracle 9i to 10g.
    When the application is compiled on oracle 9i the compilation used complete with out any problems.
    After we changed the ORACLE_HOME parameter in our makefile to point to 10g home. clearmake
    gives the following Warning. though the build is successful
    clearmake: Warning: Too many command lines for "pcscfg.cfg"
    Could anybody please help me in getting rid of this warning?
    Regards
    Srikrishan

    Hi,
    I have removed all unwanted things from the makefile, but the problem is still there.
    I have included a sample program and the makefile which reproduces the problem.
    The problem goes away if I comment out 4th line from the makefile and use 5th line instead
    Could anybody please help?
    #################The contents of the make file are #####################
    targets: proctest
    #ORACLE_HOME= /data/oracle/product/9.2.0
    ORACLE_HOME= /data/tsd_oracle/hpux/10.2.0.2
    include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
    #include /data/oracle/product/9.2.0/precomp/lib/env_precomp.mk
    ORACLEINCLUDES= -I$(ORACLE_HOME)/precomp/public
    PROCSYSINCLUDEOPT=sys_include='(/usr/include,/opt/aCC/include,/opt/aCC/include/iostream)'
    ALLPROCINCLUDEOPTS= $(PROCSYSINCLUDEOPT)
    PROCPPFLAGS= sqlcheck=full lines=yes code=cpp def_sqlcode=yes $(ALLPROCINCLUDEOPTS)
    ACC=/opt/aCC/bin/aCC
    ORACLELIBS= -L $(ORACLE_HOME)/lib32 -l:libclntsh.sl
    #===========================proc test==================================
    proctest:proctest.o
    $(ACC) -o proctest $(ORACLELIBS) proctest.o
    #========================= General target rules ============================
    proctest.o:
    $(ORACLE_HOME)/bin/$(PROC) $(PROCPPFLAGS) CPP_SUFFIX=cc iname=proctest.pc
    $(ACC) $(ORACLEINCLUDES) -c proctest.cc -o proctest.o
    #####################program (proc test.pc)#########################
    #include<stdlib.h>
    #include<iostream.h>
    #include<sqlca.h>
    #define UNAME_LEN 20
    #define PWD_LEN 20
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR username[UNAME_LEN]; // VARCHAR is an ORACLE supplied struct
    varchar password[PWD_LEN]; // varchar can be in lower case also
    EXEC SQL END DECLARE SECTION;
    void sql_error(char *msg);
    int main()
    EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error:");
    username.len = (unsigned short)strlen(strcpy((char *)username.arr, "scott"));
    password.len = (unsigned short)strlen(strcpy((char *)password.arr, "tiger"));
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
    cout<<"Connected to oracle \n";
    return(0);
    void sql_error(char *msg)
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    cout << endl << msg << endl;
    cout << sqlca.sqlerrm.sqlerrmc << endl;
    EXEC SQL ROLLBACK RELEASE;
    exit(1);
    ####################################################################

  • More DECIMAL places for MM price-Not Global

    I have read the <u>many</u> postings on decimals. However, I have not seen the exact scenario I'm inquiring about.
    I want to increase the decimal places from 2 to 4 for the cost of materials we purchase (i.e. supplier price), but I do NOT want to set this as a global aspect for the company when dealing with numbers/currency.
    It's not just a simple matter of setting a different unit of measure, because let's say we order a reel of capacitors - the reel may come in qty of 1,000 or 2,500 (only one example). So, we really need to set price by (ea). The problem is that many of our parts price at .0014 (example) and in SAP that shows a cost or price [depending on where you're looking] of zero. Plus, the Purchasing agent sends a PO with incorrect price information.
    <b>It would be very helpful if anyone could tell me how to increase the number of decimal places for specific fields as opposed to globally.</b>
    Thanks you!!

    The right tool to do that is the pice unit. This is in the system for ecatly that purpose, to provide more precision in prices. It has nothing to do with unitz of measure that is used for logistical purposes.
    If you have a price 0f 0.0014 each you can set a price unit of 1000 and will have a price of 1.40 for 1000. You still can have only 500 or even 1 on stock. the calculation done if you receive your 2500 will be 2500 * 1,40 / 1000 which is of course the same as 2500 * 0,0014
    best regards,    Udo

  • Formatting currencies and decimal places

    I'm currently using NumberFormat.getCurrencyInstance() to format numbers as currency. However, one problem I'm having is that I'd like values with no cents to be formatted with no decimal places, and any values with cents to be formatted with the usual 2 decimal places. For example:
    17 would be formatted as $17
    17.45 would be formatted as $17.45
    17.4 would be formatted as $17.40
    The last one is the tricky part--I've tried formatter.setMinimumFractionDigits(0), and this works great for the first two cases. But for the last case, the number gets formatted as $17.4.
    Basically my problem is I want a number to be formatted with zero or two decimal places and nothing in between. Is there an easy way to do this?
    Thanks in advance.

    Otherwise you are likely to find that you are getting .00 due to errors from previous calculations. You are right. Adjusted it to Locale aware
    import java.text.FieldPosition;
    import java.text.NumberFormat;
    import java.text.ParseException;
    import java.text.ParsePosition;
    import java.util.Locale;
    public class SpecialCurrencyFormat extends NumberFormat {
        private static final long serialVersionUID = 1L;
        private final NumberFormat noDecimals;
        private final NumberFormat decimals;
        private final double maxDifference;
        private final double factor;
        public SpecialCurrencyFormat() {
         this(Locale.getDefault());
        public SpecialCurrencyFormat(Locale locale) {
         decimals = NumberFormat.getCurrencyInstance(locale);
         noDecimals = NumberFormat.getCurrencyInstance(locale);
         noDecimals.setMaximumFractionDigits(0);
         maxDifference = Math.pow(10, -decimals.getMaximumFractionDigits()) * .5;
         factor = Math.pow(10, decimals.getMaximumFractionDigits());
        @Override
        public StringBuffer format(double number, StringBuffer toAppendTo,
             FieldPosition pos) {
         double adjustedValue = (Math.round(number * factor)) / factor;
         if ((Math.abs(number - Math.round(number)) < maxDifference)) {
             return noDecimals.format(adjustedValue, toAppendTo, pos);
         } else {
             return decimals.format(adjustedValue, toAppendTo, pos);
        @Override
        public StringBuffer format(long number, StringBuffer toAppendTo,
             FieldPosition pos) {
         return noDecimals.format(number, toAppendTo, pos);
        @Override
        public Number parse(String source, ParsePosition parsePosition) {
         return decimals.parse(source, parsePosition);
        public static void main(String[] args) {
         NumberFormat nf = new SpecialCurrencyFormat(Locale.US);
         double[] values = { 10000, 1000, 100, 10, 1, 10.1, 10.01, 10.001,
              10.002, 10.003, 10.004, 10.005, 10.006, 10.007, 10.008, 10.009,
              10.010 };
         for (double value : values) {
             print(nf, value);
        private static void print(NumberFormat nf, double number) {
         String formatted = nf.format(number);
         try {
             System.out.println(number + "\tas " + formatted + "\tand back "
                  + nf.parse(formatted));
         } catch (ParseException e) {
             e.printStackTrace();
    }The value adjustedValue is needed since NumberFormat doesn't seem to round the value. It just breaks.
    Piet

  • Question about decimal places for currencies

    hi ,experts ,
       here is the problem , when i use mb5s, i found the net price has been enlarged 1000 times . I  also found the data of the table EKPO has been enlarged 1000 times. So ,i check the decimal places for currencies , i found there are five decimal places , the standard system is two decimal places . 
       Does this mean that we cann't  change the decimal places in SAP?  If we can change , what should we do for configuration ? 
    Jarod

    When running OY04, you are receivingin the following message:
    Before you continue, please read the following        
    text carefully.                                       
    If you do not heed this note, you can cause
    irreparable damage to the system with this            
    transacton.                                           
    In the R/3 System tables currency fields are          
    stored as decimal figures with a variable number      
    of decimal places. The decimal point is not           
    stored in the field in the database. Instead,         
    each currency field refers to a currency key          
    field. In this transaction you assign the number      
    of decimal places to this currency key uniquely.      
    Example: If you have set currency USD to have         
    two decimal places and you post an amount of 100      
    USD, an amount of 10000 USD is stored in the          
    Do you want to change the decimal places despite      
    all recommendations?

  • Changing Decimal Places for Currencies (Table V_TCURX)

    The instance is ECC 6.0
    We need to change the decimal places for a currency from 0 to 2 decimal places. Is there any impacts of doing that?
    Also need to add some currencies which are not in the table. Is there anything need to be careful while doing this. If this table is updated, do we need to update any other tables also which may be impacted?

    Hi,
    It is not recommended that when postings have already been made, that a change in the currency be done, as amounts posted can become invalid or incorrect as a result (ie USD 100->1.00), which is most critical in production environment Please go through the note 137626 When you made changes via OY04, the effect of which is across all clients.
    To change the number of decimal places for a currency already in use, you must convert all the tables in the R/3 System that contain currency fields, so that the data integrity remains. This cannot, however, for both organizational reasons and under the runtime aspect, in a productive system.
    You must never change decimal places in a productive system if you have documents posted with this currency. Such a change could lead to inconsistencies in these documents already posted.
    In case you really decide to use decimals you may consider to use SAP conversion services for them to convert all documents aready posted as explained in note 434349.
    Additional inforamtion:
    Note No.  137626 - FAQ: Decimal places for currency codes
                     126857 - Display of amts with correct decimal places in SE16
                       53206 - Processing of currency fields
                         9574 - Currency fields on selection screens
    Regards
    Ravinagh Boni

  • Too many recipients found for message type in the ALE model

    Hello Friends,
                            Please help me in solving this error. I have a Outbound sales order confirmation ORDRSP  .
    In the distribution model i have defined the sender receiver and message type clearly...
    But  in va01  after creating sales order  extras ->Output->Hearder --->Edit
    Output type-- BA00
    medium --ALE
    Dispatch time : Send Immediately
    I am getting a error -
    Too many recipients found for message type ORDRSP in the ALE model
    Message no. B1130
    Diagnosis
    In the ALE distribution customer model several recipient systems for IDOCs with message type ORDRSP and filter object type 'KUNNR' with value '100' have been modeled from this system, but only one recipient system is allowed.
    Procedure
    Please change the ALE distribution customer model so that it allows only one recipient system for the message from this system.
    Please help me in solving this error.
    Regards,
    jeevan

    Hi Jeevan,
    In BD64, the said problem occurs, since the message type ORDRSP will be configured to different Logical System.
    Since you are creating sales orders & Output type, system doesnt knows, to which Logical system, it has to be sent since the Message type exists more than once.
    select Your respective Logical System where the Outbound Sales Order Confirmation ORDRSP has been created.
    Under the node ORDRSP, add the filter group for Customer.
    Double click the Filter group and add the respective Customer No.s to whom the Order confirmation needs to be sent.
    Then create Sales Order Confirmation & Output type. Data will be passed(IDoc) to the respective Customer(where the customer no.) exist in the filter.
    Hope it solves your Issues.
    Regards,
    Anbalagan.

  • Difference between Decimal places for  Quatities and Units

    Can anyone please explain the difference between the followings -
    1. Number of Decimal places for  Quantities, and
    2. Number of Decimal places for Units
    In SAP B1 2007B General Settings.

    Hi,
    The Decimal places in the general setting indicates
    Amounts:Display of row and document details
    Prices:Display for price fields in documents,item  data,price lists
    Rates:Display of decimals in currency calculation
    Quantity:Display of quantity in documents and item data
    Percent:Display used in calculation of tax amounts and discounts
    Units:Display used in units(UoM) of items.
    Also refer these note:[737880|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000737880]
    Hope this is helpful

  • Decimal Places for Currencies

    Impact on the processes of change at MM decimals for Currencies.
    We want to use foreign currency to 6 decimals anand two decimal places for the currency of society

    Dear José Luis Flores ,
    Please always make sure your business process not reach the limitation of overflow during
    the conversion as the Price it is always with 11 characters with 2 Decimal place (9,2) in standard.
    All together 13 characters.
    If this limitation was reached, you will received the dump message. This is normal and you had to
    make sure it suits your business requirement in the beginning to avoid any changes later . You
    had to plan it before do this type of customizing in very beginning.
    Thanks
    Ian

  • Changing the Decimal places for Percentage in cost distribution in SC

    Hi Gurus,
    Is it possible to change the number decimal places for the Percentage field in cost Assignment tab in Shopping cart in cost distribution option?
    The user wants 3 decimal places, currently we can enter only 2 decimal places.
    I have gone thro' couple of blogs which are talking about changing the price decimal and not the percentage field decimal. (in IMG setting: General settings > Currencies > Set Decimal places)
    So, if anyone come acorss this issue, please let me know.
    Thanks and Regards,
    Nowsath

    Decimal Places Factor of the Receiver Weighting Factors
    Specifies the number of valid decimal places with which the given weighting factors are valuated.
    Example
    You enter 123456 as the weighting factor. Depending on the factor, this number is interpreted as:
    Factor Decimal places Weighting factor
    1 0 123456
    10 1 12345.6
    100 2 1234.56
    1000 3 123.456
    10000 4 12.3456
    100000 5 1.23456
    1000000 6 0.123456
    Please check with your FICO consulant .what settings you have in backend system.
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/bdbdc4575911d189240000e8323d3a/frameset.htm
    Muthu

  • Changing decimal places for currencies

    Hi everyone,
    I'm a complete begginer to SAP BI and I need to change a value in SPRO > General Settings > Currencies > Set Decimal Places for Currencies, but the option that I want doesn't exist.
    I need to add a new entry with the value: currency - EUR6 and decimals 6, but there is no 6 available. Can anyone tell me where can I add this or what is the table where this information is???
    Thanks in advance!
    Rogério Brá

    ok I think it works - just try and play
    This is what I did (sort of same scenario - if you get my drift)
    Currency Key MGF - translation ratio 1000:1
    Exchange rate is : 11:02750 to the Euro
    Invoice entered for 1,000,000.00
    Currency calculated as 90.68 eur
    (ie 1,000,000/(11.02750 * 1000))
    You can play aroudn with direct/indirect to ge the factors right
    But it works (I thought it did - I am qualified FICO honest!!)
    This wont get you around displaying 6 decimals - BUT it will help with currency conversion

  • Decimal places for unit of measure

    Dear All ,
    If i change the Decimal Places for rounding in Customizing for Unit of measure ( CUNI tcode) for KG as 6 from 3 whether it will calculate with the 6 decimal places like 0.004756 ( earlier with 3 decimal places it will calculate any multiplication with 0.004 now i want the same with 0.004756 Kg )
    whether it will work ?
    and where it will impact

    Hi
    No it will not work like that. And it depend on the transaction where you enter that. In case of Purchase order quntity field it will be always with 2 decimal places because field MENGE has 2 decimal places only. If your system is already live then it is not advisible to do such changes.
    Regards
    Antony

Maybe you are looking for

  • HT1998 Upgrading Firmware for Time Capsule

    I have just upgraded to OS 10.8.1 (Mountain Lion) and find I can no longer back up to my Time Capsule 802.11 as I need to upgrade the firmware but I can't work out how to access my pocket wi fi to enable me to get it. Can anyone help me configure thi

  • Unable to unzip the downloaded files

    So that we may better diagnose DOWNLOAD problems, please provide the following information. After downloaded the 9i for Windows (disk1,disk2,disk3). I cnnot unzip the file. I get the foloowing message from WinZip message box: "The WinZip Wizard canno

  • Problem in Updating a field in corpNAB resource through workflows

    Hi, I am working in Sun Java system identity manager 7.1 version. I have created one workflow which sends a list of Ids to a sub work flow,The sub workflow updates a field called user name in person document of corpNAB resource for each user. Usernam

  • Effective PPI in .eps files

    Anyone know how to extract the effective ppi info in .eps files? Photoshop.eps and Illustrator.eps files are different, so whichever you may have info on would be appreciated. I believe Illustrator generated ones are read as .pdf docs, so it may be i

  • How can I extract data from ST03 - what tables are used?

    Hi I currently have to create performance statistics daily for management. To do this I use transaction ST03 and manually copy the previous days Dialog average response time, DB, CPU and GU av. times into a spreadsheet, and also the average dialog re