Any function module to round of a value to two decimal places?

Hi gurus,
Any function module to round of a value to two decimal places?

Hi,
you can use FM 'ROUND'.
Thanks.

Similar Messages

  • Any function module to read all the values in Tcode-PPQD?

    Hi all
    Is there any function module to read all the values in Tcode-PPQD (Display Qualifiaction Catalog).
    and any idea what tables are involved to get these values like parent and child relationship?
    Thanks in advance.
    Murali.

    Murali,
    you can use the following..
    data: w_sobid type sobid, "Qualification ID
          w_objid type objid. "Qualification Catalog
    select objid  into w_objid
                  up to 1 rows
                  from HRP1001
                 where otype = 'QK'
                   and plvar = '01'
                   and istat = 1
                   and risgn = 'B'
                   and relat = '030'
                   and endda ge sy-datum
                   and begda le sy-datum
                   and sclas = 'Q'
                   and sobid = w_sobid.
    endselect.
    if sy-subrc eq 0.
    write: / w_objid,w_sobid.
    endif.
    Regards,
    Suresh Datti

  • How can I limit a double value to two decimal place?

    How can I limit a double value to two decimal place?
    Java keeps on adding zero's to a simple double subtraction:
    1497 - 179.64 = 1317.3600000000001The answer must have been simply: 1317.36

    If the trouble is with output ...
    If the trouble is with value accuracy ...The trouble is with OPs understanding of and/or expectations of IEEE 754 floating point numbers. o_O
    [And it's probably a view (output) issue.]
    how can i actually use numberformat to cut those
    unwanted decimal places?Read the API - Puce already provided the link.

  • How to correct a double value to two decimal places

    hi,
    How to correct a double value to two decimal places
    eg.
    double tt=100.100032
    i want to correct to 2 decimal places
    ie tt=100.10
    regards,
    jagan

    Check my other reply on the other thread. Please don't cross-post.

  • Any function module to get Stock and value of material on a given date?

    Hi Friends
    Is there any function module available to get Stock/and  value of material on a given date?
    Thanks
    Harish

    Sorry I didn't elaborate the requirement.
    I am asked to develop a custom report for inventory management. For range of materials it is required to display stock and value on particular date and GRs GIs for the range.
    I need function module to use in Zreport.
    Thanks
    Harish

  • Rounding off a float to two decimal places

    I want to make a function where I shall pass a float and and integer.
    The float shall have to be rounded off to a value in the integer.
    Can anyone please suggest how to round off a float.
    E.g.: if the float is 12.56890 and I want to round it off to 2 decimal places, then it should be 12.57.
    Regards
    Hawker

    I didn't mention any datatypes like float, double.True, but that is what the question is about, so you weren't answering the question. For a change.
    As I mentioned, that was just a mathematical steps to round of the floating point value. (Not in any programming languages point of view).False. You didn't mention that at all.
    This is the code for that in java.So here you are mentioning datatypes and floats for the same piece of mathematics that you have already been told, with reasons, doesn't work in floating point.
    which seems to be working fine
    Seems to. What evidence do you have that the float actually got rounded? As opposed to got displayed as rounded? Which is not what the OP asked for.
    And of course all that code seems to do is round 0.01 to two decimal places, which again is not what the OP asked for.
    For any remaining fans of this 'technique', please explain the behaviour of the following code:
         public static void     main(String[] args)
              int     count = 0, errors = 0;
              for (double x = 0.0; x < 1; x += 0.0001)
                   count++;
                   double     d = x;
                   int     scale = 2;
                   double     factor = Math.pow(10, scale);
                   d = Math.round(d*factor)/factor;
                   if ((d % 0.01) != 0.0) // if 'd' really has been rounded this should be zero
                        System.out.println(d % 0.01);
                        errors++;
              System.out.println(count+" trials "+errors+" errors");
         }

  • Help!printing float values with two decimal places

    hi there java pips! im a newbie to this technology so forgive me for this really stupid question....i would like to perform mathematical operations on two float values....the problem is i want to print them in a standard format and that is i want them to be displayed with two decimal places (e.g 190.00, 12,72, 1,000.01) how can i do this?

    Try java.text.DecimalFormat
    NumberFormat nf = new DecimalFormat("0.00");
    System.out.println(nf.format(x));

  • How to restrict decimal values upto two decimal places?

    Hi all,
    I want to restrict decimal figures upto two places. How to do that? Help will be appreciated.
    atanu
    [email protected]

    You can use NumberFormat class.
    There are lot of threads available in this forum. Just search for the keyword 'NumberFormat'.

  • Double value truncated to two decimal places without rounding the value.

    I want to truncate double value to two decimal places without doing the rounding of the value.
    Is there any method which can directly do the truncation.

    There's many ways to achieve this such as using
    BigDecimal's setScale method or type-casting. This is
    the way I like to do it:double d = -5.239;
    d = d > 0 ? Math.floor(d * 100) / 100.0 : Math.ceil(d
    * 100) / 100.0;
    Your division by 100 may cause an rounding error, because there are numbers which no finite binary representation. That's splitting hairs! I know ;-)

  • Rounding to two decimal places in BPC/NW

    Hello,
    I am dealing with the task to round values to two decimal places. I have found some discussions in BPC-MS where the statement ROUND should work in logic. Unfortunately I am not able to make it work in the NW version.
    Isn't there also a parameter in the appset or application administration which would cut the numbers only to two decimal places (this task would be also a possible solution for us).
    Thanks for any help
    Jan

    Hello Pravin,
    the second import worked fine. I realized that the class has changed to ZCL_BPC_SL_ROUND.
    I debugged the class and noticed that the parameter it_cv is not filled at all. Therefore the program ends before starting the rounding procedure. Here is the part of the code:
    Take CV into account
      clear l_success.
      loop at it_cv into ls_cv.
        clear l_val_string.
        loop at ls_cv-member into l_member.
          if sy-tabix eq 1.
            l_val_string = l_member.
          else.
            concatenate l_val_string l_member into l_val_string separated by ','.
          endif.
        endloop.
        if l_val_string ne space.
          l_success = add_dim_restriction( i_param = l_val_string i_dimension = ls_cv-dimension i_clear = abap_true ).
          if l_success eq abap_false.
            concatenate 'Failed to successfully add Dimension' ls_cv-dimension into l_log_msg
            separated by space.
            cl_ujk_logger=>log( l_log_msg ).
            cl_ujk_logger=>log( 'Exiting Round Method' ).
            cl_ujk_logger=>empty_line(  ).
            raise exception type cx_uj_custom_logic
              exporting messages = et_message.
            exit.
          endif.
        endif.
      endloop.
      if l_success eq abap_false. exit. endif. - here the program exits and therefore doesn't do any rounding.
    If I comment this part the system rounds correctly but runs on all records in the cube which degrades performance a lot.
    Could you please advice further if it is possible to restrict the data region only to the submitted data?
    Best regards
    Jan

  • Rounding to two decimal places

    In Java, how do I round a number off to two decimal places?
    Thank You

    java.text.DecimalFormat
    Or use java.math.BigDecimal and specify rounding rules, apparently.

  • Is there any RFC function module to read domain fixed value

    Hi,
    Is there any RFC function module to read domain fixed value from remote system in basis layer?
    As we cannot simply wrap DD_DOMVALUES_GET with a new RFC module,because remote system will not install our component, our wrap function module is not there.
    We may need a RFC fm from basis layer.

    HI,
    Try using Function Module:
    DD_DOMA_GET , If it is RFC enabled it can be used for reading the domain,
    Kindlly go through this link below:
    How to get "Fixed Domain Values" from other system by RFC-Call?
    Hope it helps,
    Regards
    Mansi

  • Is there any function module to give absolute value of a number?

    Hi,
    Is there any function module to give absolute value of a number?
    That has similar functionality to the Built in Function ABS.
    Please let me know.
    Thanks,
    cs

    hi,
    why are you looking for any function module.
    You can easily get it by mathematical function ABS .
    Syntax : <Turget Variable> = ABS <Source Variable>
    \[removed by moderator\]
    Anirban Bhattacharjee
    Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM

  • To pass the values in repetitive structures any function module

    hi all,
          Is there any function module to pass the values in repetitive structures like infotype 0041(Date spcification). I heard there is a function module, so any of you can tell that function module.
    thanks,
    sekhar.

    Hi Chandra,
    If your question is to find a date for a given dar value in IT 0041 then this is the sol:
    Yes there is a function Module for IT0041, HR_ECM_READ_IT0041_DATE_TYPE
    eg: 
    INFOTYPES: p0041.
    DATA: lv_msg TYPE REF TO if_hrpa_message_handler,
              lv_date TYPE D.
    GET pernr.
    CLEAR: lv_date.
        CALL FUNCTION 'HR_ECM_READ_IT0041_DATE_TYPE'
          EXPORTING
            datar           = 'U2'       " specify the value of the dar value, for which u have to find date
            p0041           = p0041
            message_handler = lv_msg
          IMPORTING
            date            = lv_date.
    For the dar value U2, lv_date will have the corresponding date.
    Hope this will clear your doubt.
    Thanks,
    Kishore

  • Is there any function module todelete decimal values

    hi all
    is there any function module todelete decimal values not converting charcter or numeric values i want to change my value with decimals to with out decimals.
    please give me suggetion.
    Thanks
    Ramana reddy

    hi dear
    you can use type P or I
    Data W_VAL type P.
    Data W_VAL type I.
    or assigned dictionary field like Mara-MATNR as getting your value
    Rewards if Useful.

