How to calculate term of aloan

Hi,
Thank you in advance if you could help me.
I need to write a trigger that will work out the terms of a loan.
To do that I need a function that takes interest rate, number of payments and principal amount
and return the term amount.
Does such a function exists inOracle sql?
In case not, how can I write such a function?
TIA,
Philippe

Hi Philippe,
As Oracle doesn't have application specific functions, you need to create one.
Take a look on the command CREATE FUNCTION. In your case, it will looks like:
CREATE FUNCTION CALC_TERMS_LOAN(interest_rate NUMBER, no_payments NUMBER, amount NUMBER)
RETURN NUMBER
AS
END CALC_TERMS_LOAN;With some research, you can fill the blanks. And don't expected for others to solve what seems to be a class assignment.
[]s,
Miguel

Similar Messages

  • How to calculates averages and send to a file?(source code)

    how to calculates averages and send to a file?(source code) I need to get started but I don't know where to begin...........the book I have doesn't really say how to handle averages and send to a file.................anybody got suggestions on how to get started? I am a newbie so place in layman's terms.............thanx

    To calculate an average: add all of the numbers together and divide by how many numbers you added together.
    ex: (1 + 2 + 3 + 10)/4 = 4 (4 is the average)
    As for writing them to a file, look over the API for random or sequential access files.

  • How to calculate interest and tds

    friends,
    we have one asset where it is provided by our business partner. every month we have to pay interest based on the mail received from business partner. my query is how to post this interest in the system, how to calculate the tds on this,
    regards,

    Hi Subramaniyan,
       1. You need to configure interest calculation all the steps.
    http://www.sap-basis-abap.com/sapfj001.htm
    or
    OB46 - Interest Settlement Calculation Type
    Int Calc. Type
    P - calculate interest based on line items.
    S - calculate interest based on account balances.
    Secornd, make it avaliable to the interest run program.
    OB82 - Interest Terms
    Third, determine the interest rate that will be used by the calculation.
    OBAC - Define Reference Interest Rates
    OB83 - Enter the Reference Interest Rates Value
    Fourth, assign the interest indicator to the reference interest rate.
    OB81 - Define Time Dependent Terms
    Finally, determine the how and to which accounts the interest program will post.
    OBV1 - Prepare Interest on Arrears Calculation F.26    A/R: Balance Interest Calculation
       2. Create Recurring Entries.  fbd1
    http://help.sap.com/saphelp_46c/helpdata/EN/6e/1218df9f0411d189b80000e829fbbd/content.htm
      3.  Process Batch Input   sm35
    Regards,
    Srinivas Muthyala

  • How sap calculate the arrears interest?

    Hi All,
    I am doing the configuration about arreas interest.
    My configuration:
    Interest Type:Item interest calculation
    Calendar type:30/360
    Time-based Terms:
        Credit interest: arrears interest calc
        Premium:0
    Reference Interest Rate Values:1.0
    I make some tests.
    overdue day: 1 day
    overdue_amount |interest|increased_interest
    1000           | 0.834  |            
    2000           | 0.917  | 0.083
    3000           | 1.001  | 0.084
    4000           | 1.084  | 0.083
    Could you help me to find how sap calculate the arrears interest?
    Many Thanks!
    Message was edited by:
            Chen Zhonghua

    Hi
    First u have to define interest calculation types ( i.e. Item interest calculation typeP)
    u have define GL accounts Interest Recevied account
    then u have to define prepare interest areas calculations in that u have to define interest indiacator .
    then
    u have to define refeence interest rates
    define time based terms
    enter interest values
    then u have to define AR calculation of interest on arrears  in that u have to define business transactions
    then u have to assign interest indicator to customer master
    then execute the Interest calculation F.24
    Regards
    Suresh

  • How to calculate totals in Blocked ALV Report

    Hi All,
    Can any body tell how to calculate totals & sub totals in
    Blocked ALV Report[Blocked List].
    Thanks in advance
    Thanks & Regards,
    Rayeezuddin.

    read this it might help
    Sums                                                       
    15. No_sumchoice(1) TYPE c : This parameter allows the choice for summing up
    Only by fieldcatalog.
    Value set: SPACE, 'X'
    'X' = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be able to change this value interactively.
    16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
    Value set: SPACE, 'X'
    'X' = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = 'X' in the field list.
    17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
    Value set: SPACE, 'X'
    'X' = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.
    18. No_subtotals(1) TYPE c : No subtotals possible          
    Value set: SPACE, 'X'
    'X' = no subtotals.
    19. Numc_sum(1)  TYPE c : Totals only possible for NUMC-Fields.
    20. No_unit_splitting TYPE c: No separate total lines by inh.units   
    21.totals_before_items TYPE c: Display totals before the items   
    22. Totals_only(1) TYPE c :  Show only totals      
    Value set: SPACE, 'X'
    'X' = only total records are output.
    23. Totals_text(60) TYPE c : Text for 1st col. in totals   
    Value set: SPACE, string (max.60)
    ' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
    'String’ = The string passed is output after the total indicated by '*', if the column is wide enough.
    24. Subtotals_text(60) TYPE c : Texts for subtotals
    Value set: SPACE, string (max.60)
    ' ' = In the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the asterisks, if the column is wide enough.
    'String’ = the string passed is output after the subtotal indicated by '*', if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
    ELSE TELL ME I WILL PASTE COMPLETE HELP
    regards

  • How to Calculate Opening balance

    Hi BW Gurus,
    How to calculate Opening balance for previous period using variables in Reports using debit and credit.
    Example:
    Opening balance is the balance for an account for the previous period. In other words, if the user is running a report for Period 1, 2006, the opening balance is actually the ending balance from Period 12, 2005 (December 31st, 2005).
    Thanks in advance
    DJ

    Hi Friend,
    If Your Prob is solve then tell me how to find perticular month balance amount.
    i m create cash book report for perticuler GL Account , i use BKPF + BSEG for this
    i found all entries,
    But at last i want to Opening Balance for perticuler date.
    like     01/05/2007 opening balance = 10000 as per tcode FS10N
    and in 26/05/2007 ??????
    how to find exact date opening balance is there any function for same
    or any procedure..
    Thanks
    From
    Gaurav

  • HOW TO CALCULATE OPENNING BALANCE

    HI Experts..
    How to calculate Opening balance for previous period using variables in Reports using debit and credit.
    Example:
    Opening balance is the balance for an account for the previous period. In other words, if the user is running a report for Period 1, 2006, the opening balance is actually the ending balance from Period 12, 2005 (December 31st, 2005).
    I am Using 0FIAR_O03 ODS ..
    Very Urgent Issue..
    If Possible Stp by Step..
    Cheers
    Purushottam
    09891683828
    [email protected]

    Hi Saloni,
    to get the debit and credit you would be using a variable 0I_FPER(Fiscal year / period), which is a user entry interval variable.
    now to get the opening balance you will have to create a customer exit valiable and the low value of 0I_FPER will have to popuplated by writied the code for the customer exit valiable. you will have to restrict the key figure DEB_CRE_LC for this customer exit variable with the operand as less than(< Fiscal Year /Period from 0I_FPER)).
    If the above was useful please assign reward points.
    Regards
    Venkata Devaraj

  • How to calculate Opening balance for a customer?

    Hi Experts,
    How to calculate Opening balance for a customer? I am trying to develop a report where in i have to get opening AR balance,current sales,adjustments etc of a customer. Please let me know how can i do this. I have some tables with me KNC1, BSAD, BSID.
    Thanks in Advance.
    Sharat Chandra.

    Say for example ..
    Get the opening bal for Customer 'K' in CCode 'C1' in 2008 ..
    First get all items from BSEG ..
    Select * from BSEG where KUNNR eq 'K'
                                     and BUKRS eq 'C1'
                                     and GJAHR eq '2008' .
    Sum all the DMBTR values (This is the total value).
    Second get the cleared items form BSAD for the above entries;
    Select * from BSAD for all entries in BSEG where KUNNR and BUKRS and XBLNR eq BSEG-XBLNR.
    Sum all DMBTR values ( this is cleared value).
    Third substract the cleared value from total to get Open value.
    This is a overview .. you should go to the tables and look for fields and etc.. and then define the logic meeeting your requirements .... this is a genric undersatnding ....
    Thanks,
    Aditya. V

  • How to calculate Average balance for an account

    Hi,
    How to calculate average balance for an account for a particular period say for JAN-12 period and after the end of that period for another two days 01-feb-12 and 01-feb-12 ?
    I'm using the following query :
    SELECT cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6 "Account_XX",
    nvl(sum(l.accounted_dr - l.accounted_cr),0) "Balance"
    FROM gl_code_combinations cc,
    gl_je_lines l
    WHERE cc.code_combination_id = l.code_combination_id
    AND l.set_of_books_id ='XX'
    and code_combination_id = replace it with code combination_id for account_xx
    AND l.effective_date <= '31-Jan-12' (january period end ??)
    GROUP BY cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6
    There are some discrepancies in "average balance" after end of month (Jan-12)?
    How to calculate average balances for a particular account (Account_XX above)from end of month of Jan to first two days of february?
    Thanks,
    Kiran

    Kiran,
    Please let me know first, is Average Balancing feature enabled in your GL Ledger?
    Regards
    Muhammad Ayaz

  • How to calculate the total running time for process from sysssislog entries

    Hi All,
    I have the below query which gets me the log entries form the logs table when the process started/completed.
    Select row_number() over (order by starttime) row_num,Substring( Substring(message, CharIndex('''',message) +1 ,Len(message)) ,0, CharIndex('''',Substring(message, CharIndex('''',message) +1 ,Len(message)))) as Description,
    starttime,endtime,message
    from dbo.sysssislog
    where (message like 'start%' or message like 'finish%' ) and
    LEFT(Substring( Substring(message, CharIndex('''',message) +1 ,Len(message)) ,0, CharIndex('''',Substring(message, CharIndex('''',message) +1 ,Len(message)))),1) between 'A' and 'Z'
    order by starttime
    However,I have to build a report on the top of it showing how much time that attribute/dimension/heirarchy took to execute(Ex-How much time did YearlyReview dimension take to complete).I dont have much knowledge of T-SQL and unable to figure out how to calculate
    that on SQL or report level.
    Could someone please assist me in getting the exact query for that?
    Thanks a lot.

    I get the below output(sample 20 rows) on executing this query.Also,a start process does not necessarily follow up a finished message for the same dimension as it may have been stopped or it failed.So we need to leave it as NA in case it started but dint
    finish
    Row_Num Description starttime endtime Message
    1 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Super Type' dimension.
    2 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Super Type' dimension.
    3 Team Member Indicator 12/13/12 16:38 12/13/12 16:38 Started processing the 'Team Member Indicator' dimension.
    4 Team Member Indicator 12/13/12 16:38 12/13/12 16:38 Started processing the 'Team Member Indicator' dimension.
    5 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Super Type' attribute.
    6 PAC SC Super Type 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Super Type' attribute.
    7 Specialist Merger Indicator 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Specialist Merger Indicator' attribute.
    8 Specialist Merger Indicator 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Specialist Merger Indicator' attribute.
    9 YearlyReview 12/13/12 16:38 12/13/12 16:38 Started processing the 'YearlyReview' dimension.
    10 YearlyReview 12/13/12 16:38 12/13/12 16:38 Started processing the 'YearlyReview' dimension.
    11 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Repeat Caller' dimension.
    12 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC SC Repeat Caller' dimension.
    13 Year 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Year' attribute.
    14 Year 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'Year' attribute.
    15 Staffing Function 12/13/12 16:38 12/13/12 16:38 Started processing the 'Staffing Function' dimension.
    16 Staffing Function 12/13/12 16:38 12/13/12 16:38 Started processing the 'Staffing Function' dimension.
    17 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Repeat Caller' attribute.
    18 PAC SC Repeat Caller 12/13/12 16:38 12/13/12 16:38 Started reading data for the 'PAC SC Repeat Caller' attribute.
    19 PAC HV Cust 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC HV Cust' dimension.
    20 PAC HV Cust 12/13/12 16:38 12/13/12 16:38 Started processing the 'PAC HV Cust' dimension.

  • 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 Current APC (Acquisition and Production Cost)

    Hi,
    Please help me how to calculate the Current APC.
    The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
    The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
    The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line “Acquisition Value” and column “Posted values”.
    I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic.
    Please help me.
    Thanks in advance,
    Satish

    Hi,
    you'll find the logic in fm FI_AA_VALUES_CALCULATE
    A.

  • How to calculate the Current APC

    Hi,
    Please help me how to calculate the Current APC.
    The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
    The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
    The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line “Acquisition Value” and column “Posted values”. 
    Thanks in advance,
    Satish

    Hi,
    I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic where it is being done.
    Please help me.
    Thanks in advance,
    Satish

  • How to calculate the Daily Call Volume

    Hello,
    Can anyone please advise how to calculate the daily call volume in a contact center - the counts of the calls terminated in ICM ?
    Is there any webview report or a SQL query which provides the count ?
    Many thanks in advance for the help!
    Thanks & Regards,
    Naresh

    The ICM software generates a Termination_Call_Detail record for each call that arrives at the peripheral. From This report you can get the number of calls to ICM as well as the call details.
    To get the report run this sql query
    select * from dbo.t_Termination_Call_Detail where convert (varchar(10), DateTime, 101) = '12/03/2010'

  • How to calculate the variance in PO price history?

    hi
    i hav standard report ME1P, since i need to do some modifications in this program i copied to Y prgrm,,,'
    im getting all the values properly...
    but my prblm is im not getting how to calculate the variance? im not getting the logic behid it...
    can anybody expln me in breif plz....
    Regards
    Smitha

    Hi Venu,
    there is another way as well, however, you won't be able to see Variance and Variance% as a saperate keyfigure which is not under the period. Thats the reason I didn't mention it earlier.
    What you can do is, Drag the period to the columns, Now create a structure that has the two keyfigures std price, moving price. Here if you add Variance and Variance%, Then these CKF's would come under period as well, which you don't need. And the system won't allow you to add these CKF's outside this structure. The reason being because the interpretation of the data then wouldn't make any sense here. You can create a new structure as well with these CKF's but they would become a subpart of your previous structure.
    choose the required characteristics in the Rows section. Save it.
    Let us know, Sorry man, can't help u much at this problem.
    regards,
    Sree.

Maybe you are looking for

  • Fail to install Distibution Point on Windows Server 2012

    I have been trying to install a distribution point via sccm 2012 on a windows 2012 server. I keep getting errors about the drive not found (distribution manager failed to verify drive specified by user on distribution point) and it won't install. It

  • Trying to set up wireless network on PC with Airport Express

    I'm helping a friend set up his network with AirPort Express. He's got a modem attached to his PC, and currently has a router that sends a wireless signal to a receiver on the PC in the other room. Now he's added a Mac, and the old router/receiver do

  • IOCTL's from a static library linked to KMDF driver

    Hi, Im trying to build a static library that can be used across multiple KMDF drivers. The library needs to send IOCTL's to another driver to access required functionality.  The library does not have access to the Wdf device object/objects of the KMD

  • Compatibility issues CS5 to CC 2014

    Hi, We just installed Adobe's CC 2014 versions at school but I haven't installed any yet on my home computer. I asked my students to save a copy in CS5 version so I could look at their files home. There have been some major compatibility issues regar

  • Missing files for my Live 5.1 digital card (90

    Hi I have this Sound Blaster card that I purchased as an OEM card and had to download the drivers for it and it is a very good sound card as have all my other previous Sound Blaster cards. My problem is that I cannot find anywhere to download all the