Find the abs(max/min) value error.

Hi,  SAP experts
Now I want to find the Abs(max) and Abs(min), (you know, for the displacement, if we want to find the max and min, we have to consider it both "+" and "-"), I use the code:
local numbervar i;
local currencyVar min;
local currencyVar max;
For i := 1 to GetNumRows-1 do
    If i = 1 then
        min := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
        max := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
    else
        If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) <= Abs(min) then
            min := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
        If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) >=  Abs(max) then
            max := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
if CurrentFieldValue In [max, min] then
    crBold
else
    crRegular
But it seems not correct, why?

Hi Hu,
See if this works:
local numbervar i;
local currencyVar min;
local currencyVar max;
For i := 1 to GetNumRows-1 do
    If i = 1 then
        min := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
        max := GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex);
    else
        If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) <= Abs(min) then
            min := Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex));
        If Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex)) >=  Abs(max) then
            max := Abs(GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex));
if Abs(CurrentFieldValue) In [max, min] then
    crBold
else
    crRegular
-Abhilash

Similar Messages

  • How to find out the max/min value of one field corresponding to a second field in HANA through graphical way.

    Hi,
    I am trying to find out the latest delivery date(EINDT)  for each purchasing document (EBELN) through graphical way.
    The view contains other fields apart from the above mentioned two fields.
    When only the two fields (EBELN, EINDT) are there, then in semantics, I can select 'Max' as aggregation to get the maximum value for each document.
    If I do like this, then I need to join more than 3 views and also so many joins in calculation view. Taking so much time for data preview.
    Hence , please help me in getting the solution while the view contains other fields also.
    Thanks in advance.
    Thanks,
    Jyothirmayi

    Hi Sreehari/Vinoth,
    Thank you for your replies.
    if only two fields are then I can get the max/min values of one field corresponding to other field.
    But more than two fields are there with different values, then let me know how to find out the max/min value of a particular filed corresponding to the 2nd field with other fields also should be in the output.
    I hope you understood my issue.Please revert in case of questions.
    Thanks & Regards,
    Jyothirmayi

  • How to Programmatically Set the limit (max, min input) of a control inside a cluster?

    I want to programmatically set the limit (max, min input) of a control inside a cluster. (see attached VI).
    The max, min value will be read from a file. The input of the control must be within the range defined by the max and min value.
    Can anyone tell me how to do it?
    Thanks a lot for your kind help.
    Xiaogang

    Accessing the properties of a cluster (or array) is not a trivial operation until you have done it once. It's a two step (at least) process : first, ask for a reference (array of...) to the objects contained in the cluster, then tell LV what kind of object you are adressing.
    See the attachment.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    How to set limit[1].vi ‏52 KB

  • Please! I need a solution to read the running max-min

    I am a starter and not too good in labview. I need to read the running max-min as the random numbers are generated in the loop. iam not getting it right. I have attached the VI. Can anybody please help me making it right???
    Please Please Please!!
    Thanks
    CL
    Attachments:
    run max.vi ‏46 KB

    Your code was somewhat confusing, it was hard to tell what was going on since the upper and lower kept flip-flopping (try to keep mins and max's seperate).  This is *almost* the same code you submitted, just cleaned up a bit more.  Remember that you want to initialize to the first value that comes out of the random number generator, since that will give you a real minimum since the generator may never reach the initialized minimum that you set (which in your case was zero, I doubt the generator will ever return true zero).
    -Danny
    Message Edited by texasdiaz on 09-26-2005 02:44 PM
    Attachments:
    run max.vi ‏45 KB

  • The system cannot find the file specified.Windows sockets error code:2.

    Hi All,
      I am on MDM 5.5 SP6.
      I am getting the following error message when trying to logging in to the DM.
    The system cannot find the file specified.Windows sockets error code:2.This application will now exit.
    Runtime Error :
    Program C :\Program Files\SAP MDM 5.5\Data Manager\Datamanager.exe
    R6025.
    -Pure virtual function call.
    And in console also the MDM server is stopped after getting the above error message.
    Can anybody tell me what could be the problem?
    Thanks & Regards
    Sireesha.

    Hi Sireesha,
    According to me, there can be 3 problems,
    1. Kindly check whether the MDM server is stopped. If it is, then restart the MDM Server and Load the repository with Update indices.
    2. If this error is coming with every repository, the problem will be either in the Version mismatch of the Server and the GUI's you are using. Kindly ensure that the versions for the MDM server and the MDM Gui's Match.
    3. If only Data manager Client is giving the problem, then you can un-install and install the DM GUI again.
    Along with this, please refer to the link below :
    [[The system cannot find the file specified.Windows sockets error code:2.;]
    Hope it helps.
    Thanks and Regards
    Nitin jain

  • The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppres

    I am looking at an issue with users not getting specific group policies. 
    After searching a number of client computers I found that the following error
    The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppressed.
    I can find the folder in the Sysvol folder on all of the domain controllers. 
    The issue with end users seems to be that the proxy settings for internet explorer is not being applied. 
    Potential problems?
    one folder in sysvol entry is empty 
    \\<server>\SYSVOL\<domain.name>\Policies\{E03166E7-A848-48B5-AA93-97B848AA9C13}\User\microsoft\IEAK\LOCK
    or is this our issue
    The old method of configuring proxy settings  to Internet Explorer 9 has changed?
    https://support2.microsoft.com/kb/2530309?wa=wsignin1.0 
    http://thommck.wordpress.com/2013/11/08/the-new-way-to-configure-internet-explorer-proxy-settings-with-group-policy/

    Hi all 
    In administering this policy I am a little confused. 
    We have a policy that distributes proxy settings in the internet explorer maintenance settings section - however when opening this policy up in GPO editor the internet explorer maintenance section is not present.
    I plan to apply the settings via User/preferences/control panel settings/ internet settings (or registry settings from article) however I am unable to edit the settings for internet explorer maintenance and these will persist. Ideas????

  • Where could we find the CT and PT values  for Particular Device ???

    I 'm facing a scenario in  a report  i need to place a  field device number and assosiated  CT's and PT's .
    where could we find the CT and PT values  for Particular Device ??? basically im MM consultant   we don't ahave  DM consultant  please help with this issue???
    means actually i got the table and field  details  for transformation ratio (or) CT/PT ratio
                          ETYP_UEBERVER. from the screen EG03 , t-code
                            but im not sure   this  is the exact field that i require  ....
    can any one help ....   i will be very  thankfull to your  solution  inadvance....

    The transformation ratio are the attributes of a "Winding Group".  Find winding group of a device and then you'll get the desired information.

  • Find the 20 max values

    Say i have an array of 40 doubles. How can i find the 20 maximum values from my array?

    Do you know how to sort?
    Can you use the Java APIs?ha ha..
    yeah.. sort the array and pick the 20.
    Or if you write something like a bubble sort, let the outer loop executing half times as the usual..

  • How to find the second max value

    i have a table named customer, which have a column named salary ,how can i find the customer number which have the second largest salary.

    this example might be of help.
    SQL> select empno, ename, sal, job,
      2         rank() over (partition by job order by sal desc) rank
      3    from emp;
         EMPNO ENAME             SAL JOB             RANK
          7902 FORD             3000 ANALYST            1
          7788 SCOTT            3000 ANALYST            1
          7934 MILLER           1300 CLERK              1
          7876 ADAMS            1100 CLERK              2
          7900 JAMES             950 CLERK              3
          7369 SMITH             800 CLERK              4
          7566 JONES            2975 MANAGER            1
          7698 BLAKE            2850 MANAGER            2
          7782 CLARK            2450 MANAGER            3
          7839 KING             5000 PRESIDENT          1
          7499 ALLEN            1600 SALESMAN           1
         EMPNO ENAME             SAL JOB             RANK
          7844 TURNER           1500 SALESMAN           2
          7521 WARD             1250 SALESMAN           3
          7654 MARTIN           1250 SALESMAN           3
    14 rows selected.
    SQL> select e.empno, e.ename, e.sal, e.job
      2    from (select empno, ename, sal, job,
      3                 rank() over (partition by job order by sal desc) rank
      4            from emp) e
      5   where e.rank = 2;
         EMPNO ENAME             SAL JOB
          7876 ADAMS            1100 CLERK
          7698 BLAKE            2850 MANAGER
          7844 TURNER           1500 SALESMAN

  • Displaying Max/Min values with time for analog signals.

    I am sampling analog inputs. I simply want to display the max and min values with the time they occurred. This seems simple but I am new to LabView and can't find a Vi to do this.

    Here's the code. When you run the demo program, you'll see three traces: Green is the max so far, Red is the min so far, and White is the current signal value.
    As the input value cycles, you'll see the two limit values track its extremes. If you have any questions about how it works, just holler.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    min-max_plotter.vi ‏82 KB
    min-max_tester.vi ‏37 KB

  • Is there an easy way to make JSpinner wrap around at max/min values?

    I have several pages with a couple dozen JSpinners to set various values - mostly numeric, but some are not.
    I would like to make them wrap around when either the max or min values are reached.
    Is there an easy way to do this?
    I was hoping for something like an "enableWraparound" property, but I haven't found such an animal.
    I suspect I could add value change listeners to all the components and do it by brute force,
    but there are too many spinners scattered around to make that an option I would like to take.
    Any suggestions?
    Thanks.

    Ok, it looks like custom spinner models are the way to go.
    Hopefully, I can create a couple that are generic enough to meet my requirements without too much pain.
    It looks like the ones I have already created will be easy enough to modify.
    Thanks for the feedback.

  • Where do I find the SUM & MAX functions under update rule, TYPE: FORMULA

    Hi,
    If I am setting up an update routine
    TYPE: FORMULA
    where do I find the function SUM ?
    I need to take the sum of a particular key figure under certain condition with the statement:
    IF( <condition>, <result when true>, <result when false> )
    i.e.
    IF( field1 > field2, Sum of Field3, Sum of Field3 )
    I canu2019t seem to find the Sum function. I found +, -, / etc under Basic Functions. Even under all u201CAll functionsu201D, I only see u201Csummarizeu201D but not sum.
    --Also where do I find the MAX and MIN functions if I want to use them in FORMULAS?
    Thanks

    Hi......
    Its better you go for calculated keyfigure
    Check this link :
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/56853c08c7aa11e10000000a11405a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/13/e072abaddb574284d22361f0b824bf/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    It may help you......
    Regards,
    Debjani......
    Edited by: Debjani  Mukherjee on Sep 28, 2008 6:17 AM
    Edited by: Debjani  Mukherjee on Sep 28, 2008 6:23 AM

  • Max & min value date wise

    I have Table test with columns
    name     value     values_date
    A     40     01/08/2010
    A     10     02/08/2010
    A     10     03/08/2010
    A     10     04/08/2010
    A     20     03/08/2010
    A     50     02/08/2010
    A     50     03/08/2010
    A     50     04/08/2010
    B     100     01/08/2010
    B     10     02/08/2010
    B     20     03/08/2010
    B     10     01/08/2010
    B     100     11/08/2010
    B     100     12/08/2010
    B     100     13/08/2010
    insert into test values('A','40','1/8/2010');
    insert into test values('A','10','2/8/2010');
    insert into test values('A','10','3/8/2010');
    insert into test values('A','10','4/8/2010');
    insert into test values('A','20','3/8/2010');
    insert into test values('A','50','2/8/2010');
    insert into test values('A','50','3/8/2010');
    insert into test values('A','50','4/8/2010');
    insert into test values('B','100','1/8/2010');
    insert into test values('B','10','2/8/2010');
    insert into test values('B','20','3/8/2010');
    insert into test values('B','10','1/8/2010');
    insert into test values('B','100','11/8/2010');
    insert into test values('B','100','12/8/2010');
    insert into test values('B','100','13/08/2010');
    I want OP like
    name     min_value     min_value_date     max_value     max_value_date
    A     10          02/08/2010     50          04/08/2010     
    B     10          01/08/2010     100          13/08/2010

    Santosh.Minupurey wrote:
    Hi.....
    try dis,
    SQL> SELECT A.NAME,A.VALUE,MIN(A.V_DATE),B.VALUE,MAX(B.V_DATE)FROM TEST A,TEST B WHERE
    2  (A.NAME,A.VALUE) IN (SELECT NAME,MIN(VALUE) FROM TEST GROUP BY NAME) AND
    3  (A.NAME,B.VALUE) IN (SELECT NAME,MAX(VALUE) FROM TEST GROUP BY NAME) GROUP BY A.NAME,A.VALUE,B.VALUE;
    NAME            VALUE MIN(A.V_DATE)        VALUE MAX(B.V_DATE)
    A                  10 2/8/2010                50 4/8/2010
    B                  10 1/8/2010               100 13/08/2010Regards,
    Santosh.MinupureyHere is another way using the FIRST and LAST functions
    SQL>select name,
      2  min(value) min_value,
      3  min(v_date) keep (dense_rank first order by value) min_value_date,
      4  max(value) max_value,
      5  max(v_date) keep (dense_rank last order by value) max_value_date
      6  from test
      7  group by name;
    N        MIN_VALUE MIN_VALUE_D        MAX_VALUE MAX_VALUE_D
    A               10 02-AUG-2010               50 04-AUG-2010
    B               10 01-AUG-2010              100 13-AUG-2010For more info, check http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/analysis.htm#i1007059

  • Can't find the meaning of PRC_STAT_H value in BAPI_SALESORDER_GetStatus

    Hi All,
    Do have any idea where can i find the definition of the values for PRC_STAT_H in BAPI_SALESORDER_GetStatus? When I used the BAPI_SALESORDER_GetStatus it returned the PRC_STAT_H value of A but how do i know what "A" stands for or what are possible values i'll be getting in PRC_STAT_H?
    Thanks in advance.
    Regards,
    myra

    You can find documentation using transaction BAPI
    Field
    PRC_STAT_H
    Overall processing status of document
    Definition
    The processing status of the entire sales document.
    Use
    The system determines the status of the entire sales document by taking into account the status of all header-related information and the status of all individual items. The status message tells you whether processing of the sales document is open, in progress, or complete.

  • Max,min value

    Hi all
    create table temptable(MSISDN int,topupvalue float,topupdate date)I want to fetch msisdn,max(topupvalue),topupdate,min(topupvalue),topupdate from temptable
    insert into temptable values (13212324,12.00,'11-JAN-2012');
    insert into temptable values (13212324,5.00,'10-JAN-2012');
    insert into temptable values (13212324,6.00,'8-JAN-2012');
    insert into temptable values (13212324,7.00,'1-JAN-2012');
    insert into temptable values (13212324,1.00,'16-JAN-2012');
    insert into temptable values (13212325,11.00,'11-JAN-2012');
    insert into temptable values (13212325,35.00,'10-JAN-2012');
    insert into temptable values (13212325,56.00,'8-JAN-2012');
    insert into temptable values (13212325,77.00,'1-JAN-2012');
    insert into temptable values (13212325,81.00,'16-JAN-2012');I want to get msisdn it's max topup value and corresponding topupdate ,min topup value and it's corresponding topupdate

    try this [not tested]
    select
         msisdn,
         max(max_topupvalue) max_topupvalue,
         max(max_topupvalue) max_topupvalue,
         max(min_topupvalue) min_topupvalue,
         max(min_topupdate) min_topupdate
    from
         select
              msisdn,
              maxtv max_topupvalue,
              case when topupvalue=maxtv then topupdate else null end max_topupdate,
              mintv min_topupvalue,
              case when topupvalue=mintv then topupdate else null end min_topupdate
         from
              select
                   msisdn,
                   topupvalue,
                   max(topupvalue) over (partition by msisdn) maxtv,
                   topupdate,
                   min(topupvalue) over (partition by msisdn) mintv
              from
                   temptable
    group by msisdn

Maybe you are looking for

  • How do I transfer my Firefox environment to a new image?

    I losT my ability to run my Windows XP Firefox on disk A. I have Created another one on disk B. I want to have the same Firefox setup on disk B. I can get to the files and data on disk A but can't run it. Is it possible to either figure out what add-

  • Why is the podcast menu missing!?!?!?!?!?!?!?

    I have an ipod second generation and the menu for podcasts is completely missing from the ipod itself. My software version is 1.1.1. What is wrong?!?!?!?!?!?!?

  • Check Connection of Communication Arrangement for SAP ERP Financials Using IDoc Failed

    Dear experts, We are checking outbound connection from C4TE to ERP in Communication Arrangement for SAP ERP Financials Using IDoc Failed. We get the attached error message: Checking connection failed Error accessing service; Service Ping ERROR: Forbi

  • Is there any standard way or testing utility for EJB fail safe in cluster env

              Hi           I got to test the beans for complete fail safe like home           fail overing and method calls (idempodentcy) fail over, is there           any testing utility or standard approach for this or I got to do           it manuall

  • Passing event target name to text field

    Hi There, I'm new to 3.0 and can use some help here... should be an easy one for you experts... I just need to pass an event target name to a text field: square.addEventListener(MouseEvent.MOUSE_DOWN,downObj); function downObj(event:MouseEvent){ targ