Need to calculate the monthly amount based to the annaul salary

Hi Expert,
I need to calculate the monthly amount based to the annual salary.
Some countries use a multiplier more than 12 to calculate the annual salary (e.g : 13,14 ...).
My problem is to calculate the monthly increase.
The increase amount is on the annual salary but for the monthly increase, normally, the system divides by the mutliplier.
But some countries would like calculate these amount on 12 and not the real multiplier.
So, could you please tell me there are user-exits or other to make this ???
Thanks in advance,
Virginie

Hi Virginie,
Check both feature PFREQ (Edit with transaction PE03) and user-exit corresponding to enhancement PARA0001.
rgds,
Carlos.

Similar Messages

  • CWB-Need to change the eligible salary column from yearly to monthly

    Hi All,
    I need to change the eligible salary column from yearly to monthly at Employee Allocation from Compensation Workbench.
    Kindly help me guys
    Regards,
    Sajid

    You can change the activity reference period in the Plan Form - > Not In Program tab from annually to monthly. However, it will impact all the calcuations as it will use monthly values for everything. Please be careful of this. I would suggest testing this (along with posting back the increases to ensure they are annual amounts) before proceeding with this.

  • Need to calculate the area of a vector shape in Illustrator CS6

    Hi All,
    I need to calculate the area of vector graphics we are designing for a vinyl window sticker. I've read a couple of previous threads, and all the solutions provided either don't work (using cmd, option, shift F12 to open debugging menu to get area), or are beyond my level of experience (doing a build of the Telegraphics Path Area Filter). Does anyone have any solutions, or know how to access the debugging menu/window other than using cmd, shift, option F12....I couldn't even find it in the Shortcut Keys preferences).  Thanks!

    Jacob
    It worked very well - great stuff!. I am a physician and I am working on cardiac MRI.. such as calculating the heart function using slices of heart images in systole and diastole (when the heart is squeezed or full of blood).
    .. we can write a little medical paper comparing really pricey software (GE, Siemens, Medis you name it..) with this method for people with not too many pennies in their pocket. The advantage of using Illustrator is that you can blow up the images up to the point of loosing resolution, and trace the margins of the heart with an accuracy that would make any GE guy cry for his mama..
    I thought even a cm further.. for simple-minded people (such as physicians for example) one would like a way to input the area of one slice directly into an equation. For example would be a way to create a routine that would take the number of the area of one slice and input it in this equation? Such as to create a little square where you put the slice, you trace it and then the program takes that number and pitches it in the equation without you writing it down on a paper.
    thanks again!
    Avi

  • Need to calculate the working daz urgent

    Hello Experts
    For the days starts from first to end in every month it has to give the number of working days till the corresponding date.
    If it on 1st month on 1st it has to give the value as 1 if it as working day if it is on 2nd it has to give 2 ….like this for all the months I need to calculate.
    Help me with variable exit…
    Thanks

    Hi,
    make a loop starting from the first of the month to 'your' actual date and
        call function 'DATE_CONVERT_TO_FACTORYDATE'
               exporting
                    date                        = l_date
                    factory_calendar_id         = l_cal
              importing
                   workingday_indicator         = l_found
              exceptions
                   others                       = 1 .
    In case l_found is space, l_date is a working day. In that case increase a working day counter.
    regards
    Siggi

  • Need to calculate the number of records in an XML file

    I need to find out how many records I have in an XML file. The file resides on a unix server and before doing anything with, i need to insert the record count into a separate table. Is there any function or procedure that can achieve this?

    does each record start with a new line? if it does a
    simple wc -l can help you. If not, you can pre
    process this XML file by first removing all the new
    line characters using sed and then adding new line
    characters after the end tag of the xml using sed and
    finally doing a wc -l . this would be a simple shell
    script. Not sure if you want to use Unix shell
    scripting to achieve this.The sheer nature of XML means that it does not conform to any visual formatting. i.e. An xml file containing...
    <employee><empno>3</empno></employee>
    is identical in XML terms to...
    <employee>
    <empno>3</empno>
    </employee>
    which is also identical in XML terms to...
    <employee>
    <empno>
    3
    </empno>
    </employee>
    which is also identical in XML terms to...
    <employee><empno>
    3
    </empno></employee>
    etc.
    You cannot rely on the number of CR's or CR/LF's in the file to count the records. Proper XML processing should be used for such a task.

  • Hi frnds need to calculate the distance

    hi frnds,
    In siebel am in need of Calculating the distance between two zipcodes using the latitude and longitude with the help of a table provided without integration, can any one help me out with dis requirement ..thanks

    Hi Virginie,
    Check both feature PFREQ (Edit with transaction PE03) and user-exit corresponding to enhancement PARA0001.
    rgds,
    Carlos.

  • How to calculate the circumference of a circle based on the following Circle class?

    I have the following sealed Cirlce class
    public sealed class Circle
    private double radius;
    public double Calculate(Func<double, double> op)
    return op(radius);
    I need to calculate the circumference of a (an arbitrary) circle based on this class without modifying the class.  Here is what I tried that is not working:
    Circle cir = new Circle();
    double circ = 2 * Math.PI * cir.Calculate(5, 5);
    How can I calculate a circumference of a circle based on this scenario?
    Rich P

    Ok, let's clarify:
    Facts:
    1. The radius-field is private, and you can't set it via a public member like a method/property.
    2. You don't want to change the class, but the radius
    That means in other words you want to change a private field from outside of the class, which is not nice, but possible:
    Circle cir = new Circle();
    var field = cir.GetType().GetField("radius",BindingFlags.Instance|BindingFlags.NonPublic);
    field.SetValue(cir, 5);
    double circ = cir.Calculate((radius) => 2 * Math.PI * radius);
    Ha, and now, did I manage to pass the skills test question? ;-)
    Thomas Claudius Huber
    "If you can't make your app run faster, make it at least look & feel extremly fast"
    My latest Pluralsight-course:
    Windows Store Apps - Data Binding in Depth
    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook |
    ultimate WPF handbook |
    ultimate Silverlight handbook

  • How to calculate the measure for the next month using the AGO Function

    Hi,
    I need to calculate the measure for the current month and the next month.
    Can anyone please let me know the syntax to use AGO function for the above requirement.
    Regards,
    Ambika Nanda.

    Hi.
    You can also use Oracle analytic functions LAG and LEAD inside the EVALUATE obiee function. The second one will give you the next measure.
    For example the report is:
    TIMES.CALENDAR_MONTH_DESC
    SALES.AMOUNT_SOLD
    LAG column: EVALUATE('LAG(%1, 1) OVER (ORDER BY %2)' AS DOUBLE, SALES.AMOUNT_SOLD, TIMES.CALENDAR_MONTH_DESC)
    LEAD column: EVALUATE('LEAD(%1, 1) OVER (ORDER BY %2)' AS DOUBLE, SALES.AMOUNT_SOLD, TIMES.CALENDAR_MONTH_DESC)
    And the result is:
    CALENDAR_MONTH_DESC--------AMOUNT_SOLD--------LAG--------------LEAD
    2000-01----------------------------------8025513.84---------------------------8474475.88
    2000-02----------------------------------8474475.88----- 8025513.84-----7439568.24
    2000-03----------------------------------7439568.24------8474475.88-----7062040.48
    2000-04----------------------------------7062040.48------7439568.24-----7497971.40
    Regards
    Goran
    http://108obiee.blogspot.com

  • Help needed in formulating the logic!!

    Hi experts,
    I have a requirement something like this. In CFM module we have some deals created.
    For each deal there will be deal start date and end date.
    Based on the user given input date I need to capture intrest accumlated till that date. Thats ok. But the problem is in between there can be repayments done.
    For example : say deal number is 2004010155
    start date : 4/1/2008
    end date : 3/31/2009
    basic amount : 8,00,000.
    say suppose  on 30.06.2008 a partial repayment of 1,00,000 done.
    Now if user given date is 31.07.2008,then we need to calculate intrest amount with basic amount as 8,00,000 till 30.06.2008 and
    starting from 01.07.2008 to 31.07.2008(user given date) I need to calculate intrest with amount 7,00,000.(After deducting one lakh as partial repayment done during this period).
    For refernce table name is VTBFHAPO.
    How can we achieve this?
    Thanks & Regards
    Himayat.

    Hi,
    Currently this how am trying to do. Partial repayment not taken into consideration yet. Its for calcualting intrest amt based on linear method or exponential method.
    READ TABLE i_vtbfhazu.
              IF sy-subrc = 0.
                i_final-dblfz = i_vtbfhazu-dblfz.
                i_final-delfz = i_vtbfhazu-delfz.
              ENDIF.
              IF p_datum = i_final-delfz.
                i_final-int_per = ( p_datum - i_final-dblfz ) .
              ELSEIF  p_datum < i_final-delfz.
                i_final-int_per = ( p_datum - i_final-dblfz ) + 1.
              ELSEIF p_datum > i_final-delfz.
                i_final-int_per = ( i_final-delfz - i_final-dblfz ) + 1.
              ENDIF.
              READ TABLE ivtbfhapo1 WITH KEY rfha = i_vtbfhazu-rfha
                                          rfhazu = '1'
                                          rfhazb = '1' BINARY SEARCH.
              IF sy-subrc = 0.
                g_bzbetr = ivtbfhapo1-bzbetr.
                i_final-bzbetr = g_bzbetr.
              ENDIF.
              READ TABLE ivtbfhapo WITH KEY rfha = i_vtbfhazu-rfha
    *                              szbmeth = '3'
                                    rkond   = '1000' BINARY SEARCH.
              IF sy-subrc = 0.
                i_final-pkond = ivtbfhapo-pkond.
                CLEAR : g_int_amt, g_wtd_prn.
                READ TABLE ivtbfhapo2 WITH KEY rfha = i_vtbfhazu-rfha
                                               jexpozins = 'X' .
                IF sy-subrc = 0 .
                  CASE ivtbfhapo2-ammrhyzv.
                    WHEN '00'. g_var = 1.
                    WHEN '06'. g_var = 2.
                    WHEN '03'. g_var = 4.
                    WHEN '01'. g_var = 12.
                    WHEN '52'. g_var = 52.
                    WHEN OTHERS. g_var = 1.
                  ENDCASE.
                  g_int_amt =  i_final-bzbetr * ( 1 +  i_final-pkond  /
                     ( g_var * 100 ) )  ** ( i_final-int_per * ( g_var  /
                        ivtbfhapo2-abastage ) ).
                  g_int_amt = g_int_amt - i_final-bzbetr.
                  i_final-int_amt = g_int_amt.
                ELSE.
                  LOOP AT ivtbfhapo2 WHERE rfha = i_vtbfhazu-rfha
                                      AND abastage > '000000'.
                    g_int_amt = i_final-bzbetr * ( i_final-pkond / 100 ) * (
                           i_final-int_per / ivtbfhapo2-abastage ).
                    i_final-int_amt = g_int_amt.
                  ENDLOOP.
                ENDIF.
                g_wtd_prn = i_final-bzbetr * i_final-int_per.
                i_final-wtd_prn = g_wtd_prn.
                APPEND i_final.
    Thanks & Regards
    Himayat

  • Calculate difference in value based on two date parameters

    Hi All,
    I have a table and need to calculate the difference in rent amount for a property based on two date parameters.
    I have uploaded sample data here:
    https://app.box.com/s/pu8oa4f3jhrhm0ylshdz2fuo7541vn4z
    Thanks
    Jag

    Hi jaggy99,
    Do you have the knowledge of
    Excel Add-In? If you don't have knowledge of C#/VB.NET language and Visual Studio, I don't think Excel Add-In is what you want. As I said previously, your problem is totally about the business logic, we don't provide solution for a complete requirement.
    Based on your sample data, I think VBA code is suitable.
    If you're not familiar with VBA, please take a look at the MSDN documents for scratch:
    Getting Started with VBA in Excel 2010
    The steps should be like this:
    1. Sort all the records by [Rent Change Date] field
    2. Loop throuth the records and find the FromDate and ToDate as well as the corresponding [Rent Charged] field
    3. Calculate the difference and save the data into a new range
    It's not so hard, please have a try, if you encounter any development problems, you can post in this forum.
    Thanks.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to calculate  the 99th percentile of a number stream ...

    Environment:
    Oracle 11.2.0.3 EE on Solaris 10.5
    I have a stream of numbers (say 1000), I need to calculate the 99th percentile of the distribution of that stream such that when a new number 'n' is introduced I can tell if the new number is above the 99th percentile of the distribution of my stream.
    I don't have a good feel for the nature of the distribution if that's important.
    I am NOT, I repeat NOT a statistician! :-)
    I have read the docs on the different functions available, ntile, percent_rank, percentile_cont, percentile_disc, etc. I have also read many articles referenced via Google.
    The examples do not do exactly what I'm attempting and I was unable to get the result I need by trial and error (mostly!).
    Any suggestions are most welcome!!!
    If you need additional information I'll try to supply what I know.
    -gary

    Here are the CREATE TABLE and INSERT statements for some sample data:
    create table sales(custno number, tran_dt date, amount number)Here are the INSERTs to load:
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('23-MAR-12','DD-MON-RRRR'),3065);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('29-FEB-12','DD-MON-RRRR'),8435);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('29-FEB-12','DD-MON-RRRR'),9712);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('20-MAR-12','DD-MON-RRRR'),1869);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('03-AUG-12','DD-MON-RRRR'),647);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('03-MAR-12','DD-MON-RRRR'),7434);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('23-AUG-12','DD-MON-RRRR'),225);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('01-SEP-12','DD-MON-RRRR'),28);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (5, TO_DATE('10-APR-12','DD-MON-RRRR'),9393);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('19-MAY-12','DD-MON-RRRR'),1010);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('29-FEB-12','DD-MON-RRRR'),2625);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('18-MAR-12','DD-MON-RRRR'),2511);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('15-AUG-12','DD-MON-RRRR'),1156);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('17-AUG-12','DD-MON-RRRR'),5106);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('19-AUG-12','DD-MON-RRRR'),714);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('07-APR-12','DD-MON-RRRR'),6105);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('25-MAY-12','DD-MON-RRRR'),1592);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('14-MAY-12','DD-MON-RRRR'),1880);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('29-JUL-12','DD-MON-RRRR'),8497);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('13-MAY-12','DD-MON-RRRR'),1658);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('06-APR-12','DD-MON-RRRR'),3071);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('04-SEP-12','DD-MON-RRRR'),8277);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('20-MAR-12','DD-MON-RRRR'),3929);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('04-MAR-12','DD-MON-RRRR'),9239);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('24-APR-12','DD-MON-RRRR'),4390);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('12-MAY-12','DD-MON-RRRR'),8362);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('06-APR-12','DD-MON-RRRR'),4157);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('01-SEP-12','DD-MON-RRRR'),9260);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('31-MAR-12','DD-MON-RRRR'),8017);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('20-MAY-12','DD-MON-RRRR'),2420);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('21-JUL-12','DD-MON-RRRR'),5272);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('23-AUG-12','DD-MON-RRRR'),313);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('24-MAY-12','DD-MON-RRRR'),4747);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('25-APR-12','DD-MON-RRRR'),272);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('02-MAY-12','DD-MON-RRRR'),4329);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('28-JUL-12','DD-MON-RRRR'),3149);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('18-MAR-12','DD-MON-RRRR'),1740);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('07-MAR-12','DD-MON-RRRR'),6868);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('02-JUN-12','DD-MON-RRRR'),5661);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('08-MAY-12','DD-MON-RRRR'),6136);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('23-AUG-12','DD-MON-RRRR'),512);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('16-AUG-12','DD-MON-RRRR'),8784);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('31-AUG-12','DD-MON-RRRR'),7300);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('12-MAY-12','DD-MON-RRRR'),9303);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('29-MAR-12','DD-MON-RRRR'),2626);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('14-JUL-12','DD-MON-RRRR'),6365);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('19-JUN-12','DD-MON-RRRR'),7880);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('20-JUN-12','DD-MON-RRRR'),6096);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('05-AUG-12','DD-MON-RRRR'),1980);
    INSERT INTO SALES(custno, tran_dt, amount) VALUES (26, TO_DATE('27-MAY-12','DD-MON-RRRR'),3004);I can now calculate the average sales over the past 6 months (180 day) and 1 month (30 day) periods. I don't need the 6 month average but I do need the individual sales to get the distribution and hence the standard deviations and hopefully the 99th percentile number. I know it's around 3 standard deviations but the spec I'm working with requires using the 99th percentile. Not my choice! :-)
    select custno,
             avg(case when tran_dt between sysdate -210 and sysdate -31 then amount else 0 end) sales6mo,
             avg(case when tran_dt >= sysdate -30 then amount else 0 end) sales1mo,
             stddev(amount) sd,
             stddev(amount)*3 sd3
    from sales
    group by custno;I want to see if there are any customers' (I know I only generated 2) 1 month sales that are more than the 99th percentile of the 6 month distribution.
    If it's easier to use a lower percentile I can use the examples to plug in the 99.
    Here is the result of the above query:
        CUSTNO   SALES6MO   SALES1MO         SD        SD3
             5 4506.11111 28.1111111 4142.61146 12427.8344
            26 3563.81579 1090.05263  2952.1488 8856.44641So, from this data I would expect my 99th percentile to be close to the SD3 column. Correct?
    Thanks very much for the assistance!!
    -gary
    Edited by: garywicke on Sep 5, 2012 9:54 AM

  • How can I calculate the interest percentage dynamically?

    Hi All,
    Please look at these tables (Customer and Rates), having some sample data. I've created a function for returning the interest percentage for a particular customer based upon his/her investment start date and end date. I'm getting the desired result but I'm wondering if I need calculate the composite interest here...then how can I do that? Suppose a customer has invested some amount for 45 days, then I need to calculate the interest for initial 30 days as 5% and additional 15 days as 6% and I need to give the final amount. In this case how can I pull this task off? Please give me some ideas and correct me if I'm wrong. I just want to know how can we do this interest calculation by an Oracle program?
    Regards
    BS2012
    Customer Table
    CUSTOMER_ID     AMOUNT     START_DATE     END_DATE
    1000             40000     15-JAN-13     15-FEB-13
    1001             34000     15-DEC-12     15-FEB-13
    1002             35678     15-NOV-12     15-FEB-13
    Rates Table
    RATE_PCT     LOW_TENURE     HIGH_TENURE
    5                    0     30
    6                    0     60
    7                    0     90
    CREATE OR REPLACE FUNCTION
    F_INTEREST_PCT (V_CUSTOMER_ID IN CUSTOMER.CUSTOMER_ID%TYPE)
      RETURN NUMBER AS V_RATE_PCT NUMBER;
      BEGIN
        SELECT A.RATE_PCT INTO V_RATE_PCT
        FROM RATES A, CUSTOMER B WHERE (B.END_DATE - B.START_DATE) BETWEEN A.LOW_TENURE AND A.HIGH_TENURE
                                   AND B.CUSTOMER_ID = V_CUSTOMER_ID;
        RETURN V_RATE_PCT;
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
        ROLLBACK;
        DBMS_OUTPUT.PUT_LINE(SQLERRM);
        WHEN OTHERS THEN
        ROLLBACK;
        DBMS_OUTPUT.PUT_LINE(SQLERRM); 
      END F_INTEREST_PCT;

    BS2012 wrote:
    Hi All,
    Please look at these tables (Customer and Rates), having some sample data. I've created a function for returning the interest percentage for a particular customer based upon his/her investment start date and end date. I'm getting the desired result but I'm wondering if I need calculate the composite interest here...then how can I do that? Suppose a customer has invested some amount for 45 days, then I need to calculate the interest for initial 30 days as 5% and additional 15 days as 6% and I need to give the final amount. In this case how can I pull this task off? Please give me some ideas and correct me if I'm wrong. I just want to know how can we do this interest calculation by an Oracle program?
    Regards
    BS2012
    Customer Table
    CUSTOMER_ID     AMOUNT     START_DATE     END_DATE
    1000             40000     15-JAN-13     15-FEB-13
    1001             34000     15-DEC-12     15-FEB-13
    1002             35678     15-NOV-12     15-FEB-13
    Rates Table
    RATE_PCT     LOW_TENURE     HIGH_TENURE
    5                    0     30
    6                    0     60
    7                    0     90
    CREATE OR REPLACE FUNCTION
    F_INTEREST_PCT (V_CUSTOMER_ID IN CUSTOMER.CUSTOMER_ID%TYPE)
    RETURN NUMBER AS V_RATE_PCT NUMBER;
    BEGIN
    SELECT A.RATE_PCT INTO V_RATE_PCT
    FROM RATES A, CUSTOMER B WHERE (B.END_DATE - B.START_DATE) BETWEEN A.LOW_TENURE AND A.HIGH_TENURE
    AND B.CUSTOMER_ID = V_CUSTOMER_ID;
    RETURN V_RATE_PCT;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    ROLLBACK;
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    WHEN OTHERS THEN
    ROLLBACK;
    DBMS_OUTPUT.PUT_LINE(SQLERRM); 
    END F_INTEREST_PCT;
    You will need to work out a formula or process to get the results you want, then write the code to do what you devise. When I have to do something hard it helps to write out what I want to do in psuedocode that I alter translate to real code. Let's say I want to do a factorial (1 * 2 * 3 * 4 ...) could be something like
    get limit value
    set factorial to 1
    foreach loop value from 1 to limit
      multiply factorial by loop index
      v_factorial_n := 1; --set factorial to 1
      for i in 1..p_limit_n loop --p_limit_n defined elsewhere
        v_factorial_n := v_factorial_n * i;
      end loop; --loop to compute factorial
    . . .

  • How to Calculate the Time Between two days in ABAP

    Hi,
                  I have one scenario like i need to calculate the time between two days please can you suggest me.
    Thanks,
    Harinath

    Hi Peeleti,
                Check this code,
    DATA : DATE1 LIKE SY-DATUM VALUE '19830125',
           DATE2 LIKE SY-DATUM VALUE '20070219',
           DAYS1 TYPE I,
           WEEK1 TYPE I,
           MONTH1 TYPE I,
           YEAR1 TYPE I,
           C_YEARS1 TYPE I.
    CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
    EXPORTING
      BEGDA           = DATE1
       endda           = DATE2
      TAB_MODE        = ' '
    IMPORTING
      DAYS            = DAYS1
      C_WEEKS         =
      C_MONTHS        = C_YEARS1
      C_YEARS         = C_YEARS1
      WEEKS           = WEEK1
      MONTHS          = MONTH1
      YEARS           = YEAR1.
      D_MONTHS        =
      MONTH_TAB       =
    *WRITE : / 'DAYS   = ', DAYS1,
            / 'WEEKS = ',WEEK1,
          /  'MONTHS = ', MONTH1,
          / 'YEARS   = ', YEAR1.
    Using this code you can calculate the No Of Days Between two dates. Based On days you will easily calculate the Hour. [  No of days * 24 ].
    Thanks.
    Reward If helpful.

  • How to calculate the unit for RATE?

    Hey All,
    I am not sure if there is something standard for this or not.
    I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
    Rate == Value /  Quantity
    I need to calculate the unit for the rate as below -
    Rate unit == Value unit (Currency) /  Quantity unit (Base_uom) 
    (for example -
    if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
    Could anyone please suggest how to calculate the unit in this case?
    Many Thanks!
    Tanu

    Hi,
    Go through the below link it may give some idea
    http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
    Regards,
    Marasa.

  • How to calculate the key figure value on other key figure

    Hi,
    I have a material character and  Packing Hour, No of Boxes key figures. My requirement is i need to calculate the % no of boxes are Packed <2 Hour , 2 to 3 Hour and above 4 hour based on the packing hour.
    Sample data
    Material     Packing hour    No of boxes
    001            1 hr                   5 box
    002            2 hr                   3 box
    003            2hr                    7 box
    004            3hr                    2 box
    005            5hr                    1 box
    Here  we are not considering meterial. We are considering Only Packing hour and no of box  to calculate % no of Boxes within a time period. Please help me out...to calculate % no of boxes based on hour period
    Thanks,
    Rama Devi

    hi
    its like creating buckets for analysis...
    u'll have to create  formula in KF...
    1.
    if (Pack Hrs <= 2) * No Of Boxes
    2.
    If (Pack Hr >= 3 or Pck Hr <= 4) * No Of Boxes
    like this u'll have to create bucket..

Maybe you are looking for

  • How do I do external backups in addition to Time Capsule?

    I am using Time Capsule in the usual way to back up my two household computers - one is running Lion and the other is running Snow Leopard.  Backups are taken hourly and so on - exactly the way time capsule works. I want to periodically, say once eve

  • Mavericks RDX problem and solution?

    Quite  not sure what happened but i observed a problem using RDX media catridges in FCP before. With Mavericks a new error dialogue appared: "Der Speicherort „VideoRAW_2" auf diesem Computer wird bereits von „(null)" auf „(null)" verwendet. Um Zugrif

  • Core dump in malloc

    I get a core dump while making a call to malloc. Owing to waht reasons can malloc give a coredump?

  • Regular Expression in content filter

    Hey, i want to create a content filter with the "body-contains"-condition in combination with a regular expression. To specify it: I want to check whether a string (disclaimer) is already added to the email. If not, i have to add the footer. So to sa

  • ALV buttons - Changed size

    Has anyone encountered that after upgrading to SAP Enterprise 6.2 and/or to SAP Gui (level 49), that user toolbar buttons in ALV grid have enlarged dramatically in size ? We have had this problem after our upgrade, but haven't found any information o