Always round up to nearest whole in APO DP

Hi
there is a requirement to always round up data to nearest whole number. number should be always rounded above and not rounded down.
Example a value of 0.07 should be rounded to 1
a value of 1.25 should be rounded to 2
a value of 1.75 should be rounded to 2
a value of 1.07 should be rounded to 2
and so on
Is there a way i can achieve in APO DP by some settings/paramater/config/macro/exit etc etc - i am on SCM 7.0
Thanks,
TJ

Tejinder
Try using the CEIL() function in a macro.
Rishi Menon

Similar Messages

  • Rounding off to nearest whole number without condition

    hi,
    i want to round a real number to an integer value,,wihout any conditions like
    10.01 should be 11
    10.1 should be 11 and like that
    is it posible to do it?
    thanks in advance.
    amit

    It doesn't look like you are trying to round to the nearest whole number here. It looks like you are trying to find the smallest integer value that is greater than or equal to the real number. If so, you would want to use the CEIL function (i.e.
      1  SELECT CEIL(10.01)
      2*   FROM dual
    SCOTT @ hp92 Local> /
    CEIL(10.01)
             11Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Rounding up to nearest whole number question

    I have a calculation script that sometimes returns a decimal result. How would I create a script that would round that decimal up to the next whole number? Anyone have any idea's?

    okay, I am not very good with this. That command is new to me. Where would I place that script if I already have a javascript script in the calculate event of that numeric field I am trying to get rounded up?
    I basically have the javascript code in the numeric fields calculate event set to
    this.rawValue = subform1.numericField1.rawValue;
    I tried putting your script on the change event hoping I could use formCalc there but get a error when testing saying Ceil is not defined. Thanks

  • Formula rounding to nearest whole number

    Hello,
    I have created the following formula ( Metrics."# of Leads Resulting in Won Opportunity"*100 /Metrics."# of Leads" ) and displayed the results in percentage but it looks to round to the nearest whole number does anyone know why this might happen. Also i am using 2dp in the results i am hoping to get the actual result rounded to 2dp and not the nearest whole number.

    Hi !
    I think that if you add the ROUND function, this will work... :
    ROUND(Metrics."# of Leads Resulting in Won Opportunity"*100 /Metrics."# of Leads", 2)
    Hope this will help, feel free to ask more !
    Max

  • Rounding of Qty to the nearest whole no in PO

    Hi All,
    We have material whose base unit of measure is say centimetres. and it has purchase unit as metres.
    Our requirment for procurement is generated through MRP run which creates the Purchase requistion and in PR the UOM considered is the base unit of measure  ie centimetres.
    When this Purchase req is converted to Purchase Orders we get qty sometimes in decimals  for ex: if in Pur req the qty is 150 centimetres , in PO it is shown as 1.5 metres.
    Is there a way for rounding of 1.5 to 2.0 metres in PO (means to the nearest whole no) automatically.
    Thanks,
    Vengal

    in MRP view of material master you have two fields to care about rounding. rounding profile and rounding value
    http://help.sap.com/saphelp_46c/helpdata/en/f4/7d28c844af11d182b40000e829fbfe/content.htm

  • Rounding text size to nearest whole number?

    I've had to rescale some artwork, but now I'm left with type sizes that are 71.68px tall, 34.51px tall, etc.
    Is there a script that'll snap all the text in a document to it's nearest whole number or 0.1 decimal?

    // rounds the size of text in all textFrames in your document
    var aTFrame = app.activeDocument.textFrames;
    for ( i = 0; i < aTFrame.length; i++ )
    var fractionSize = aTFrame[i].textRange.characterAttributes.size;
    var RoundedSize = Math.round(fractionSize);
    aTFrame[i].textRange.characterAttributes.size = RoundedSize;
    redraw();
    This will do all the text frames. Copy the above, paste it into a text editor or the Adobe ESTK (ExtendScript Tool Kit) and save as a plain text file with a .jsx extension. Place it into Applications/Adobe Illustrator CSX/Presets/en_US/Scripts folder and restart AI. Run it by having a document open in AI and call it from File>Scripts>scriptname.

  • Rounding time to nearest hourly quarter

    I have several records like
    2/19/2010 1:25:46.000000 PM
    2/19/2010 1:40:46.000000 PM
    2/19/2010 1:55:46.000000 PM
    2/19/2010 2:10:46.000000 PM
    I want to round them off to the nearest quarter like
    2/19/2010 1:30:00.000000 PM
    2/19/2010 1:45:00.000000 PM
    2/19/2010 2:00:00.000000 PM
    2/19/2010 2:15:00.000000 PM
    Any ideas how I would do that? a trunc(col,'mi) only lets me round it to the minute..
    Note that records are not necessarily in the 5 minute interval difference it can also be 7 minute difference or 4 minute difference from the nearest quarter...
    so I can also have records like
    SysUpTime     2/19/2010 10:31:00 PM
    SysUpTime     2/19/2010 10:57:00 PM
    SysUpTime     2/19/2010 11:31:00 PM
    etc.
    Edited by: zebango on Mar 9, 2010 4:16 PM

    Solomon Yakobson wrote:
    But OP asked for "*Rounding* time to nearest hourly quarter". Same applies to Aketi's solution which, BTW, which always bumps it up to next 5 min.In which case, just substitute "Round" for "Floor"!
    Although thinking about it, you'd probably want to add seconds into the mix:
    with table_x as (select to_timestamp('11/03/2010 11:45:39', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 11:52:29', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 11:52:30', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 11:52:31', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 12:00:01', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 12:07:29', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 12:07:31', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 13:22:10', 'dd/mm/yyyy hh24:mi:ss') t from dual union all
                     select to_timestamp('11/03/2010 13:22:40', 'dd/mm/yyyy hh24:mi:ss') t from dual)
    select t,
           trunc(t, 'hh') + ROUND((to_char(t, 'mi') + (to_char(t, 'ss')/60))/15)*15/1440 nearest_15_min
    from   table_x
    T                                NEAREST_15_MIN      
    11/03/2010 11:45:39.000000       11/03/2010 11:45:00 
    11/03/2010 11:52:29.000000       11/03/2010 11:45:00 
    11/03/2010 11:52:30.000000       11/03/2010 12:00:00 
    11/03/2010 11:52:31.000000       11/03/2010 12:00:00 
    11/03/2010 12:00:01.000000       11/03/2010 12:00:00 
    11/03/2010 12:07:29.000000       11/03/2010 12:00:00 
    11/03/2010 12:07:31.000000       11/03/2010 12:15:00 
    11/03/2010 13:22:10.000000       11/03/2010 13:15:00 
    11/03/2010 13:22:40.000000       11/03/2010 13:30:00 

  • Rounding minutes to nearest five.

    Hi,
    I have tried the various methods suggested on other forum messages but to no avail.
    I have a GUI that acts as the client for a reminder system i am making for some coursework.
    It contains a combo box with values for the user to select a time from, however the time is not displayed in the format i would like it to be.
    I would like the current time from the instance of calendar i have created to be rounded to the nearest five up.
    The code i have for the combo box at the moment is:
         cal.set(cal.MINUTE, (int)Math.round((double)cal.MINUTE));
              n=0;
              int z = 0;
              while(z<288)
                   cal.add( cal.MINUTE, n);
                   s = DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.getTime());
                   time_cb.addItem(s);
                   n=5;
                   z++;
    This code always sets the first value of the combo box to 10 minutes past the hour and increments it by five from there. This happened with all the other methods i tried from the other forums also.
    I would like it to round to the nearest five the current time and increment by five from this time.
    Thanks for your time and help.

    Hi,
    I have tried the various methods suggested on other
    forum messages but to no avail.
    I have a GUI that acts as the client for a reminder
    system i am making for some coursework.
    It contains a combo box with values for the user to
    select a time from, however the time is not displayed
    in the format i would like it to be.
    I would like the current time from the instance of
    calendar i have created to be rounded to the nearest
    five up.
    The code i have for the combo box at the moment is:
    Your first line is wrong. Your setting the calendar minutes field to
    some random value, cal.MINUTE, which has nothing to do with the current minute. You need to do
    Calendar c = new GregorianCalendar()
    which automatically sets the current minute
    cal.set(cal.MINUTE,
    (int)Math.round((double)cal.MINUTE));
              n=0;
              int z = 0;
              while(z<288)
                   cal.add( cal.MINUTE, n);
    s =
    =
    DateFormat.getTimeInstance(DateFormat.SHORT).format(ca
    .getTime());
                   time_cb.addItem(s);
                   n=5;
                   z++;
    This code always sets the first value of the combo box
    to 10 minutes past the hour and increments it by five
    from there. This happened with all the other methods i
    tried from the other forums also.
    I would like it to round to the nearest five the
    current time and increment by five from this time.
    Thanks for your time and help.

  • Always Round Up

    I am trying to find a way to always round up to the next whole number. For example if I have 2.08 I need it to return 3. If I try this SELECT ROUND(2.08) FROM DUAL; it rounds to 2. I am using Oracle 11g. Any help would be appreciated. Thank you.

    Hi,
    sb92075 wrote:
    add 0.5 before applying ROUND() function
    Please do no use that!
    with t as
        (select 2.08 num  from dual union all
         select 2.00 num  from dual
    select
      num
      ,CEIL(NUM)          CEIL_NUM
      ,ROUND(NUM + 0.5)   ROUND_NUM
    FROM
      T
    NUM  CEIL_NUM ROUND_NUM
    2.08         3         3
       2         2         3 Regards,
    Peter

  • Rounding Time to nearest 30 minutes

    Good day,
    I'm looking for a way to round the time portion of a date value. My query needs to return the time of day, rounded to the nearest 30 minutes - top of the hour or bottom of the hour.
    If sysdate is: 12/28/2009 11:08:19 AM
    I need to see: 12/28/2009 11:00:00 AM
    If sysdate returns: 12/28/2009 11:18:19 AM
    I need to see: 12/28/2009 11:30:00 AM
    Any help is appreciated.
    Regards,
    Gary F.

    Aketi Jyuuzou wrote:
    I like case expression B-)Me too, but I like then simple B-) :
    with dates as ( -- generating sample data
    select to_date('12/28/2009 11:08:19', 'mm/dd/yyyy hh:mi:ss') dt from dual union all
    select to_date('12/28/2009 11:18:19', 'mm/dd/yyyy hh:mi:ss') dt from dual union all
    select to_date('12/28/2009 11:38:19', 'mm/dd/yyyy hh:mi:ss') dt from dual union all
    select to_date('12/28/2009 11:48:19', 'mm/dd/yyyy hh:mi:ss') from dual)
    select dt,
    case when to_char(dt,'mi') >= '45'
         then trunc(dt,'hh') + interVal '60' minute
         when to_char(dt,'mi') >= '15'
         then trunc(dt,'hh') + interVal '30' minute
         else trunc(dt,'hh')
         end as new
      from dates
    DT                  NEW
    2009-12-28 11:08:19 2009-12-28 11:00:00
    2009-12-28 11:18:19 2009-12-28 11:30:00
    2009-12-28 11:38:19 2009-12-28 11:30:00
    2009-12-28 11:48:19 2009-12-28 12:00:00
    SQL> SY.

  • Datepiker rounding seconds to nearest minute in presentation?

    Hi all,
    I have a presentation with a display-only, non-editable datepiker, that references an object variable of type Time.
    The variable contains a full timestamp with date and time down to microseconds; however when the time gets displayed in my presentation, the seconds are always rounded to 00.
    Has anyone encountered this or know how to deal with it?
    Thanks!
    B

    Hi all,
    I have a presentation with a display-only, non-editable datepiker, that references an object variable of type Time.
    The variable contains a full timestamp with date and time down to microseconds; however when the time gets displayed in my presentation, the seconds are always rounded to 00.
    Has anyone encountered this or know how to deal with it?
    Thanks!
    B

  • Always round up or down

    Hallo,
    I´m looking for a function in DIAdem to always round up or down. I build myself some but they are old and slow... and they also work only almost perfect, some cases Just wont work right.
    The aim is to round figures to 1/100, 5/100, 1/10, 5/10, to numbers, X mod 5 = 0, to x mod 10 = 0, to x mod 50 = 0 and so on.
    I want to use it for scalling Report-Diagramms automatically, but with fixed and round scales - also for same scales of one meassurement in different Messures.
    Therefor i need the funktion to Round Up always or in Minus Round down always.
    If someone has a nice Solution for it i would be very thankfull.
    Thanks already for ur surport.
    STG

    I'm not sure I fully understand the question, but hopefully this helps:
    Frac = Return decimal portion of a number
    Trunc = Return Integer portion of a number
    intMyResult = Frac(Pi)    'intMyResult = 0.14159265358979
    intMyResult = Trunc(-75.5109) 'intMyResult = -75
    So a combination of these could give you:
    Always Round Up:
      If Frac(Val) > 0 then MyResult = Trunc(Val) + 1
    Example:
      Var =Pi
      If Frac(Var) > 0 then
        MyResult = Trunc(Var) + 1
      Else
        MyResult = Var '4
      end if
    Always Round Down:
      MyResult = Trunc(Val)
    Example:
      Var =Pi
      MyResult =Trunc(Var) '3
    You can also combine this with multiplying&dividing by 10/100/1000 to round to specific numbers of decimal places
    Example:
      Var =10.12345
      Var = Var *100
      Var =Trunc(Var)
      Var = Var /100
      MyResult = Var  '10.12
    -Josh
    Engineering Technician
    John Deere Power Systems

  • I love osx mountain lion my question is why was air play taken out of specific app like quick time and iTunes i dont always want to display my whole computer when i am in airplay mode

    i love osx mountain lion my question is why was air play taken out of specific app like quick time and iTunes i dont always want to display my whole computer when i am in airplay mode

    Funny, my iTunes still has AirPlay capability without AirPlay Mirroring active.

  • JMOD condition type value should be always rounded up instead of commercial

    Hi Helpers,
    I need one clarification from you all based on your expertise,
    1. JMOD condition type value should be always rounded up instead of commercial.
    2. i have been already made rounding up in the condition type JMOD in the transaction V/06. but unfortunatly not working.
    3. after that we found that there is configuration change in spro (company code setting in the indai taxation-CIN) in the Logistic general> tax on goods movement>india> basic setting> company code setting for the commercialrounding, but the same is  already ennabled with SD rounding IND.
    Need your expertise on this.How shall we make it round up always for JMOD condition value. below is an example for your further analysis.
    Example: if values UTXJ is : 8,913.40 and JMOD will be calculated based on UTXJ as 10% thats is 891.34.
    Actually this should be 892 as per the requiremen.t

    I just recently rolled off a project in Europe that had an issue similar to this.  We were having rounding issues as a result of %  discounts. 
    However, we did come up with a solution that is provided by SAP. 
    Please review OSS note 80183 on SAP rounding and the solutions provided within the note.
    I hope this helps.
    Kind Regards,
    Jason

  • Rounding - Always Round Up

    Hi All,
    Is there a way in T-SQL using the round command to always round up regadless of the value.
    For example:ROUND(normal_hours * pay_rate * 52, - 3) AS Expr3
    normal_hours = 36
    pay rate = 23.64
    weeks in year = 52
    (36 * 23.64) * 52 = 44,254.08
    It rounds to 44,000. I want 45,000.  Is this possible. Am I overlooking the obvious?
    Thanks in Advance and Happy Holidays!!!!!!!!Adam

    USE CoreDB
    GO
    --================================================================================
    --Name:  TIM SMOLKA
    --Date:  2014.08.05
    --Description:  Round factional pennies
    --================================================================================
    CREATE FUNCTION FN_ROUND_UP_PENNY
    @AMOUNT DECIMAL(18,6)
    RETURNS DECIMAL(18,2)
    AS
    --DECLARE @AMOUNT DECIMAL(18,6) = 1560891.00015445 
    BEGIN
    DECLARE @RV DECIMAL(18,2)
    DECLARE @FACTOR INT = 100
    DECLARE @TMP DECIMAL(18,6) = (@AMOUNT * @FACTOR)
    SELECT @RV = CEILING(@TMP) / @FACTOR
    --SELECT @RV
    RETURN @RV
    END

