Max value for a varaible

Hi ,
  I have a program with a variable used to store percentage , so let us assume ithas length 6 with 2 decimal places .
What i would like to know is there some command or a FM which can give me the max value that can be stored in this varaible .  I do not want to write to much code or hardcode the value in the program .
Regards
Arun

Hi Arun,
Yo can use the FM 'MAXIMAL_VALUE_GET' for this.
Eg: Here I wanto calculate the max value for variable 'max'
DATA: max(5) TYPE p DECIMALS 3.
CALL FUNCTION 'MAXIMAL_VALUE_GET'
     IMPORTING
          e_value = max.
WRITE: / max.
o/p: 999999,999
Hope this helps you.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 15, 2009 1:11 PM

Similar Messages

  • How to set physical min/max values for a scale in xy graph?

    Hello,
    I have troubles with the way LabView handles physical units in xy graphs. In particular, I use a time scale for the x axis.
    The values are timestamps and have the unit [s]. Now I want to read write the min max values for this scale via
    property nodes. It seems that the properties for min max do not support the use of the unit I use for the data for
    that same axis. This is very inconvenient and I am not even sure which kind of data to use at all for this properties.
    Is it simply converting to/from [s] using the unit converter?
    (I am using LabView 7.1 for the programm in question).
    Thanks,
    Olaf

    Hi Olaf
    "It seems that the properties for min max do not support the use of the unit I use for the data for that same axis."  
    What are the units you are using? can you make it a littlebit clear.
    You can change the units also using Property node.
    Just check the attachment once. If that is what you are looking for, then the problem is solved.
    Regards
    Anil
    Message Edited by reddy on 05-23-2006 05:25 AM
    Message Edited by reddy on 05-23-2006 05:27 AM
    Attachments:
    X-Scale.jpg ‏8 KB

  • Max.value for a sales order

    Hi Gurus,
    A min.order value can be maintained in Sales order by the condition type AMIW but can any one tell how to maintain max.value for a sales order???
    Awaiting your early answers..........
    Sunanda.P

    hi
    in OVA8, there maintain the maximum document value as required.
    If not then you need to take help of ABAPer
    With the help of ABAper you need to prepare a logic for this maximum order value.
    Then Go to sales order user exit userexit_save_document_prepare there u insert logic with the help of abaper.
    Based on logic created by ABAPer, while saving the sales order it will check this logic and throw out the error if it exceeds max value
    Regards
    Edited by: WISH on Aug 4, 2008 6:19 AM

  • Max value for a TIMESTAMP column?

    What is the max value for a TIMESTAMP column?
    I'm using the ODP.NET provider 9.2.0.4. When i put C#'s DateTime.MaxValue (i.e. 12/31/9999 23:59:59,999) into a TIMESTAMP column, everything is ok. Retrieving this value (e.g. via SQL*Plus Worksheet) returns ora-01877 (string too long for internal buffer).
    Any ideas?
    Regards,
    Daniel

    Maybe you hit Bug 1782816 Select of TIMESTAMP gives ORA-1877 on some platforms
    Product (Component)                      : SQL*Plus (SQL*Plus)
    Range of versions believed to be affected: Versions >= 9.0 but < 9.2 
    Versions confirmed as being affected     : 9.0.1.3
    Platforms affected                       : Generic (all / most platforms affected)

  • How to take max value for this senario

    Hi,
    i have table xyz in which i have column display_code
    for eg.
    display_code in table like
    1. '1100000-999'
    2. '1100000-1000'
    3. '1100000-1001'
    now i have to take max value among 3 display code. my requirement when i take max it will give me '1100000-1001' or the next value
    select max(display_code) from xyz table;
    max(display_code)
    '1100000-999'
    Please help me to fetch max(display_code) = '1100000-1001'
    thanks & regard
    shyam~

    SQL> with xyz as (
      2  select '1100000-999' display_code from dual union
      3  select '1100000-1000' from dual union
      4  select '1100000-1001' from dual
      5  )
      6  --
      7  -- actual query:
      8  --
      9  select display_code
    10  from   xyz
    11  where  to_number(substr(display_code, instr(display_code, '-')+1)) =  ( select max(to_number(substr(display_code, instr(display_code, '-')+1)))
    12                                                                          from   xyz
    13                                                                        );
    DISPLAY_CODE
    1100000-1001or
    SQL> with xyz as (
      2  select '1100000-999' display_code from dual union
      3  select '1100000-1000' from dual union
      4  select '1100000-1001' from dual
      5  )
      6  --
      7  -- actual query
      8  --
      9  select display_code
    10  from   xyz
    11  where  to_number(replace(display_code, '-')) = ( select max(to_number(replace(display_code, '-')))
    12                                                                          from   xyz
    13                                                                        );
    DISPLAY_CODE
    1100000-1001Edited by: hoek on Sep 7, 2010 5:20 PM

  • The max value for a key in an ODS

    hi,
    i want to link 2 ODS (Historic PRICE and PRICE)
    the key fields in Historic price ODS are : "material", "vendor" , and a field name "AVN"
    I want to create a start routine in order to find the data with the maximum value for the field "AVN" among data with the same key "material, vendor"
    Once this value found, i want to send it in the ODS : "PRIX"
    But how can i do it ?
    should i sort the ODS table ? what is the Abap fonction ?
    Than you very much for your help.
    Jacques

    Hi,
    seems that you need an extraction via self defined function-module.
    Within the FM, you can determine the max value like this:
    DATA: itab_ods_hist type standard table of /BIC/A<ODS HISTORIC PRICE>00 with header line.
    SELECT * FROM /BIC/A<ODS HISTORIC PRICE>00 INTO CORRESPONDING FIELDS OF TABLE itab_ods_hist
    SORT itab_ods_hist descending by material vendor AVN.
    DELETE ADJACENT DUPLICATES FORM itab_ods_hist COMPARING material vendor.
    This will give you only the max values within the itab.
    now hand this over.
    Example for a function module for extraction can be found in the R/3 source system.
    hth
    cheers
    sven

  • Sun One Web Server 6.1 max value for ChunkedRequestBufferSize

    Hi,
    I was wondering if there was a maximum value for ChunkedRequestBufferSize.
    I have an application that is sending chunked data to the server and I don't really know what the size of the chunks will be.
    I'd like to set a max.
    I know the default is 8K.
    Just wondering if there is a value. Though common sense would tell me it would depend on the heap size :).
    Thanks for your help

    Yes, the buffer is allocated from the heap. It must be less than 2GB and small enough to fit on the heap.

  • Query to get row with max values for distinct

    I have a table test with ID, ADID, MTMST columns.
    ID     ----ADID----     MTMST
    1     ----100----     24-MAR-12 08.17.09.000000 PM
    1     ----101----     24-MAR-12 08.18.15.000000 PM
    1     ----102----     24-MAR-12 08.18.56.000000 PM
    2     ----103----     24-MAR-12 08.19.21.000000 PM
    2     ----104----     24-MAR-12 08.19.36.000000 PM
    2     ----105----     24-MAR-12 08.19.46.000000 PM
    3     ----99----      22-MAR-12 09.48.22.000000 PM
    I need the rows with max ADID for each ID.
    I used the following query but it provided max ADID of the table but not the distinct ID
    select * from test where ADID in (select max(ADID) from test where id in (select distinct(id) from test where mtmst > sysdate -1))
    Result:*
    ID     ----ADID----     MTMST
    2     ----105----     24-MAR-12 08.19.46.000000 PM
    Expected result:*
    ID     ----ADID----     MTMST
    1     ----102----     24-MAR-12 08.18.56.000000 PM
    2     ----105----     24-MAR-12 08.19.46.000000 PM
    Thanks,
    Dheepan
    Edited by: Dheepan on Mar 24, 2012 9:53 AM

    select id, adid, mtmst from test where (id, adid) in (select id, max(adid) from test group by id) and MTMST>sysdate-1
    is the answer.

  • ADD ROW in tabular form with new max value for a certain field

    All,
    I have a tabular form with an 'ADD ROW'-button.
    When a row is added the field 'TemplateID' should get
    automatically a new value which is MAX from TEMPLATEID + 1.
    I would be very glad, if someone has a hint for me.
    Thanks in advance,
    lucio

    Hi
    the cause of not seeing the 'Default Item Field' is,
    that during creation of a 'Tabular Form' the column with the
    primary key doesn't get that feature, why so ever.
    I still hope that someone could give me a hint why that code isn't working:
    function SetNewID(vDBID)
    v_check = $v('P20_MAX_TEMPLATEID');
    pNd = $u_Carray(vDBID);
         for(var i=0;i<pNd.length;i++){
              var node = $x(pNd);
              node = $x_Check_For_Compound(pNd[i])
              var lTr = $x_UpTill(node,'TR');
    updateRow = lTr.rowIndex - 1;
    document.wwv_flow.f02[updateRow].value=$v(v_check)
    Many thanks in advance
    lucio                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Just need the record from the right (many) table with the max value for the Record on the left (one) side table

    SELECT
      ADHOC.ATS_ESH.Entry_Num
      ,ADHOC.ATS_ESH.Importer
      ,ADHOC.ATS_ESH.Version AS [ATS_ESH Version]
      ,ADHOC.ATS_ESL.Version AS [ATS_ESL Version]
    FROM
      ADHOC.ATS_ESH
      INNER JOIN ADHOC.ATS_ESL
        ON ADHOC.ATS_ESH.Customs_Entry_Num = ADHOC.ATS_ESL.Customs_Entry_Num
    I just need to see the MAXIMUM version number in the ESL table for each Entry_Num in the ESH table. ESH is the one side, ESL is the MANY side.

    Do you understand what this query is doing? Did you check the blogs I pointed you to?
    The query I provided gets the latest ESL version for each custom number. So, if max ESL version is higher than ESH version, it's just a coincidence. If you only want to see rows where versions do not match, just add an extra where condition, e.g.
    SELECT * FROM cte WHERE Rn = 1
    AND  [ATS_ESH
    Version] <>  [ATS_ESL
    Version]
    BTW, what is the type of these version
    columns and what kind of data in them? If they are character columns, sorting them in DESC order will not necessary return the latest version. Can you show some samples of the data in these two columns?
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • What is Max value for Width,Height  in "formsweb.cfg" to show full Form

    Hi,
    I have even changed the SeperateScreen=true and also the width & height parameter in formsweb.cfg but it makes no difference expect showing form now in a seperate window.
    Plz help!
    Many thanks!

    it doesn't need to change SeprateFrame parameter !
    i just set these parameters
    Width=750
    Height=420
    it's approximately the size of browser in 800*600 screen size !

  • Find Index for max value of array

    I can use arrayMax to get the max value for a small array, but I need to get which index the max value is located. That will determine which page the user goes to next. Here is my code:
    array:
    <cfset arrAverages[1]="#qryFairness.fairness#"/>
    <cfset arrAverages[2]="#qryHonesty.honesty#"/>
    <cfset arrAverages[3]="#qryCompassion.compassion#"/>
    <cfset arrAverages[4]="#qrySelfControl.SelfControl#"/>
    <cfset arrAverages[5]="#qryMoralConcern.MoralConcern#"/>
    These values are gathered from querying values stored in a table.
    I can get the max value in the array easily by:
    <cfdump var="#arrayMax(arrAverages)#">
    What I can't figure out is how to get the row in this array where that max value is located. It seems like it would be so simple, but nothing I have tried has worked.
    Thanks,
    Richard

    rking1966 wrote:
    I can use arrayMax to get the max value for a small array, but I need to get which index the max value is located. That will determine which page the user goes to next. Here is my code:
    array:
    <cfset arrAverages[1]="#qryFairness.fairness#"/>
    <cfset arrAverages[2]="#qryHonesty.honesty#"/>
    <cfset arrAverages[3]="#qryCompassion.compassion#"/>
    <cfset arrAverages[4]="#qrySelfControl.SelfControl#"/>
    <cfset arrAverages[5]="#qryMoralConcern.MoralConcern#"/>
    These values are gathered from querying values stored in a table.
    I can get the max value in the array easily by:
    <cfdump var="#arrayMax(arrAverages)#">
    What I can't figure out is how to get the row in this array where that max value is located. It seems like it would be so simple, but nothing I have tried has worked.
    You can find it in one line of code! Here is an example:
    <cfset testArr[1]=-183>
    <cfset testArr[2]=79>
    <cfset testArr[3]=6>
    Max.:  <cfoutput>#arraymax(testArr)#</cfoutput><br>
    Index of max.: <cfoutput>#arrayfindNocase(testArr, arraymax(testArr))#</cfoutput>

  • Open cursor exceeds max value

    Hi,
    i am running 10.2.0.1.0 and the max value for open_cursor is set to 300.
    Earlier my developers were getting ORA-01000 errors. However when i checked again after two days i see the number is 1605 which is way higher than the max value. Why don't I see any errors now?
    Does anyone know??
    Thanks.
    Shawn

    SQL> SELECT COUNT(*) FROM v$open_cursor;
    COUNT(*)
    1522
    and i ran this to check each SID and the number of session which is giving me a better output and like you said the max value is based on per session.
    SELECT SUBSTR(a.SID,1,10) SID,
    SUBSTR(NVL(b.program,machine),1,30) program,
    COUNT(*)
    FROM v$open_cursor a, v$session b
    WHERE a.saddr=b.saddr
    GROUP BY SUBSTR(a.SID,1,10),
    SUBSTR(NVL(b.program,machine),1,30)
    ORDER BY 3 DESC
    Thanks for the help.

  • Login/min_password_lng max value

    Having recently set the below values we are experiencing problems when users place digits or specials at positions above 8. It appears that SAP does not check above character 8. Not at password change nor at login to SAP.
    Profile Parameters Attributes for login/min_password_lng tells that minimum value is 3 and maximum value is 8. Does this really mean that anything above 8 is ignored?
    This is quite a usability issue.
    login/min_password_lng = 8
    login/min_password_digits = 1
    login/min_password_letters =1
    login/min_password_specials = 1

    >
    Vito Fava wrote:
    > Profile Parameters Attributes for login/min_password_lng tells that minimum value is 3 and maximum value is 8. Does this really mean that anything above 8 is ignored?
    Hi Vito,
    no.
    This parameter sets only the minimum password length. It has no influence on the verification of input values after the 8th character.
    From 7.00 on, the password can be longer than 8 characters. So up to 6.40 the maximum value of this parameter is 8, as the password cannot be longer. From 7.00 on, the max-value for this parameter is 40.
    If you are on 7.00 and any input after the 8th character is ignored when logging on, you have set the parameter login/password_downwards_compatibility accordingly to 3,4,or 5 (5 is the most common).
    b.rgds, Bernhard

  • Need sum on all coulumns except for one coulumn needs max value

    Hi Gurus,
    I have a requirement like:
    Say I have 3 columns like C1,c2,c3.
    On day1 the record values are 100,150,200
    On day2 the record values are 100,150,300
    End result ..for column C1 and C 2 I should get sum of them
    so the result for C1 as per the above values: 200
    c2=300
    But for C3 column, I should get only maximum value..like 300 (not sum)...
    Using case statement by setting a flag on max report date.. we can do this ..Is there any other that this can be achieved. (In ETL or RPD or Front end)
    Thanks.

    For C3 column instead of showing all values like 200, 300 just show max value only so that you can get output as below and when you sum the value remain 300. Try it out. It can be in rpd or in the report.
    On day1 the record values are 100,150,300
    On day2 the record values are 100,150,300
    mark if make sense
    Thanks

Maybe you are looking for

  • Mini Display to HDMI not working

    I currently have iMac connected to toshiba tv through minidisplay adapter to hdmi. We can't seem to get it to recognize that the tv is hooked up, we've tried unplugging and replugging turning each device off and on in different combinations. here's w

  • Create a subsequent Goods Movement for a transfer posting

    Hi Team, I have a scenario where the users will create a Good Movement document for transfer posting. The Stock of Material "A" is transferred to stock of Material "B" using the movement types 561 etc. Now the quantity is reduced from unrestricted st

  • Sales order Tracking

    HEllo Experts I require help for following situation. My scenario is SOURCE ODS1: <b>ZMB_CR.</b> Objects: <b>1.ZQUALITY</b> (Its an indicator that consists of "S" and "X". <b>2. ZTRPOST</b> (Its an indicator that consists of "S" and "X"). Target ODS:

  • Lumia 1020 doesn't focus up close (macro)

    According to the specs, the Lumia 1020 should be able to auto-focus as close as 15cm. However, my phone consistently has trouble focusing that close. Typically, if the subject is between 15cm and 25cm away and I hold down the shutter half-way to focu

  • Total ink weight for fabrics or suggested color profile.

    My client's approved their project and I now have some tradeshow pop-up panels to "convert to CMYK" that will be printed on [some stretchy unknown] fabric. I was wondering if anyone knows the total ink weight for the [stretchy] textiles used for trad