Rounding off currency value

Hi all,
       Is there a function module to round off the currency value to nearest 0.05 , ie. if the currency value is 10.63, it should be rounded off to 10.65 and when it is 10.68, it should be rounded off to 10.70?
      If yes, could you please let me know?
      Any help in this regard is appreciated.
Regards,
Partha.

hi,
try this out.here is the sample program.
pl look into my modified program,
i am assuming your requirement is like
if the last digit in your value is < 5. it should be rounded to 5.
  like 10.23 should come to 10.25
& if the last character value is > 5 , it should be rounded to next value with 0.
    10.67 should be 10.70
    10.98 should be 11.00.
with this assumption, i developed this small code. let me know, if i am wrong.
regards
srikanth
DATA : V_CURR TYPE VBAK-NETWR,
       V_CHAR(10) TYPE C.
V_CURR = '10.67'.
WRITE  V_CURR TO V_CHAR.
CONDENSE V_CHAR NO-GAPS.
DATA : V_STRLEN TYPE I.
BREAK-POINT.
V_STRLEN = STRLEN( V_CHAR ).
IF V_STRLEN <> 0 .
  V_STRLEN = V_STRLEN - 1.
  IF V_CHAR+V_STRLEN < '5'.
    V_CHAR+V_STRLEN = '5'.
    V_CURR = V_CHAR.
  ELSE.
    IF V_CHAR+V_STRLEN = '6'.
      V_CURR = V_CURR + '0.04'.
    ELSEIF V_CHAR+V_STRLEN = '7'.
      V_CURR = V_CURR + '0.03'.
    ELSEIF V_CHAR+V_STRLEN = '8'.
      V_CURR = V_CURR + '0.02'.
    ELSEIF V_CHAR+V_STRLEN = '9'.
      V_CURR = V_CURR + '0.01'.
    ENDIF.
  ENDIF.
ENDIF.
write :/ v_curr,
         v_char.
added modified code.
Message was edited by: Srikanth Kidambi

