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

Similar Messages

  • 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.

  • 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 salary components in Payresult table

    Hi Experts,
    I have a query around rounding off amounts in PC_PAYRESULT cluster. The basic pay should be rounded off two places from decimal ( This is done by v_512w_d, changing PC -10 (A)) but for other wage types the rounding of rule is no value post decimal and rounding off the amount after decimal to next number.
    Really appreciate any help on the same. Thank you so much for all your support.
    Regards,
    J
    Edited by: jyotsgsap on Aug 1, 2011 1:29 PM

    Sorry , in case of wrong communication from my side, when i said about the process class 10  Spec A , it means this is the standrad one which was been provided by the SAP so for the wage types which are in IT0008 if they come into proration (i means PRCL 10 as 1 and if all them has to be rounded off in such cases instead of useing the PCRs we can go with the standrad one so i have said to go in the said manner in the previous thread) in standrad to round off the wage types we have to go with Custom PCRs if you are asking for Wage types in IT008 , 0014 , 0015 Etc
    the pcr shd be inserted below XVAL if any or else u can use Spec A for wage types IT0008 , for wage types in IT0014 and 0015 you can use INAP

  • I want to read and assign value of ADF Table rows  with Java Script

    Hi,
    I want to read and assign value of ADF Table rows with Java Script, but I cant true index of current row , so I assign wrong value to anathor column of ADF Table.
    My Code;
    ADF Table items
    <af:column sortProperty="Adet" sortable="false"
    headerText="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.labels.Adet}"
    binding="#{backing_ucret.column2}" id="column2">
    <af:inputText value="#{row.Adet}"
    required="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.attrDefs.Adet.mandatory}"
    columns="10"
    binding="#{backing_ucret.inputText2}"
    id="inputText2" onchange="getTutar('#{bindings.voHarcamaOdeme1Iterator.rangeStart + bindings.voHarcamaOdeme1Iterator.currentRowIndexInRange + 1}','#{bindings.voHarcamaOdeme1Iterator.estimatedRowCount}','#{row.index}')">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.formats.Adet}"/>
    </af:inputText>
    </af:column>
    MY JAVA SCRIPT CODE
    <f:verbatim>
    <script language="javascript" type="text/javascript">
    function getTutar(rowkey,totalrow,currentRow){
    alert('rowkey--totalRow--currentRow-->'+rowkey+'--'+totalrow+'--'+currentRow);
    if (currentRow==0) {
    rowkey=totalrow-1;
    }else{
    var rw=totalrow-currentRow-1;
    rowkey=rw;
    alert(document.getElementById('form1:table1:'+rowkey+':inputText8').value);
    alert(document.getElementById('form1:table1:'+currentRow+':inputText8').value);
    var birim_ucret=document.getElementById('form1:table1:'+rowkey+':inputText8').value;
    var adet=document.getElementById('form1:table1:'+rowkey+':inputText2').value;
    document.getElementById('form1:table1:'+rowkey+':inputText3').value=birim_ucret*adet;
    document.getElementById('form1:inputText6').value=0;
    var t;
    var toplam=0;
    alert('before Sum');
    for (var i=0;i!=totalrow-1;i++){
    t = document.getElementById('form1:table1:'+i+':inputText3');
    toplam+=t.value*1;
    document.getElementById('form1:inputText6').value=toplam;
    </script>
    </f:verbatim>

    You can achieve the use case you describe with partial page rendering (PPR), a feature of the ADF Faces framework. Here are a few posts that achieve an interactive behavior using PPR. Off the top of my head I do not know of an exact example, but this should be a good starting point:
    http://thepeninsulasedge.com/blog/2006/09/12/adf-faces-aftableselectmany/
    http://thepeninsulasedge.com/blog/2006/08/31/adf-faces-working-with-aftableselectone-and-the-dialog-framework/
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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 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

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

  • Fetch the values from internal table inside an internal table (urgent!!)

    data : BEGIN OF PITB2_ZLINFO occurs 0,
             BEGDA LIKE SY-DATUM,
             ENDDA LIKE SY-DATUM,
             PABRJ(4) TYPE N,                       "Payroll Year
             PABRP(2) TYPE N,                       "Pay. Period
             ZL LIKE PC2BF OCCURS 0,
           END OF PITB2_ZLINFO.
    I have a internal table like this,
    How to Fetch the values from internal table inside an internal table.
    Kindly Help me on this..
    Regards,
    Ram.

    Hi,
    Try this....
    Loop at PITB2_ZLINF0.
    Loop at PITB2_ZLINF0-ZL.
    endloop.
    Endloop.
    Thanks...
    Preetham S

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • Regarding rounding off for amount

    dear all,
    can anybody tell me how to round off the amount which is printing in decimals..
    i want to round off the final amount in script..print form.
    thx in adv.
    jigar

    Declare a field like this...
    DATA : amount type p decimals 2.
    Pass your field to <b>amount</b> automatic rounding takes places... display your field.
    In script if you want to restrict the number of decimals do it like this...
    &EKPO-MENGE(.2)& --> display 2 decimals ex, 14532.34
    Regards,
    SaiRam

  • How enter the values in to table when create entries option is not working

    hi everyone,
         can u please tell me How enter the values in to table when create entries option is not working.
    it's urgent.
    thanking u all

    Hi Shree,
    how many entries u want to insert ,,
    is it a ztable or custom table ..
    just tell me ur clear requirement ..
    clarify the same ..
    if no options avaliable then if its less entries or some value u can do it through debugging ..
    if its bulk entries then u can write a program ..
    just let me know ..
    regards,
    VIjay

  • How to switch off the constraints of database tables

    hi
    how can i switch off the constraints of database tables?

    But do remember that if once you disable to constraints, enter some data and then try to enable again. If there is some conflicting data, Oracle is going to cry and will not allow you to enable the constraints.
    Sidhu

  • Unable to display the ClobDomain value in adf table

    Hi ,
    I have a database table whose column is Clob. Accordingly the Entity Attribute and VO attribute are of type. oracle.jbo.domain.ClobDomain
    Now this VO is wired as a ADF Table in jsff page. I am setting the value programmatically inside the AM by using the following.
    //Code inside AM
    String text="some xml";
    ClobDomain clobval=new ClobDomain(text.toString())
    vo.setAttribute("atrName",clobVal);
    Now at the UI level, I was able to print the value of the attribute inside a bean code. However, in the adf table, this cell is always empty. But if i try to set the value through UI then it works.
    If i make the inputText readonly then it displays the value.
    Am i missing something.
    Inside the af:column
    <af:inputText value="#{row.bindings.VariableValue.inputValue}"
    label="#{bindings.TestcaseInput.hints.VariableValue.label}"
    required="#{bindings.TestcaseInput.hints.VariableValue.mandatory}"
    columns="#{bindings.TestcaseInput.hints.VariableValue.displayWidth}"
    shortDesc="#{bindings.TestcaseInput.hints.VariableValue.tooltip}"
    id="it4" converter="oracle.genericDomain"
    rows="10">
    <f:validator binding="#{row.bindings.VariableValue.validator}"/>
    </af:inputText
    jdev version 11.1.1.6.0

    Try using SELECT_TEXT in place of READ_TEXT.
    Hope this helps.
    Regards
    vinayak

  • Urgent Regarding round off values in script

    Hi Gurus,
    I want to display round off values in total amount . Order conformation
    i wrote one suroutine but it is not working , it is going for dump.
    Eg:- total amount = 10004.49 it should display in 10004.
             total amount                 = 10004.51  it should display in 10005.
    Plz help.
    REPORT  ZVALUES.
    tables:komk.
    form round TABLEs INTAB  Structure ITCSY
                                         OUTTAB structure ITCSY.
    data: w_fkwrt type fkwrt,
             w_fkwr type fkwrt.
    read table intab with key name = 'KOMK-FKWRT'.
    if sy-subrc = 0.
    w_fkwrt = intab-value.
    w_fkwr = ceil( w_fkwrt ).
    outtab-value = w_fkwr.
    condense outtab-value.
    modify outtab transporting value.
    endif.
    endform.
    in layout i call this subroutine like this.
    /:DEFINE &KOMK-FKWRT1& := &KOMK-FKWRT&.
    /:PERFORM ROUND IN PROGRAM ZVALUES.
    /:USING &KOMK-FKWRT&.
    /:CHANGING &KOMK-FKWRT1&.
    /:ENDPERFORM.
    SU Final amount,,,,,,,,,,,,,,,,&KOMK-FKWRT(I13)&
    Thanks & Regards,
    Vamshi

    Use this FM
    CALL FUNCTION 'HR_IN_ROUND_AMT'
      EXPORTING
        amount        = p_amt
        rndoff        = '100'.
       RNDLMT        = 'N'
    IMPORTING
       RETAMT        =
       DLTAMT        =

Maybe you are looking for

  • In Gmail I can setup other accounts to "send" email from- can I use these other addresses in Mac Mail

    In Gmail if you click the 'cog' button under your username you can choose "Settings" from the drop down menu. From Settings you choose the accounts and import tab and can enter other email addresses. This is useful to me because I have an email addre

  • FMS for syncing background video

    I have a question regarding which version of Flash Media Server will best serve the project I am currently working on and whether the approach I have in mind is possible with FMS. The project envolves Flash Media Server syncing a dynamic background a

  • Hello

    I have prepared a report regarding the TDS details . I have used the tables BSIS and BSAS. But when I am executing the report I am facing runtime error (TIMEOUT ERROR) . can any body suggest me what I have to do for its batter performance???? Moderat

  • Remove the Enter key binding from a JPopupMenu

    Hi, Does anyone know how to remove the Enter key binding from a JPopupMenu? So when the popupmenu is showing and you type Enter, nothing should happen and the menu should stay where it is. I have tried: popup.getActionMap().put("enter", null); popup.

  • Composer column

    In the new iTunes 11, in the store, if I click on an album I see the "Name", "Artist", "Time", "Popularity" and "Price" columns. But no the "Composer" column, a useful information especially for classical music. There is a way to see the Composer col