Error in mapping for floating Number calculation

Hi All,
   I have a small doubt in floating number calculation in Mapping.
Actually i am geting a floating point number and calculating the SUM and generating the output. The input is of 2 decimal places(Ex: 26.02  and 26.03 ), but when it is adding all the values it is generating a three digit decimal number (Ex: 52.050003)
I dont know from where it is geting one extra number "2" in the output.
Please find the code for the same and let me know if i need to do something else to get ride of this.
   //write your code here
float sum=0;
if(a != null && a.length > 0.00)
   for ( int j =0; j<a.length;j++)
    sum  =  sum + Float.parseFloat(a[j]);
   result.addValue(String.valueOf(sum));
else
result.addValue("0");
Thanks in Advance,
JAY

Jay,
Please use the below code and let us know, if it helps.
BigDecimal sum= new BigDecimal("0");
BigDecimal bd;
if(a != null && a.length > 0.00)
for ( int j =0; j<a.length;j++)
bd=new BigDecimal(a[j]);
sum=sum.add(bd);
result.addValue(""+sum+"");
else
result.addValue("0");
in import section - java.math.*;
raj.
Edited by: Raj on Feb 18, 2008 11:11 AM

Similar Messages

  • Error in J1INCHLN for internal number range

    Dear Experts,
    I am getting the below error when I am executing J1INCHLN. I checked J1INUMBER but of no use. Number range for 2008 is maintained. I am not able to maintain number range for 2009. Kindly guide.
    Number range for internal challan numbers not maintained
    Message no. 8I706
    Diagnosis
    Number range object 'J_1ICHLNNO' is not maintained fully.
    System response
    There is an error in the number range object and a new internal number can not be generated.
    Procedure
    Check if the number range object exists in your system and also check if number ranges for the number group is maintained for the current year. Maintain the number range object and then start this transaction. The transaction code for the number range maintenance is  'J1INUMBER'.
    Regards
    Komal

    Hi
    Go to SPRO>IMG>Financial Accounting (New)>Financial Accounting Global Settings (New)>Withholding Tax>Extended Withholding Tax>Posting>India>Remittance Challans>Maintain Number Groups
    here define - cocode , section , tds section code , number group
    now go
    SPRO>IMG>Financial Accounting (New)>Financial Accounting Global Settings (New)>Withholding Tax>Extended Withholding Tax>Posting>India>Remittance Challans>Assign Number Ranges to Number Groups
    here assign number group to Number range
    now create number range go to SPRO>IMG>Financial Accounting (New)>Financial Accounting Global Settings (New)>Withholding Tax>Extended Withholding Tax>Posting>India>Remittance Challans> Maintain Number Ranges
    here create a number range on year base
    **some time you have to update the table so go SM30 and update J_1IEWTNUM , J_1IEWTNUMGR and J_1IEWTNUMGR_1 tables
    Best Of Luck
    Tanmoy

  • EWay field Mapping for Invoice Number

    We are currently setting up the eWay and BC integration and we have found we are unable to map the invoice number fields and invoice description fields from our website form to the transaction email generated by eWay. I have spoken with eWay who have advised they offer this as part of the API but the BC integration does not allow us to take advantage of this.
    This leaves our customers with a receipt of their transaction and a randomly generated invoice number that doesn’t correspond with the invoice number they have paid. Seems a bit strange as this is information that is important for us and the client. 
    Will there be any improvements to this integration in the future or has anyone encountered a similar issue and found a way around?
    Thanks
    Katie

    Hi,
    Am interested to know if you ended up finding a way around this?
    Andrew

  • Cust  for Item number calculation when creating/changing a sales orders

    Hi
      I need to know if the item number when capturing/ modifying  a sales order can be calculated automatically with some route in the customizing,  or do I need to do it with some user exit in the sales order entry?.
    Thanks!
    Regards
    Soraya

    Hi,
    Goto the T.Code "VOV8".
    Select your order type.Details.
    Goto the "Number systems" tab.
    Maintain the value as "10" or "15" like this any number as per your requirement for the field "Item no.increment".
    So that the main item will be incremented by the number you specified here.Suppose you specified the number as "10" the line item numbers would be 10,20,30,.....
    Next is if you maintain the value for the field "Sub-item increment" then the sub items will be incremented by the number you specified here.
    It would be mainly used in the case of BOM.
    To get the numbers from the order,goto the T.Code "SE11/SE16".
    Enter the table name as "VBAP".
    Pass the order number.Execute.
    You will get the all line items with numbers.
    Regards,
    Krishna.

  • Error in MIRO for input tax calculation

    HI Gurus,
    We are facing problem at the time of logistic invoice verification in case of purchase orders with account assignments. Following is the set-up for executing MIRO:
    1.     Purchase Order with  (PO no. 4700000010)
    1.1.     Account assignment category.
    1.2.     Tax code.
    2.     Goods Receipt – MIGO
    3.     Vendor Invoice booking – MIRO
    After doing about mentioned steps, document created at the MIGO step shows correct liability and Asset / Expense a/c.
    At the time of vendor invoice verification (MIRO), system picks up only CST condition for vendor liability and non deductible excise conditions are reversed against the asset/expenses. For E.G.
    1. PO created
    Basic amount                   100.00
    + Basic Excise (16%)        16.00 (non-deductible)
    + Ecess             (02%)       00.32 (non-deductible)
    + Hcess             (01%)       00.16 (non-deductible)
    + CST                (03%)       03.49 (non-deductible)
                       119.97
    2. MIGO – Transaction
    Asset / Expenses A/c -
    Dr        119.97
      To Prov. For Liability                          119.97
    3. MIRO – Transaction
    Provision for Liability A/c -
    Dr   119.97
    To Vendor a/c.                                       103.97
    To Asset / Expenses a/c                           16.00
    (16.00 – Basic excise duty)
    At the time of MIRO, it should had posted
    Provision for Liability A/c -
    Dr   119.97
    To Vendor a/c.                                       119.97
    In case Pos without account assignment all accounting entry are posting correctly.
    Kindly provide suitable solution ASAP.
    Thanks in advance

    Hi All,
    Thank you for support. But my problem is not getting solved. Situation is as below
    Entry is generated
    GR/IR  Dr. 100
    Tax     Dr.    25.50
    Vendor          Cr. 101.25 (90% split on total amount)
    Vendor          Cr.   11.25 (10% split on total amount)
    Items are split based on installment payment term correctly. however since tax need to be paid immediately it should split like this:
    GR/IR  Dr. 100
    Tax     Dr.    25.50
    Vendor          Cr. 115.50 (90% split of 100 GR/IR value + 25.5 of tax )
    Vendor          Cr.   10 (10% split)
    Then in OBY6 I enabled amount split. When I try to post invoice in MIRO with amount split I am getting error: Account assignment not completed for all required fields (PayT) Message no. F5A034. And in payment tab payment terms fields are missing. I have ticked 'Enable amount split' in OBY6. and have updated amount split tab.
    How to do this in system?
    Thanks,
    Pushkar
    Edited by: Pushkar Marathe on Sep 3, 2011 7:23 AM

  • Import Error (Partial Set failure with RC error code = 0x84020020 for rec

    Hi,
    While importing the data through xls file , i am getting the error message "Partial Set failure with RC error code = <0x84020020> for record number
    0 through 212"  and no record get created in Data manager.
    Although i mapped all values , still it giving me an error message.
    I tried to Import other data and it was all working fine.
    Please guide
    Regards
    Sandeep Kumar

    HI,
    I checked the exl file and found that in the first column and first data  was in text format ('0001)but later on when i change the record and moved it to the last record , it worked fine. I was able to load all records including ('0001)
    I don't know wht the logic behind this:
    if my first record was ('0001), system was giving me the error and not allowing me to load the data. But when i moved the record as the last record it not only allow me to load the records but allow ('0001) also.
    If anyone have any clue , plz let me know.
    Regards
    Sandeep

  • No mapping for the Unicode character exists in the target multi-byte code page

    hi,
    i have an issue with sharepoint 2013 and IE 10.
    im using the sharepoint  rest web service and make an ajax data call to retrive data from sharepoint lists, the call fail and return a server error: "No mapping for the Unicode character exists in the target multi-byte code page". 
    i have to say that everything works fine with chrome and firefox. 
    what can i do for fixing it?
    Thanks a lot
    alon

    Hi,
    From your description, I know you get an issue with IE 10 in SharePoint 2013 when you use SharePoint REST API to retrieve data from SharePoint list.
    I am not quite sure what cause your issue. Could you provide your code, so I could test it in my environment and troubleshoot for you.
    In addition, you could test your issue in another computer or another version of IE.
    Best Regards
    Vincent Han
    TechNet Community Support

  • Error in determining country specific length for account number

    Cannot determine country-specific length for account number;No instance of object type AccountClosureAM has been created. External reference: 0271409168GTABNGODUMMY00USDGO

    Thanks KI & Sujit
    Can you please tell me the Menu Path for OB40
    I have one another problem as below
    Jurisdiction code not defined for procedure TAXINN
    Message no. FF748
    Diagnosis
    You have entered a jurisdiction code in a country whose calculation procedure does not allow the entry of jurisdiction codes.
    System response
    Procedure
    Check and, if necessary, correct the entry.
    Procedure for System Administration
    If it is not an input error, check and possibly change the system settings.
    To do this, choose Maintain entries (F5).
    Change your calculation procedure so that tax calculation is carried out using the jurisdiction code.
    Can you please tell me how to solve this.
    Rakesh

  • Design a simple calculator for multiple number systems

    Details:
    1.     Before designing the graphical user interface, create an abstract class called Number and four derived classes called Binary, Octal, Decimal, and Hexadecimal. Use the following structure for your Number class. The derived classes should include two constructors paralleling the abstract class and implementations of the two abstract methods.
    Number
    - n: int
    + Number() // Initialize n to zero
    + Number(int i): // Initialize n to i
    + add(Number a): void // Add Number a to this Number
    + subtract(Number s): void // Subtract Number s from this Number
    + getN(): int // Obtain current value of n
    + setN(int i): void // Set value of n to i
    + toString(): String (abstract) // Return current number as a String in
    // appropriate number system
    + setN(String s): void (abstract) // Set value of n based on String
    // representation of the number
    // throws NumberFormatException if String
    // contains inappropriate characters for
    // the given number system
    2.     Interface operation.
    �     Clicking Binary, Octal, Decimal, or Hexadecimal changes the number in the text box and the current total to the selected number system. If there is a NumberFormatException, display an error message below the text box and do not make the change.
    �     Clicking Add To Total or Subtract From Total uses the value in the text box to update the current total. If there is a NumberFormatException, display an error message below the text box and do not make the change.
    �     Clear Entry clears the text box, Clear Total resets the current total to zero, and Clear All does both.
    �     Indicate the current number system in use with a color and display error messages in red. Feel free to improve the layout as desired.
    3.     The Integer wrapper class has a toString() method and parseInt() method each with a parameter called radix that allows you to specify the number system. These will help immensely with your abstract methods. Your calculator should work with negative numbers.
    4.     Programming hint: Provide an object of type Number to store the value in the text box and another object of type Number to store the current total. These will be able to hold values from any number system and simplify your coding.

    Thank you for posting your homework on the Sun Developer Network Java Forum! Your request has been assigned the following ticket number (you should keep this for your reference) 3405691582.
    At the present we are experiencing higher than normal volumes of lack of interest in helping you cheat on another homework assignment. Please stand by until somebody inept comes along to do it for you or you fail. We appreciate your patience in this matter.

  • Error While Saving Mapping For A Dimension

    I am getting The Error While Saving The mapping For a Dimension
    Any Clue?
    An error occurred creating DimensionMapGroup BROKERS.MAPGROUP1.DIMENSIONMAPGROUP : ***Error Occured in
    DELETE_MAPPING_GROUP: Analytic workspace object __XML_STARTUP_CALCMMBRS does
    not exist.
    Thanks
    Raghu

    Check the OSS note 550760 regarding the issue.

  • Error while detrmining Internal Document Number for Excise Invoice.

    Hello mate, I am trying to create excise invoice for for factory sale. while saving the document I am getting an error" Error
    while detrmining Internal Document Number for Excise Invoice. Message: Maintain Number Range for J_1IINTNUM". I have already maintained number range for mentioned object "J_1INTNUM" in TCODE SNUM , still getting error. Please solve my querry . Is it related to transport or number range activation or something else? I have maintained number range with serial no. "01"

    Hello ,
    Ensure that number ranges are properly maintained in the respective client that should be the year specific.Some times even u maintained the system should not consider that number ranges  due to table updation problem ,because i had faced the same in the earlier and received the reply from the sap stating that this error was occured rarely after the years,so please ignore that ,for your problem u first come out of the screen and then re log in and then create the excise invoice ,then check the number ranges .
    Please revert for any
    Kalyan

  • ABAP Mapping for Error handling in Proxy to JDBC

    Hi All,
    I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
    I am following the below steps,
    step 1 - In message mapping a UDF is created to catch errors and store them in a variable using  dynamic configuration
    step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. The exception format expected is
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1>ZPI_THROW_EXCEPTION</SAP:P1>
      <SAP:P2>001</SAP:P2/>
      <SAP:P3>Mandatory field is missing[BUKRS] </SAP:P3>
       <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have written the following ABAP code to achieve this:
    method IF_MAPPING~EXECUTE.
      DATA l_record type mpp_dynamic.
    DATA error type String.
    getting dynamic configuration value
    filled in by any previous mapping
    CALL METHOD DYNAMIC_CONFIGURATION->GET_RECORD
      EXPORTING
        NAMESPACE = 'http://sap.com/xi/XI/System/ERROR'
        NAME      = 'ERROR'
      RECEIVING
        RECORD    = l_record.
    error = l_record-value.
    *raising exception with our message
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '001'
        ERROR_TEXT = error .
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '003'
        ERROR_TEXT = error .
    endmethod.
    I am gettign the following message for our code:
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Could you please help in finding the solution for getting currect error message from ABAP class?
    Edited by: SwethaC on Jan 21, 2011 8:18 AM

    The error is due to RFC Call fail from PI system to your ECC Application System.
    Check your RFC Destination for ECC System type 3 in PI System.
    When you are receiving data from ECC System using Proxies & again you are going to ECC System for Validation.
    Why you are not doing this validation on ECC System only in your proxy code ?
    In your proxy code, it will be much better for performance to check your data there on same system.

  • File TO File-Using XSLT mapping (for Beginners) --- Error in XSLT

    Hi,
    I am following this wiki (TO File-Using XSLT mapping (for Beginners))
    https://wiki.sdn.sap.com/wiki/display/XI/FileTOFile-UsingXSLTmapping%28forBeginners%29
    When creating  Xslt from the MapForce, when I click on the XSLT Tab I am getting the following error
    http://www.flickr.com/photo_zoom.gne?id=1216715484&size=o
    How to correct this error ?.....
    Thanks
    srini
    Message was edited by:
            srinivas

    Hello,
    The XSD you are using is from Data Type and you are using it for mapping.
    Instead export XSD for Message Type and also pass the XML schema for source that will solve the issue and your XSLT will be generated.
    Regards,

  • Error in code page mapping for Source system whil loading the data from ECC

    HI Gurus,
    I am working in a implementation project, Recently our BI sand box is up, when i am doing my load from 0comp_code_attr it is throwing an error "Error in code page mapping for source system"(This is my first load from ECC).
    In details tab it is showing as the data is sent from the source system but the data is not reaching to the PSA.
    Please let me know if there are any settings needs to be made.
    Many thanks in Advance
    Jagadeesh

    HI V,
    Thanks for your quick response. I did it but it didn't resolve the issue. since the system id which i am having is 3 digits(LEC) but there it is taking only 2 digits, so i clicked on the button called Propose system ids, it has praposed LE, but the issue is stil there.
    Do we need to do any settings in LBWE??
    Thanks and Regards
    Jagadeesh

  • Error in code page mapping for Source System

    Hi All,
    We are Loading data into BI system from MDM System.
    It was loading fine but Yesterday we got an error " Error in code page mapping for Source System"
    Message Class: RSDS_ACCESS 13.
    We alreday tried to Search any IDOCs with error/unprocessed , but there isn't any.
    Any pointers for this error will be Helpful.
    Regards,
    Mayank

    Our SP currently SAPKW70019 , the SAP note mentioned above required to apply SP for 13, which we already beyond that...unfortunately we still face the same problem .. almost every day ..
    any advice.. ?
    Edited by: Edi Erwan  Abu Talib on Jun 22, 2009 8:22 AM

Maybe you are looking for

  • Rule created to monitor a single line entries in a text.log file does not work

    Hi All, I have this strange issue. I created a script which generates .log file and i have configured a rule to monitor it. Whenever the .log is altered the alert does not come at all in SCOM 2012 R2. I want this alert to be raised when one specific

  • My Adobe CC apps no longer work at all (Windows 8) - they just crash

    I successfully used Adobe Photoshop and Premiere Pro on my laptop (which uses Windows 8) for a full year. Creative Cloud version. While it wasn't ideal, and some day I will switch to a Mac, I was able to get the job done. Two months ago, Premiere Pro

  • Cache Settings

    Hello, I am coming up with the spreadhseet retreival error very frequently and get Essbase Error 1130203. I went through the Error interpretation and found that Data Cache might be causing it. Here are the details of cache settings on my databases cu

  • Multiple MHD with same message type

    Hi, Can seeburger handle the following Tradacom EDI standards MHD: ORDHDR MHD:ORDHDR Is it normally allowed for seeburger to do such a mapping.  I believe that any normal EDI file should have only one MHD:order header file with orders. Regards Krish

  • Cannot start a new project

    I have recently had Captivate 7 installed. It was installed through a share drive, so to improve performance, I had to (Through preferences; change the Publish at and Cache locations to my local drive. This did speed up performance but cause two big