How to get only before decimal numbers in Bex formula

Hi ,
I am creating a fomula based on a KF. For eg is KF is
4.9986, in my calculation I need to use 5 or 4 only.I can use with
round off or not, but cannot consider the decimal points.
If a value is 0.00543, I want to consider it as 0.
Is there any function in BW for that.
Also once I have it in the excel , I should see the same thing.
Like in Excel I want to display KF1 as 0 if its 0.045.And my calculation or calculated KY is based on KF1.
Thanks in advance, and let me know if it makes sense.
Tina

Hi,
In the key figure properties, you can specify number of decimal places.
Create a new formula in the Query Designer.
(K1 > 0) * 2 + (K1 = 0) * 1 + (K1 < 0) * 0.
You need to use boolean functions when you create a new forumula. Use this forumula:
(K1 > 0) * 2 + (K1 = 0) * 1 + (K1 < 0) * 0.
If K1 value is 5 then (k1> 0) => will given value as 1 and then you get the result as = 12 + 01+ 0*0 = 2
Regards,
Hareesh

Similar Messages

  • How to get only current exception message from tables

    Hi
    In my sceanario , I want to have the list of Current MRP exception messages list from table
    I understand that MRP detailed lists, including all exception messages, are stored in transparent table MDKP and cluster table MDTC.
    I can tell ABAPer to write a report for me , to read the data from these tables , but I guess these tables contain old exception message also , which are not currently appearing in MRP list
    How to get only current exception message
    Rgds,
    sandeep

    Sandeep,
    MDTC contains only data from the most recent MRP run.  So, all messages you see are those which are currently valid.
    The messages might have first appeared during a previous run, but they still need to be addressed.
    Before you invest a lot of time and effort into writing and debugging a custom report, you should probably try to use the standard SAP functionality found in MD06.  On the Processing indicator tab, you can select "Only with new exceptions".  Here you can tag a material/plant as 'processed', and thereafter, the exceptions that existed there before you tagged the part will not be re-displayed.
    Best Regards,
    DB49

  • In Table Control How to get only a single row .

    Hi
    In Table Control How to get only a single row .I am able to decrease it its height to 4 but then 2 rows is getting dsplayed .I want only one row to be display and 2nd row should be deactivated or not visible.
    regards
    Avik
    Edited by: Julius Bussche on Jan 30, 2009 1:10 PM
    Removed friendly greeting from the subject title

    Hi Avik
    use this code it will help you.
    MODULE passdata OUTPUT.
      READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
      IF sy-subrc = 0.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.      " 111 IS THE GROUP NAME
            screen-input = 1.          " input mode
            screen-active = 1.         " input mode.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.       "GROUP NAME
            screen-input = 0.           " display mode
            screen-active = 1.          " DISPLAY MODE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " PASSDATA  OUTPUT
    Make sure in group tou are passing the field name that you want in input mode on the base of other field
    Hope it will help you.
    Thanks
    Arun Kayal.

  • How to get only the first result in extract function

    do you know how to get only the first element of the function extract.
    v_result := p_response.doc.extract('//'||p_name||'/child::text()').getstringval();
    if i have 5 responses like '100','100',100','200','200' e get '100100100200200' and i want only '100'.
    thanks in advance

    Two ways .....
    1. Use Javascript E4X instead ...there are nice functions for getting children of parents.
    2. Cycle through all of the form1.nodes and look for objects that have a className of "subform". For loops are useful for this task.
    Make sense?
    Paul

  • How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amo

    How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0

    Hi,
    Is your formula attached to basic salary element or some other element? You need to make sure that basic salary element has some value and is processed before this formula is called. Are you able to see value for basic salary element after payroll run?
    Regards,
    Pawan

  • How to get only two digits after decimal point of an expression

    i am doing simple multiplication between two float numbers.
    both the numbers have two digits after decimal point.
    so naturally the result will have 4 digits after decimal point.
    i want to get only two digits after decimal point.
    help me please...

    If you just want to limit the displayed decimal places, you can do the following...
    import java.text.*;
    public class Formatting {
        public static void main(String[] args) {
            NumberFormat format = NumberFormat.getNumberInstance();
            format.setMaximumFractionDigits(2); //what you seem to want
            format.setMinimumFractionDigits(2); //if you always want at least 2 digits displayed
            System.out.println(format.format(12.345));
            System.out.println(format.format(12.0));

  • How to get only column names from different tables as single table columns

    Hi All,
       I have one requirement in which we want only column names from different tables.
    for example :
     I have three tables T1 ,T2, T3 having
      col1 clo2 clo3 -->  T1 , 
      col3 col5 ,clo6 --> T2 ,
      Clo6 col8 col9 --> T3
    columns i want to get only all  Column names from all table as single Resultset not any data from that how can i get that empty resultset 
    because this empty result i want to bind in datagridview(front end) as Empty resultset 
    Please tell me anyways to do this
    Niraj Sevalkar

    If I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
    SET FMTONLY ON
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    SET FMTONLY OFF
    Another alternative is to include an imposible contition
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    WHERE 1 = 0
    If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
    If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
    "No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena

  • How to get rid of the numbers on the Pages flag icon

    How do I get rid of the numbers tag at the top of the Pages Flag in iWork

    Lola
    Got your email and couldn't clearly see what you were talking about because you reduced the resolution on a busy background. So I went to the iTunes Store to find if there was something similar.
    That is the Facebook Pages Manager, and is telling you you have notifications pending in Facebook.
    The Pages refers to the "pages" (different views) of content in Facebook, nothing to do with Apple's Pages.
    Peter

  • How to get only the record which is different by outer join

    Hi,
    how to get the values Existing in table A which are not existing in table B by using left outer join, In this example only the record '3' should display. thanks
    the requirementment is like
    Table A.Number Table B.Number
    1 1
    2 2
    3 4
    4 5
    output
    3

    SQL>  with a as (
    select 1 a from dual union all
    select 2 a from dual union all
    select 3 a from dual union all
    select 4 a from dual
    b as (
    select 1 a from dual union all
    select 2 a from dual union all
    select 4 a from dual union all
    select 5 a from dual
    select a.*
      from a left outer join b on (a.a = b.a)
    where b.a is null
             A
             3

  • GP :How to get only those WorkItems for a particular Process Instance ID

    Hi,
    I have to get only those work items for a particular Process Instance ID.
    Currently I am able to get all gp workitems of a status, for a user.
    IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(epUser1);
                   IGPWorkItem[] openItems = rtm.getWorkItems(GPWorkItemStatus.WORKITEM_STATUS_OPEN, userContext);
    Now I want to get the gp  work items for a particualr process instance ID. Is it possible?
    Please help me.
    Thanks and regards
    Smitha

    Hi Smitha,
    Can you share with us how did you solve your problem?
    I also encountered the same requirement.
    Ashish

  • How to get values after decimal point

    Hi,
    source value is 12345.678 i wana the target side in 12345  in field and 678 in one field.
    the source value its not fixed  before decimal point value pass to one field and after decimal point value pass to other field
    please help to me how to do this one.

    Hi Swathip,
    You dont need to create 2 UDFs. You just need to create 1 simple UDF which takes one string array as input as usual and it has 2 Resultlist outputs. You need to map this 2 outputs from the UDF to the respective 2 target side fields where the values are to be mapped, one containing the portion before the decimal, and one after the decimal.
    I HAVE TESTED THE UDF AND IT WORKS ABSOLUTELY FINE.
    THE CODE FOR THE UDF IS AS FOLLOWS:
    public void sepDec(String[] num,ResultList wholeNum,ResultList afterDec,Container c)
      String part1=null;  // Stores the part before the decimal point
      String part2=null;  //Stores the part after the decimal point
                            if(num[0]!=null && num[0]!=""){
                   int index = num[0].indexOf(".");
                   part1 = num[0].substring(0,index);
                   part2=num[0].substring(index+1, num[0].length());
                         wholeNum.addValue(part1);
                   afterDec.addValue(part2);
    THIS UDF IS A CLASSIC EXAMPLE WHERE AN UDF HAS 2 OUTPUTS, WHICH IS VERY RARELY SEEN BUT VERY MUCH CORRECT
    PLEASE LET ME KNOW IF THIS CODE WAS HELPFUL TO YOU
    CHEERS,
    BISWAJIT
    Edited by: 007biswa on Feb 8, 2011 5:02 PM

  • XPath - How to get only second matching node?

    Hello,
    withs this XPath expression:
    //td[contains(@name, 'FirstColumn')]on this XML:
    <html>
         <table>
              <tr>
                   <td name="MyFirstColumnInRow">A11 - skip me!</td>
                   <td name="MySecondColumnInRow">A12</td>
              </tr>
              <tr>
                   <td name="MyFirstColumnInRow">A21 - find me!</td>
                   <td name="MySecondColumnInRow">A22</td>
              </tr>
              <tr>
                   <td name="MyFirstColumnInRow">A31 - skip me!</td>
                   <td name="MySecondColumnInRow">A32</td>
              </tr>
         </table>
    </html>I have got three matching nodes: A11, A21, A31 .
    How to expand this XPath expression to get only the second node: A21 ?
    I can't find appropriate solution.
    Thanks in advance.

    Why don't you get all the nodes and than you can do whatever you want? You can even get an iterator (here commented out) or write your rule in a loop.
        public static Document parseXmlIntoDOM(File xmlFile,boolean validating,boolean spaceAware) throws XMLException{
            Document document = null;
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setValidating(validating);  
            factory.setNamespaceAware(spaceAware);
            try {
               DocumentBuilder builder = factory.newDocumentBuilder();
               document = builder.parse(xmlFile);
            catch (SAXException sxe) {throw new XMLException("An error in parsing the input source",sxe);}
            catch (ParserConfigurationException pce) {throw new XMLException("An error in parsing the input source",pce);}
            catch (IOException ioe) {throw new XMLException("An error in parsing the input source",ioe);}
            return document;
        public static void main(String args[]){
            Document dom;
            try{
                File file = new File("C:\\Documents and Settings\\diego\\xml\\newXMLDocument.xml");       
                dom = parseXmlIntoDOM(file,false,true);
                XPath xpath = XPathFactory.newInstance().newXPath();
                String expression = "/html/table/tr/td";
                DTMNodeList tdNodes = (DTMNodeList)xpath.evaluate(expression, dom, XPathConstants.NODESET);
                //DTMIterator iterator=tdNodes.getDTMIterator();
                Node secondinstance = tdNodes.item(2);
                System.out.println(secondinstance.getTextContent());
                }catch(Exception e){
                    e.printStackTrace();
        }This works just fine for me and that is my output (in the standard):
    compile:
    run:
    A21 - find me!
    BUILD SUCCESSFUL (total time: 1 second)Sorry the code I wrote is awful, but working. P.S. is there a way for not using the "DTM" api?

  • How to get only updated records for a column using loading type INSERT

    Hi,
    Good morning all,
    I have source1 containg 3 columns bill_cd,bill_desc,bill_date and
    source2 has the columns bill_cd,bill_key,source_id.
    My target has the columns bill_cd,bill_date,bill_desc .
    Now the requirement is, bill_cd in target should not repeated when we run the mapping more than one thime. it should get only updated records not the previous records using only INSERT Loading type(for target) not to use update/insert.
    How can we achieve this logic in mapping level.
    Anybody Please give me some solution immediately.
    Thanks in Advance,
    Siv

    Thanks Herzog for your reply,
    Here bill_cd is not unique. Yes,I want only new records using INSERT as loading type. Suppose when the map runs for the first time, bill_cd is loaded with values 1 to 5.
    Now, in the source I have got new records 6 to 10 for bill_cd and when I run the mapping again I need to get only records for bill_cd from 6 to 10 using INSERT as loading type.
    Is it possible to achieve this at mapping level?
    Regards,
    Siv.

  • How to get only active records from MDM.

    Hi all,
      How can i get only the active records from MDM table.Now i am getting all the records in MDM table in my Master Report Iview.Only some of the records r active.can i get just the active records.If yes,how can i do that.
    regards
    kukku

    closing

  • How to get Only 20 rows? (Urgent)

    Hi, everyone.
    If I want to get only 20 words from a table,
    how can I write query?
    For example,
    Table name: WORD (this table is like dictionary)
    columns: W_WORD, W_MEANING
    Select * FROM WORD
    WHERE W_WORD LIKE 'H%'
    ORDER BY W_WORD ASC
    This query gets all the words starting with 'H'.
    But, I want to get only 20 results(rows).
    How can I do? I'm using MS Acess.
    Please response me. Thank you.

    You seem to be using SQLserver.
    SELECT TOP 20 *
    FROM WORD
    WHERE W_WORD LIKE 'H%'
    ORDER BY W_WORD ASC
    Look up the TOP clause in the docs for further info, other DBMS may have different syntaxes for this functionality

Maybe you are looking for