Maybe you are looking for

  • How do I initialize Ultrabeat? - i want to build my own kit from a sam...

    Hello everyone, i've done this before!, but now i can't remember how. i want to first initialize UltraBeat and then hopefully, just drag and drop .wav samples into UB to create a new kit. I hope it's as easy to do this as it is in the EXS sampler. Al

  • Access Databases LMS 4.2 with jython script ( Integration with HP uCMDB )

    Questions / Integration Adapter Cisco Prime. There is an integration adapter for HP uCMDB to get CI information from Cisco Works (Prime whatever ….). We set up a user for CW according to “Open Database Schema Support in Cisco Prime LAN Management Sol

  • JavaScript in a Template

    Hello, I have created a FORM based on a table and have embedded JS in a template. I have used the onLoad event and also a JS user defined function in the template. It works fine when the FORM is on a page accessing the template but if exposed as a Po

  • BC4J Application Pool Question

    Hi, I have created a Application Pool using PoolMgr.getInstance().createPool(poolname, appModName,connectString,env); Now the question is, if the connectString is invalid, even then it creates a pool. Is there a way where i can check the validity of

  • GRC-PC & Multiple Compliance Framework (MCF)

    Hi There, We have set up 2 regulations for our first go live.  We had defined the 2 regulations for a specific rationale back in time but now we have realised that we do not need 2 regulation and 1 regulation will be sufficient for us.  We have maste