Regarding rounding the integer values.

I have to round a type P decimals 3 value to type P decimals 2.
can any one give me the syntax for this..

DATA pack TYPE p VALUE '12345678'.
WRITE pack NO-GROUPING ROUND 2 DECIMALS 4.
The output of the WRITE statement is "123456,7800".

Similar Messages

  • Rounding Off is not rounding the net value in Debit/Credit Memo

    Dear Experts,
    Please guide me in the below mentioned situation:
    I have used  "Rounding Off" i.e. DIFF condition type in the pricing procedure and it is giving the desired result. But when I am creating Credit/Debit Memo, the Rounding Off is taking that value which it has taken to round the total value in creating billing document. As a result in many cases, while creating Credit/Debit Memo the Rounding Off is not rounding the net value of the document.
    Please guide me how to solve this problem.
    With regards,
    Jhelum Roy.

    Thank you sir for this information. this is really helpful.
    Further
    My requirement is to capture this rounding value also and show it in the print and carry to GL account. So that client can generate a report on this extra revenue by rounding values.
    I ahve only condition type in my rpicing procedure as per my requirement. details maintained are below
    condition typr: ZPPC
    Mandatory:  X
    print : X
    requirement : 2(Item with pricing)
    cal type: 17 (Rounding as perT001R)
    Acc Key: ERL
    in the table T001R table the calue maintained for Co.Code is+currency is 5(so that system is alsays round up 5)
    tha t means if the value is 26.03 then it will become 26.05. This is working fine. but how to capture this 0.02 seperatly and carry to gl accouns
    Thanks you in advance
    Kiran Musuku

  • How to round the fractional values in Abap webdynpro?

    Hi Experts,
    I have designed a screen in which I have a field called ANZHL(which is numberic field of infotype14) It is a fractional digits which needs to be rounded when it comes to display in my webdynpro application?
    Here is my code .........
    How to round the ANZHL field ?
    **if start and end dates are changed then delete the old and insert the new else just mmodify the record
        if ws_0014_temp-begda ne ws_edit-begda or ws_0014_temp-endda ne ws_edit-endda.
          call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = '0014'
              number        = wd_this->w_pernr
              subtype       = ws_0014_temp-subty
              objectid      = ws_0014_temp-objps
              lockindicator = ws_0014_temp-sprps
              validityend   = ws_0014_temp-endda
              validitybegin = ws_0014_temp-begda
              recordnumber  = ws_0014_temp-seqnr
              record        = ws_0014_temp
              operation     = 'DEL'
              nocommit      = 'X'
            importing
              return        = w_bapireturn.
          " key                    = w_bapireturn.
          if w_bapireturn-type ca 'EA'.
            r_bapireturn = w_bapireturn.
            return.
          endif.
          ws_0014 = ws_0014_temp.
          ws_0014-endda = ws_edit-endda.
          ws_0014-begda = ws_edit-begda.
          ws_0014-anzhl = ws_edit-anzhl.
                      call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = '0014'
              number        = wd_this->w_pernr
              subtype       = ws_0014-subty
              objectid      = ws_0014-objps
              lockindicator = ws_0014-sprps
              validityend   = ws_0014-endda
              validitybegin = ws_0014-begda
              recordnumber  = ws_0014-seqnr
              record        = ws_0014
              operation     = 'INSS'
              nocommit      = 'X'
            importing
              return        = w_bapireturn.
          " key                    = w_bapireturn.
          if w_bapireturn-type ca 'EA'.
            r_bapireturn = w_bapireturn.
            return.
          endif.
        else.
          ws_0014 = ws_0014_temp.
          ws_0014-anzhl = ws_edit-anzhl.
    Edited by: Dharani us on Oct 8, 2009 10:15 AM

    Hi,
    For that attribute, you want to display the decimal values or what.
    Regards,
    Lekha.

  • How to just show the integer value of "MarkerText" in my chart?

    I put the tag of "MarkerText " in my BAR_HORIZ_CLUST. Then I can successfully get the values on my bar. But the point of decimal is not good. I just want to show the integer of the number(In fact, all of our value are integer. For example, I have a value "7". But it shows me "7.000" ). I searched a url to do it: http://blogs.oracle.com/xmlpublisher/2007/05/15#a293. But it is only available for pie. With regard to my BAR_HORIZ_CLUST, I cann't find any way to do it.
    This is my sample file:
    Chart Definition:
    chart:
    <Graph graphType="BAR_HORIZ_CLUST">
    <MarkerText visible="true" markerTextPlace="MTP_CENTER"/>
    <Title text="Requests Closed" visible="true" horizontalAlignment="CENTER"/>
    <LocalGridData colCount="{count(xdoxslt:group(.//ROW, 'AGENTNAME'))}" rowCount="1">
    <RowLabels>
    <Label>amout of closed requests</Label>
    </RowLabels>
    <ColLabels>
    <xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select=".//ROW" group-by="AGENTNAME">
    <xsl:sort select="current-group()/AGENTNAME"/>
    <Label><xsl:value-of select="current-group()/AGENTNAME"/></Label>
    </xsl:for-each-group>
    </ColLabels>
    <DataValues>
    <RowData>
    <xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select=".//ROW" group-by="AGENTNAME">
    <xsl:sort select="current-group()/AGENTNAME"/>
    <Cell><xsl:value-of select="current-group()/AMOUNT"/></Cell>
    </xsl:for-each-group>
    </RowData>
    </DataValues>
    </LocalGridData>
    </Graph>
    I modified the tag of "MarkerText" as below but still not available :(
    <MarkerText visible="true" markerTextPlace="MTP_CENTER">
    <X1ViewFormat>
    <ViewFormat decimalDigit="0" decimalDigitUsed="true" decimalSeparatorUsed="true" />
    </X1ViewFormat>
    </MarkerText>

    First, make sure you are targeting the correct axis -- Y1 vs X1, etc.
    Second, if you include all attributes in <ViewFormat> it should work.
    Example:
    <MarkerText visible="true" markerTextPlace="MTP_CENTER">
    <Y1ViewFormat>
    <ViewFormat decimalSeparator="." decimalDigit="0" decimalSeparatorUsed="true" decimalDigitUsed="true"/>
    </Y1ViewFormat>
    </MarkerText>

  • How to check the integer value with Date Column

    Hi Friends,
    I have a filter called 'Days'. I need to show the data based on the Days filter (Example : 2 Days).
    Example Query:
    Select * from Tb1
    Where EndDate(Value as '03/05/2013' > Days ( value as 2)
    How to handle the above scenario.
    Thanks in Advance....
    Regards,
    LuckyAbdul

    what meanings does it make. how can you compare a date to day count. Or is the inetger value an offset ie say 2 days from today etc?
    If yes you can use like below illlustration
    DECLARE @DayOffset int
    SET @DayOffset = 2
    SELECT *
    FROM TAble
    WHERE ENdDate >= DATEADD(dd,DATEDIFF(dd,0,GETDATE()),@DayOffset+1)
    refer
    http://visakhm.blogspot.in/2010/01/some-quick-tips-for-date-formating.html
    Please clarify with an example what you're expecting if its different from the above.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Rounding the Exponent value

    Hi all
    I have a problem while declaring a variable with type f.
    The variable is added with a set of exponent values which are fetched from a table.
    when the value decreses by 0.00001. The output of the variable is for exponent is increasing.
    For example 0.1333 E-7 is returned as 1.333E-8.
    I need to fix the exponent value as E-7. I have seen the synatax with write statement but for my requirement i need to move the value to the variable instead of write statement
    Please let me know your suggestion to solve this problem.
    Thanks,
    Karthikeyan.

    Please post your code. From what you write I really do not understand what you are talking about.
    Regards,
    Clemens

  • Read integer values from spreadsheet and display the values in a table

    Hi all,
    I have integer values to read from a spreadsheet and display them in a table. I am using 'Read from spreadsheet file' in 'integer' mode. I would like to display these values in a table. The problem is that the table takes only 2d-array of string as input but not integer.  
    It works fine if I change the mode of 'Read from spreadsheet file' from 'integer' to 'string' but I want to read integers and have to use the integer values for further calculations. Please give any suggestions on displaying integers to a table.
    Thank you. 
    Solved!
    Go to Solution.

    No don't take element by element just convert as a whole. See the attached example
    Good luck
    The best solution is the one you find it by yourself

  • Rounding the values in Query designer

    In Query Designer, I am trying to store the rounded value of the below calculations to use in calculating a difference amount and %variance.
    Currently:
    Report shows actual % of 1.1 and budgeted % of 1.1, because we are rounding the actual value of 1.0798 to 1.1 and the budgeted value of 1.1326 to 1.1.  The difference is calculated as budget u2013 actual or 1.1326 u2013 1.0798 = .0528 and the percent variance is 0.0528/1.1326 = 4.66%.
    Requested:
    The end user wants the rounded values of 1.1 used in calculating the differences and percent variance, so 1.1 u2013 1.1 = 0 difference and percent variance is 0/1.1 = 0%.
    What function can I use to recall the rounded values to use in difference and percent variance calculations?
    Thanks for any and all help!
    Kim Plut

    HI Al -
    Your suggestion:
    If you want to round a key figure "KF" to have zero decimals:
    ( FRAC ( 'KF' ) < 0.5 ) * FLOOR ( 'KF' ) + ( FRAC ( 'KF') >= 0.5 ) * CEIL ('KF')
    An equivalent MS Excel formula you can use to test is:
    =IF(A3-TRUNC(A3)<0.5,FLOOR(A3,1),CEILING(A3,1))
    If you want to round a key figure "KF" to have 2 decimals:
    ( FRAC ( 'KF'*100 ) < 0.5 ) * FLOOR ( 'KF' * 100 ) / 100 + ( FRAC ( 'KF'
    100 ) >= 0.5 ) * CEIL ('KF' * 100) / 100
    The equivalent MS Excel formula to test it is:
    =IF(A5100-TRUNC(A5100)<0.5,FLOOR(A5100,1)/100,CEILING(A5100,1)/100
    is exactly what I need, I am struggling to find the formula to round the key figure to 1 decimal in the query, any suggestions on how to modify the above formulas to return one decimal.  I was able to successfully test in Excel but cannot get the correct formula in Query designer.
    Thanks
    Kim

  • 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 can i write the floats value in Unitronics vision230 plc using modbus Ethernet

           How can i write the Float value in unitronics Vision230 PLC usinsg modbus ethernet (MB Ethernet Master Query.vi) I  read and write  the 32 bit register,  for e.g i want to write the 23.45 value on 2nd add. of MF. And MF register is 32 bit register. I  read and write  the 32 bit register.
    Narendra.
    Solved!
    Go to Solution.

     Thanks Amit for your solution but i can not use the string to write the value because  MB Ethernet master Query.vi only accepet the integer value its not take string values or any other i.e floats values etc.....otherwise i have  no problem to write or read the 32 bit register values , only problem is that the MB Ethernet master Query.vi only accept the integer value there4 how can write the float value.
    Narendra
    Message Edited by Artemistech on 01-30-2009 11:06 PM

  • Nearest integer value

    If i have a value say, 1.47
    the nearest integer value is 1.
    if 1.51, the integer value is 2.
    How to get this,
    Thnx in advance

    Hi
    try this,
    report  zars no standard page heading
            line-size 170
            line-count 65(4).
    data : int type i.
    data : char(10) type c value '123'.
    class cl_abap_container_utilities definition load.
    call method cl_abap_container_utilities=>read_container_c
      exporting
        im_container           = char
      importing
        ex_value               = int
      exceptions
        illegal_parameter_type = 1
        others                 = 2.
    write : int.
    Reward if helpful,
    GAURAV J.

  • 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

  • Want to round the value can any body suggest

    hai all
    i want to round the value and store it in on variable
    eg:12334.789 as to 123345 it should be stored in some variable
    suggest me please
    thanks in advance
    sindu

    Hi,
    You can Use either
    FLOOR : Largest integer value that is not greater than 12334.789
    or
    CEIL: Smallest integer value that is not less than 12334.789
    or
    TRUNC :Interger part of 12334.789
    Eg:
    DATA: I TYPE I,
              X   TYPE P  VALUE '12334.789 '.
    I = FLOOR( X ).    output- 12334
    I = CEIL( X ).          output- 12335
    I = TRUNC( X ).      output: 12334
    regards
    Rakesh

  • Regarding rounding off value in pricing procedure

    hi fi professionals,
    i have an issue regarding pricing procedure, pls help me out, its urgent
    i have a condition type, zrou(rounding off value)
    the fanda is- when i am creating po- my net value is suppose- 19.90.
    so my client requirement is- 0.10
    so i have given 0.10, then total value is- 20.00
    but this value is not pickin up in migo- accounting document
    it is picking 19.90 only.
    so what is the configuraion needed in omsy for picking up the total value in accounting doc.
    regards,
    susanta

    Hi..
    You would need to maintain a account key in the pricing procudure which would calculate the balance to make the total a rounded value.
    In FI perspective, you need to assign a GL account for that..
    Cheers
    Raghu

  • Formatting amount to 2 decimal places without rounding the value

    Hi 
    My requirement is to format the amount field, when I am using the simple type and setting the format as ###,##0.00 then it is rounding off the value.  Foe example say the amount is 3,567.236 in this case it rounds it off to 3,567.24 which I do not want we want the value to display as 3,567.23.  Does anyone have any idea how this can be achieved.
    Thank you
    Regards,
    Preet

    Use the following :
    BigDecimal bigDecimalh = new  BigDecimal("22.335642");
              bigDecimalh = bigDecimalh.setScale(2, BigDecimal.ROUND_DOWN);
    Regards,
    Himanshu

Maybe you are looking for

  • How to Restrict Return Sales Order with reference to a cancelled invoice

    SAP Standard is allowing to create Return Sales Order with reference to a cancelled invoice which practically should not be allowed. Has any body worked on this problem and what could be the possible solutions so that return sales orders can not be c

  • How can I even out the volume levels of my audio?

    Hi, I'm fairly new to FCE and to editing in general. I've got a clip which contains a conversation, my camera is pointed at one of the speakers and their side of the conversation is significantly louder than the other. Is there a filter I can use to

  • [GNOME], [Firefox] (still) defaults to GIMP for PDF files

    I've installed Arch Linux with GNOME twice this past year, on both i686 and x86-64 systems. Both times, I've installed GNOME with it's default PDF reader, Evince, as well as GIMP for image editing (of course). Firefox, regardless of my preferences in

  • Caller identification for business partner inactive.

    Hi Guys, When you receive a call from a business partner with status "inactive" or lock "Central block", system automatically identify business partner using ANI. However business partner is marked like "Inactive" because is a old record and this tel

  • Differences between Arch linux and RHEL-based Distros?

    Hi there! So, I am officially trying to make the permanent switch from Windows to Linux. I've used Linux in the past, from Ubuntu, to Fedora, to Mint, and I've always liked Arch the most. Nothing beats the feeling of an OS you had a hand in setting u