Maybe you are looking for

  • Best way to insert pages from a document to another

    Hi everybody, I need to append/insert pages from a InDesign CS4 document to another one with all the content that may be present in page. What is the best way to implement that? I didn't find anything similar to kAddDocToBookCmdBoss. The optimum woul

  • Imac dual monitor primary monitor issue

    This is driving me nuts and I must be missing something... I have a 27" Imac (all-in-one) fully loaded with all the software I need (which I will call my old machine). I then bought another iMac but a newer one (I will call my new machine) again load

  • SAP ABAP HR-payroll attendence Recorder

    HI, implimantion is started related attendence swipe reader - we are useing RFC interface. once swipe the card i want to display -  swipe card no ,emp no, timein After logout time  Swipe the card i want to display -  swipe card no ,emp no, timeout. W

  • Jampack Installation Error. Please help

    Hello guys, I have a major problem , I have bought the Jam packs, 1, 2, and 3. When i tried to install them in logic, It asks for Jampack one, so i putted it in. When i pressed ok, It starts and stops immediately. Saying that i need to check my conne

  • Join conditions in data source - Configurable sub scenario

    Hello Experts, In configurable sub scenario, when I try to join 2 tables (EKKO and EKPO), I am getting a warning message saying that "Redundant Join Conditions proposed; manual maintenance required" and the data source is not fetching any data. Could