How to find the average of table row values it should display in next row in libwindow/​CVI

Hi,
How to find the average of table row values it should display in next row in libwindow/CVI
Please let me know the solution.

There isn't a built-in function to perform calculations on thable cells. What you can do is to retrieve thable cells values and calculate the average by yourself.
To retrieve a bunch of cells in a single instruction you can use GetTableCellRangeVals: prerequisite for this function to work correctly is that cells are all included in a Rect structure (shortly, a rectangle) and are all of the same data type. See the help for the function for some explanations and the link to an example of its usage. In Cell range parameter you can pass VAL_TABLE_ROW_RANGE (row) macro to retrieve an entire row. See here for details.
Once you have retrieved cell values in an array, you can pass it to Mean function to calculate the average.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • How to find the list of Tables....

    Hi
    How to find the list of Tables associated with When a Goods Issue is done for a Process Order ??
    Kindly tell me step-by-step procedure in browsing it.
    cheers
    MaruthiRam

    Hi
    goto SE16 Click F4, You have two options Information system & Sap Applications.
    Click on SAP Applications & selec the application you wnat to see, for E.g Purchasing you can click on materials managemnt, Purchasing if you drill down you will see the list of tables....
    reward points if useful
    Thanks & Regards
    Kiran

  • How to find the columns and tables used in a stored procedure?

    Hi,
    Can someone suggest how to find the columns and tables used within a stored procedure?
    Thanks
    VBK

    For example:
    SQL> create or replace
      2    procedure p1
      3      is
      4          cnt number;
      5      begin
      6          select count(*) into cnt from emp;
      7  end;
      8  /
    Procedure created.
    SQL> select  referenced_owner,
      2          referenced_name
      3    from  dba_dependencies
      4    where owner = 'SCOTT'
      5      and name = 'P1'
      6      and referenced_type = 'TABLE'
      7  /
    REFERENCED_OWNER               REFERENCED_NAME
    SCOTT                          EMP
    SQL> SY.

  • How to find the count of tables going for fts(full table scan in oracle 10g

    HI
    how to find the count of tables going for fts(full table scan) in oracle 10g
    regards

    Hi,
    Why do you want to 'find' those tables?
    Do you want to 'avoid FTS' on those tables?
    You provide little information here. (Perhaps you just migrated from 9i and having problems with certain queries now?)
    FTS is sometimes the fastest way to retrieve data, and sometimes an index scan is.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9422487749968
    There's no 'FTS view' available, if you want to know what happens on your DB you need, like Anand already said, to trace sessions that 'worry you'.

  • How to find the CRM related Tables form a Particular DataSource

    Hi friends
               <b>How to find the CRM related Tables form a Particular DataSource
      of BusinessContent.</b>
      ex: i had taken CRM - DataSource ........ 0CRM_LEAD_H (Lead Header Data)
           for this DS i assign IS and extract data. But i want to Know from which
           CRM tables it was comming.
           ie ..I want to know the what tables linked to Datasource(0CRM_LEAD_H)
           How it has to check?

    Just for your info, you can find as useful (for a methodology to solve this kind of issue) this weblog:
    SAP BW and Business Content Datasources: in pursuit of the origins
    Hope it helps!
    Bye,
    Roberto

  • How to find the Source system table

    Hi Experts,
    How to find table name in SCM APO system, because I am getting error in process chain, the corresponding  table in the source system does contain any data. check the data basis in the source system.
    Please provide the solutions how to find the table in APO (DP scm bi).
    Thanks in advance.
    Bye,
    Bharathi.

    Hi
    I guess you knew that in APO, apart from APO tables.. it is Livecache where the actual transaction data is stored. 
    But, if you just want to find some of the existing table in APO.. simply go to se11 and in the table name put the pattern as /SAPAPO/* and press F4. It will give a list of tables with the descriptions. 
    You can find out yourself all APO tables application wise with the following steps:
    Use transaction SE11 or SE16
    - Press F4 in the selection field 
    - You will get popup... in the below line of the popup selection SAP Applications.
    Here you will get the Application list.  In that select your own application for which you want to get the table details
    e.g. SCM- Supply Chain Management --> SCM-APO --> Advanced Planning and Optimization --->SCM-APO-MD - Master Data --> /SAPAPO/00_PRODUCT 
    Here are some examples:
    /SAPAPO/v_matloc - material, material number location view
    /SAPAPO/TSAREAKO - Planning Area details
    /SAPAPO/TSAREATE - Planning Area technial fields
    Since there are thousands of tables, I cannot list them all here. 
    or
    You can use transaction ST05 (database trace) to help you find the tables you are looking for. You can turn on the trace function, run an APO transaction, and looks at the ST05 logs for the tables

  • How to find the relation between tables

    Hi
    I am working in Oracle R12
    How to find the relationship between these tables INV_MIN_MAX_TEMP,po_requisition_lines_all and Per_all_people_f
    These two table i have joined with po_requisition_lines_all and Per_all_people_f To_person_id from PO and Person from hr table but i cant able to join this table with other tables INV_MIN_MAX_TEMP
    regards
    Srikkanth

    Hi;
    Please check e-trm site for table relation,integration,explanation etc..
    etrm.oracle.com/
    Regard
    Helios

  • How to find the common dimension tables used in Finance AR/PR and GL,

    Hi All,
    I need to find the common dimension table used in the Finance modules (AP,AR,PO,GL...), Since separate teams are working on populating each modules, and we need to find the dependency so that our loads shouldn’t impact others.
    Thanks!
    OBI

    Hi Guys,
    Thanks for all your answers.
    Yes....You are all right. We can list out the used tables upto certain extent. Anyhow, I have done some R&D to derive the SQL's which is given below:
    SELECT TABLE_NAME FROM USER_TABLES
    MINUS
    SELECT DISTINCT UPPER(REFERENCED_NAME)
    FROM user_dependencies
    where
    referenced_type='TABLE' and UPPER(NAME) in
    select distinct UPPER(object_name) from user_objects where UPPER(object_type) in
    'MATERIALIZED VIEW',
    'PACKAGE',
    'PACKAGE BODY',
    'PROCEDURE',
    'TRIGGER',
    'VIEW',
    'FUNCTION'
    UNION
    SELECT UT.TABLE_NAME FROM
    SELECT TABLE_NAME FROM USER_TABLES
    MINUS
    SELECT DISTINCT UPPER(REFERENCED_NAME)
    FROM user_dependencies
    where
    referenced_type='TABLE' and UPPER(NAME) in
    select distinct UPPER(object_name) from user_objects where UPPER(object_type) in
    'MATERIALIZED VIEW',
    'PACKAGE',
    'PACKAGE BODY',
    'PROCEDURE',
    'TRIGGER',
    'VIEW',
    'FUNCTION'
    AND REFERENCED_OWNER=(SELECT sys_context('USERENV', 'CURRENT_SCHEMA') FROM dual)
    ) UT,
    ( SELECT * FROM USER_SOURCE
    WHERE NAME IN
    ( SELECT DISTINCT NAME FROM USER_SOURCE
    WHERE TYPE NOT IN ('TYPE')
    AND
    UPPER(TEXT) LIKE '%EXECUTE IMMEDIATE%'
    ) US
    WHERE
    UPPER(US.TEXT) LIKE '%'||UPPER(UT.TABLE_NAME)||'%'
    AND
    (UPPER(US.TEXT) NOT LIKE '%--%')
    The above SQL Query can list out unused tables by checking the Dynamic SQL Statement also upto some level only.
    Once we extracted the list of unused tables, having a manual check would be also greater to verify as it is should not impact the business applications.
    Regards,
    Subramanian G

  • How to find the difference between 2 time values in Java

    hi all,
    i have 2 time values
    String time1="6:20";
    String time2="21:30"
    How to find the difference between 2 times in Java?
    pls help
    thanx in advance....

    Calculating Java dates: Take the time to learn how to create and use dates
    Working in Java time: Learn the basics of calculating elapsed time in Java
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • How to find the difference between 2 rows in a table

    Hi all
    I have a table say emp which has only 2 rows
    emp
    empno name age sex deptno
    1 X 20 M 10
    2 Y 21 M 20
    The output should be
    empno name age deptno
    1 X 20 10
    2 Y 21 20
    Since the sex are same , so it is not included in the output.
    thanks
    Hari

    Hi there rajkumar,
    Although your lead solution is more elegant than the one presented below,
    I believe the complete answer it would be:
    with mytable as (
    SELECT ROW_NUMBER() OVER (ORDER BY EMPNO) POS, Z.* FROM (
    select 1 empno, 'X' name, 20 age, 'M' sex, 10 deptno from dual
    union
    select 2, 'Y', 21, 'M', 20 from dual) Z
    SELECT
    DECODE(A.EMPNO,B.EMPNO,NULL,A.EMPNO) EMPNO,
    DECODE(A.NAME,B.NAME,NULL,A.NAME) NAME,
    DECODE(A.AGE,B.AGE,NULL,A.AGE) AGE,
    DECODE(A.SEX,B.SEX,NULL,A.SEX) SEX,
    DECODE(A.DEPTNO,B.DEPTNO,NULL,A.DEPTNO) DEPTNO
    FROM
    (SELECT * FROM mytable WHERE POS = 1) A,
    (SELECT * FROM mytable WHERE POS = 2) B
    UNION
    SELECT
    DECODE(B.EMPNO,A.EMPNO,NULL,B.EMPNO) EMPNO,
    DECODE(B.NAME,A.NAME,NULL,B.NAME) NAME,
    DECODE(B.AGE,A.AGE,NULL,B.AGE) AGE,
    DECODE(B.SEX,A.SEX,NULL,B.SEX) SEX,
    DECODE(B.DEPTNO,A.DEPTNO,NULL,B.DEPTNO) DEPTNO
    FROM
    (SELECT * FROM mytable WHERE POS = 1) A,
    (SELECT * FROM mytable WHERE POS = 2) B
    Your query indeed returns NULL in the column for which values are the same, but still, you get just the first row.
    Anyway, the question is how to dinamically select the columns that hold NULL values, in the newly generated result. Because i believe the request is like this, if column holds equal values on both rows, then don't select the column (maybe i'm wrong).
    If this is the case then just by one sql it will not solve your problem, it needs to be more, with sqlplus and some other scripts checking the values in the columns, if it's not null then set an operator, and in the end (in sqlplus)
    select operator1, operator2 etc. from mytable.
    Hope it helps,
    Michael.
    [All the above presented is based on the fact that you shall always have TWO rows to be compared, having more or less it will fail!]
    Message was edited by:
    kjt

  • How-To Find the R/3 Table Name for a BW Data Source

    Hi there,
      Please advice how can I find the respective table name in R/3 for a particular BW DataSource ?
      P/S : I would like a technical how-to instead of referring the table names at HELP.SAP.COM
      For instance, for my Standard Business Content Info Cube 0CCA_C03(CO-OM-CCA: Statistical Key Figures) which extracts from BW Data Source: 0CO_OM_CCA_4
      My question is, how can I find out which specific tables in SAP R/3 is this Data Source pulling the data from ?

    Hi Dinesh,
       Data Source: 0CO_OM_CCA_4
       1) In my R/3, I ran SE16 : Table -> ROOSOURCE
       2) OLTPSOURCE -> 0CO_OM_CCA_4
       3) EXMETHOD = F1
         (Hence, I assume the Extraction Method is a Function Module)
       4) So, Function Module = BWOM_RS_GET_CTRSTA
       5) Run SE37 in R/3
          How do I find out the specific tables in this Function Module ?
          Would you please list them for me, so I can further refer to the individual tables ?

  • How to find the link between tables  CRMD_ORDERADM_H and  BBP_PDORG ?

    HI,All
        By TCODE  BBP_PD,  I cann't find the link by GUID between tables CRMD_ORDERADM_H (Header) and  BBP_PDORG (Purchase Organization) ,  why?  how to find this link?
       thanks
      Jesse.

    Hello Jianxin,
    It depends on document category type.
    For Shopping Cart, no link exist between CRMD_ORDERADM_H and BBP_PDORG tables as purchasing organization is defined at item level.
    For Purchase Order, using BBP_PDORG-SET_GUID, you get PO header GUID (GUID_HI) in table CRMD_LINK where CRMD-LINK-GUID_SET = BBP_PDORG-SET_GUID.
    Regards.
    Laurent.

  • How To Find The Delta Queue Table

    Hi All,
    Can anybody guide me, how and where can we find the table for the delta queue.
    Regards
    rahul
    Message was edited by: rahul kharya

    Hi Rahul,
    You can find the delta queue in RSA7.
    Check this post:
    Delta Queue
    Bye
    Dinesh

  • How to get the index of table row without selection?

    Hi all,
    I have an table designed in XML view.Now i have added an change method for qty cell "valqty". When user inputs the qty in the cell and press enter this method is triggered now I want to know which index of the table is currently edited.Through which i can get the value of other cell in the same row.
    NOTE: The table row doesn't have selection either multiple or single
    I tried the following inside the valqty method but it now working
    this.getValue();
    this.getBindingContext().getProperty('PRD_NUM');
    <Table id="idProductsTable"
    inset="false"
    items="{oModel>/deliverylist}"
    visibleRowCount= "7"
    mode="MultiSelect"
    modeAnimationOn="true">
    <headerToolbar>
    <Toolbar>
    <Label text="Products"></Label>
    </Toolbar>
    </headerToolbar>
    <columns>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Order" />
    </Column>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Quantity" />
    </Column>
    </columns>
    <items>
    <ColumnListItem>
    <cells>
    <Text text="{oModel>PRD_NUM}" />
    <Input value="{oModel>DEL_QUAN}" change="valqty" maxLength="13"  />
    </cells>
    </ColumnListItem>
    </items>
    </Table>
    Thanks

    Thanks Robin,
    But in my case oEvent.getSource() is returning the cell instance and
    oEvent.getSource().getBindingContext() is undefined
    Hence not getting the value
    I also tried the following
    oEvent.getSource().getParent().getParent().indexOfItem()
    But index returned is -1

  • How to find the average a key figure in bex

    Hi All,
    I have a fey kigure (ZAMOUNT) which is amout field. So if there are 'n' records, I need to calculate the average of the amount field(AVERAGEAMT) for those n records.
    Example:
                         EMPLOYEE      ZAMOUNT        AVERAGEAMT
    record1:         employee1         $5000.00          5000.00
    record2:         employee2         $7000.00          5000.00
    record2:         employee3         $3000.00          5000.00
    So I need to the result something like this.
    (500070003000)/3 =  $5000.00

    HI,
    in the bex analyzer go the key figure for which you want-> right click-> properties i->calculate result as -> average.
    Thanks

Maybe you are looking for

  • Home Phone Service via Verizon Wireless needs some SERIOUS rethinking!

    Has anyone else signed up for home phone service over Verizon Wireless? Here in LA, they offered a $19.99/month deal using the wireless service - a box provides the service, and you plug your home phone in. The service is adequate, but somebody forgo

  • Can you use the programs in the creative cloud on multiple computers?

    Hey, I was wondering if it is possible to use the programs on multiple computers when you have the membership? Thanks

  • Can the Condition records in the transaction NACE be transported?

    Can we Transport the Condition records in the transaction NACE from one system to another ( I mean from Dev to Quality). I have navigated through all the menu in the transaction NACE but haven't found any link for transport. Any help pls.

  • Palm z22 problem

    Have had a Palm Z22 for about 4 years. Cannot turn on, attach the charger and it may turn on but the minute I unplug it the screen goes black. Any ideas? Post relates to: Palm Z22

  • Adding New Field in MB51

    Dear All, Requirement is to add new field 'Ship-to Country' in standard report RM07DOCS (MB51) , How can I go about it ? 1) Updating the enhancement points which exists in the report ? 2) Raising Query in SAP to get any OSS notes 3) Copy the standard