Similar Messages

  • Regarding round off the value in adf table

    HI All,
    My Requirement:
    i have to round off the value after decimal in adf column before saving to data base.
    Excample : 1234.67 = 1235
    34567.89=34568
    34567.34= 34567
    i am using jdeveloper 11.1.1.3.0
    Please can you give code using converter or any other strategy.
    Thanks & Regards,
    Madhu

    1. First of all you asked for rounding off, taking the integer part is not rounding off.
    2. As per the documentation
    integerOnly      boolean      Yes      Flag specifying whether only the integer part of the value will be formatted and parsed. Default value is false.if i can understand correctly pertains to formatting only.
    3. You can create a custom faces converter and add it to faces config.xml http://docs.oracle.com/javaee/1.4/tutorial/doc/JSFDevelop4.html . So that you do not have to write it in code.
    4. If only integer is to be allowed why don't you change the data type to long or int instead of number

  • Rounding off cuurency value

    hai to all
    could please tell me hoe to round off the NETWR or NETPR value according to our needs,,, if any function module  available
    please,,,

    Hi,
    REPORT ZEXAMPLE.
    TABLES T001R.
    DATA V_AMTOUT LIKE BSEG-WSKTO.
    PARAMETERS P_AMTIN LIKE BSEG-WSKTO.
    WRITE:/ 'Original amount:', P_AMTIN,
          / 'Company', 15 'Currency', 35 'Amount'.
    ULINE.
    LOOP AT T001R.
      CALL FUNCTION 'ROUND_AMOUNT'
           EXPORTING
                AMOUNT_IN  = P_AMTIN
                COMPANY    = T001R-BUKRS
                CURRENCY   = T001R-WAERS
           IMPORTING
                AMOUNT_OUT = V_AMTOUT.
      WRITE:/ T001R-BUKRS, 15 T001R-WAERS, 25 V_AMTOUT.
    ENDLOOP.
    Regards,
    Sudhakar.

  • Rounding-off Currency fields.

    Hi,
    Can someone tell me how to round-off value of currency field.
    If fraction <= 0.49 it should be rounded-off to 0.00
    If fraction >= 0.50 it should be rounded-off to 1.00

    Hi, you have the Function Module ROUND too,
    here a litle example ( the paremeter sign = 'X' set how the number will be rounded )
    DATA l_input TYPE p DECIMALS 5.
    break-point.
    l_input = '0.499'.
    CALL FUNCTION 'ROUND'
      EXPORTING
        decimals      = 0
        input         = l_input
        sign          = 'X'
      IMPORTING
        output        = l_input
      EXCEPTIONS
        input_invalid = 1
        overflow      = 2
        type_invalid  = 3
        OTHERS        = 4.
    l_input = '0.500'.
    CALL FUNCTION 'ROUND'
      EXPORTING
        decimals      = 0
        input         = l_input
        sign          = 'X'
      IMPORTING
        output        = l_input
      EXCEPTIONS
        input_invalid = 1
        overflow      = 2
        type_invalid  = 3
        OTHERS        = 4.
    Saludos
    Daniel

  • Rounding off Currency field

    Hi,
    I have to round off a currency field. Can some one provide the syntax for this.
    I have tried: WRITE lv1 ROUND 2.
    But I dont want to display it in output, I have to put round off value into another field.
    Regards,
    Pankaj.

    Hi,
    Check the below code
    PARAMETER : p_cur TYPE wrbtr.
    DATA : w_currency(10) TYPE c.
    WRITE p_cur ROUND 2 TO w_currency.
    w_currency = w_currency * 100.
    WRITE / w_currency.
    W_currency will have the round off value....

  • User exit for rounding off result value

    Hi Gurus,
    Is there any user exit available or std. functionality by which we can round off the result value. My client wants if the value is 192.5 or 191.8 then this value should be rounded off to 195. That means rounding in multiples 0f 5. Is there any exit available?
    Regards
    Amit

    If in QM just specify the correct number of decimals for the characteristic, in your case 0. In config under plant settings you can set up the results recording settings to allow you to record one additional decimal then specified by the characteristic. The result is rounded to 0 decimals when displayed.
    FYI - there should be no reason to have to use user exits to round off decimals in QM.
    Craig
    I didn't read the initial posting correctly.  To round the whole number portion by 5 you will have to provide that logic yourself via the user exits already posted.
    Craig
    Edited by: Craig Snyder on Jan 13, 2010 2:56 PM

  • Rounding off quotation value

    hi all
    i have created a quotation, and in quotation output i want the total value to be rounded of to nearest rupee how i have to do it?
    regards
    rag

    Dear Tarun,
    You can maintain DIFF Rounding off condition type in your pricing procedure to do the rounding off the total quotation value.
    The DIFF condition type you need to keep after total value and assign account key to that.
    Maintain Requirement as 13     Rounding as perT001R
                 CalType as        16     Rounding the total
                 BasType as         4     Net Value Plus Tax  for that DIFF condition type in your quotation pricing procedure.
    I hope this will help you,
    Regards,
    Murali.
    Edited by: Murali Mohan.Tallapaneni on Dec 6, 2008 10:26 AM

  • Rounding off Miro Values

    Hi ,
    I having problem in VAT round off during MIRO. We have created PO  +VAT. VAT amount has been rounded off. After GRN, we
    are trying to post the Invoice in MIRO, the VAT amount shows with Decimal
    We are using ZTAXIN , in the tax pricing proceedure i have made requirement 13 &  call type 16 for VAT condition type.
    If i am doing 13 and 16 then vat is not calculating in PO
    I want the decimal should be rounded to the nearest cost.

    Hi,
    What I understand that you want to roundoff the amount during invoice posting. If my understanding is correct then please set  tolerance limit for BD. While posting  invoice fill the Invoice Amount (Basic Data) as 100 instead of 100.13
    Now 0.13 will be posted to GL account maintained in OBYC-DIF

  • Rounding off currency

    Dear Gurus,
    Can some one tell me how the rounding for works.
    Financial Accounting ->AR/AP->Business Transaction->Outgoing Payments->Define Account for Rounding off difference.
    My client require the following scenario.
    a. Client wanted to book all the invoies with decimals at liability booking(FB60).
    Eg : 110.36 and 110.56
    b. While making payment(F-53 or F-58) he waanted to round off the decimals(as he do not want to cut the cheque for decimals
    Eg : 110 and 111
    Please help me to configure to get the out put
    Thanks
    Raju.

    Hi
    Have tolerances set up for the user as well as customer/vendor. This will automatically knock off the differences and you can pay in round amount
    S Jayaram

  • Depreciation Amount for Asset taking in Round-Off Value and not in Decimals

    Gurus,
        When I run the Depreciation, the System is calculating amount in Round-off and not in decimals
        Whereas I have knowledge that It shud calculate in decimals or to the exact amount whatever it comes, but the system is automatically rounding -off the value to the nearest ruppee
       So please inform about what has gone wrong in my case.!!
    Regards,
    Nimish Agarwal
    New Delhi

    Dear:
               Go to OAYO and do the do the necessary configuration there. Field Arithmetic Rounding
    Using this indicator you specify that rounding should take place according to the rule: tenths up to and including 4 are rounded downward to the next whole number, starting with 5 they are rounded upward to the next whole number.
    This refers to the decimal places of a currency.
    Example: 4.49 is rounded to 4
    4.50 is rounded to 5
    Check the other
               Regards

  • MIRO Round off value

    Hi,
    I need to Round off the value in MIRO. Example, we have Rs.1000/- as the price and tax as Rs.12.36/-, system should round off this 12.36 to Rs.13 and display the tax amount as Rs.13.
    Is this possible in Standards?
    If so , where do we need to make the settings?
    Please help.
    Thanks.

    Hi,
    Please refer the below links..
    MIRO-Rounding off
    Rounding in MIRO
    Rounding off MIRO for decimal
    Thanks.

  • Rounding Currency Value

    Hello,
    I would like to round the currency values like $123.20  to $123.00
    and
    $123.58 to $124.00
    How can we do this in BI?
    Thanks

    Hi Roshan,
    In the query designer in the KF properties set decimals to '0'. This will display 103.58 as 104 and 103.23 as 103.
    Regards
    Kumar

  • About Round off Value

    Hi
       I want to pick up decimals only in packed value.
    Example
    data: I_TOTAL LIKE J_1ITAXVAR-J_1ITAXAM1.
    round off bellow value to my conditions.
    if value is 1994.50 and bellow .50. i  want to change 1994.
    if value is 1994.51 and above .51 then only change to 1995 
    which function module works like as above my conditions.
    or send to the detail code
    Please send me as early as possible.
    Regards,
    Hari

    hi Hari,
    Use ROUND FM to achieve this ...
    data : orig_amt type p decimals 10 value '0.29846',
    round_amt type p decimals 4.
    call function 'ROUND'
    exporting
    decimals = 4
    input = orig_amt
    sign = '-'
    importing
    output = round_amt
    exceptions
    input_invalid = 1
    overflow = 2
    type_invalid = 3
    others = 4.
    write : round_am.
    Regards,
    Santosh

  • Rounding of a value to 2 decimal points.

    Hi all,
    I need to round off a value to 2 decimals.
    For example:
    A value 13.6789 should be rounded of to 13.67 and not 13.68

    Hi,
    Thats Truncation not rounding, for data types P and F we cannot have sub field access,
    so we cannot use offset, it leads to error results
    and if we use
    data : var type p decimals 2     they will be rounded hence  
    So, pass it to   a character variable
    and use write satement edition
    example
    data : var(7) type p decimals 4  value '13.6789 ' .
    write /  var.
    data : var1(8) type c.
    move var to var1.
    write /(5)  var1.
    regards
    prasanth

  • Round off in Invoice Postings

    Dear Experts,
    At my client site when the end user is posting invoices the total invoice value differs by a very small value ( As per there legacy system they were rounding of it Eg. As per there legacy system the invoice value is 190576 and as per SAP it is 19575.800 or 19576.400) the want it to get rounded off ie. If the value of the decimals 19575.800 it should be rounded of and should show 19576 and the 0.200 sholuld go to some other account or If the value is 19576.200 it should reduce by by 0.400 and the entry of -0.400 should also go to the G/L for round off. Is there any provisons in SAP for such postings?? can any body help me ? 
    Regars
    Mehul
    Edited by: Mehul  P. Shah on Jul 5, 2009 6:47 AM

    In OMR6 Pl.set Tolerance limit
    If you want to round off the Values in the amount field at the time of invoice posting in MIRO.
    There will be a small difference amount positive or neagtive in the Balance field.
    System does not automatically round off the values. It is manuall rounding only.
    Maintain the Tolerance key DIF for the Compnay code . Mainatin the Toleransace values says + or - 0.50 USD in OMR6. & selec the Check limit boxes

Maybe you are looking for

  • ITunes 10.5 upgrade 32 bit can no longer edit album information

    Since upgrading to the latest version of itunes I can no longer edit any of the CD info. When I open the Get Info for an individual track or entire CD all fields with content are grayed. I'm in the Music view, not a Playlist and not the iPod list. I'

  • IPad first gen not turning on!

    Hello, please help me!! My iPad first gen isn't turning on!! It's just a black screen. Tried resetting it and tried dfu mode but nothing!! When I plug it in to charge then the screen keeps flashing on and off, no apple logo just a black screen lighti

  • Is there a comprehensive list of compatible cameras to connect via firewire?

    is there a comprehensive and up-to-date list of compatible cameras to connect via firewire that will work with FMLE? I saw this -http://www.adobe.com/support/documentation/en/flashmediaencoder/FME_DeviceMatrix.pdf but it's out of date and limited in

  • Can I connect my i pad2 to 1st generation apple tv if so how??

    Is there anyone that can help me? I am wanting to connect my I pad 2 to my first generation apple tv and would like to know if this is possible if so how????

  • Merge statement not working over db link

    I have a merge statement that works fine when it's run against a local table, but when I try to run it against a table over a database link, I get the following error. ERROR at line 1: ORA-01008: not all variables bound ORA-02063: preceding line from