RKF Calculation - Balance

Hi Experts -
I have a Key fig is u2013 Balance And Posting period should be a prompt needed.
User must enter the posting period and the balance should be calculated from 1 to that posting period.
Means if I enter posting period as 4 then the balance should be sum of posting period of 1 to 4
Means if I enter posting period as 8 then the balance should be sum of posting period of 1 to 8
How can i make RKF for this ? or CKF need to be build.

Hi,
One way could be, create a formula variable and keep processing by of it to customer exist.
Now write an ABAP code, which will read the value of posting period variable and accordingly sum up the balance. Next step would be to create a formula in your columns and restrict this with the new formula variable created.
I hope it helps.
Thanks.

Similar Messages

  • Need help in Payroll Tax Balance Issue - Urgent

    Hi,
    Please help me with the following Tax and Balance issue. The system is on 12.0.3, South African Legislation.
    Issue : Salary has been restructured from Basic Salary to Total package structure in Dec 2008. Retro Pay was used to pay the difference amounts in Dec Run. But while configuring the new Elements for this Total Package they have missed out adding the Retro Elements to Proper Tax calculating Balances.
    Eg : "TP Salary" element is fed to "Taxable Income RFI" balance but "TP Retro Salary" element is not fed to this balance.
    So tax has not been calculated for those Retro amounts. This has been identified while validating test run for IRP5 tax certificates.
    The Feb 09 (Feb is the Tax year End for payroll) Payroll was already run on 10th and payments were already done. Now we need to tax the retro amounts and retrieve the balance tax amounts from Employees.
    I added the proper tax balances to those Retro elements and and the balances were adjusted to add the Retro amounts. Then I ran the Feb run the payroll again as of 20th, it did not recalculate the tax.
    How to recalculate the tax so that correct tax reflects in the Tax certificates? Please help me with the necessary Info.
    Thanks,
    Sri.

    Hi,
    As I mentioned earlier, I added the appropriate balances which are used to calculate Tax to Retro Elements and those Balances got updated with the delta amount but Tax was not updated. I want to know is there any process provided by Oracle using which Tax for those already paid amounts can be recalculated.
    I calculated the Tax manually and using Adjust Balance form added ZA_TAX_BALANCE_ADJUSTMENT Element and given the difference tax amount in PAYE and Tax Input values and saved the form. The Tax got updated.
    Tax_ASG_RUN - 15000
    Tax_ASG_TAX_YTD - 153257.32 (Prev - 138257.32). When I run the IRP5 (Tax Certificate Process) the tax is also getting correctly on it.
    But client wants Oracle to calculate the Tax for those retro amounts so thats the challenge.
    Could you help me with this.
    Thanks,
    Sri

  • G/L Account Balance Interest Scale

    hi Gurus,
    I done the G/l Balance Interest Calculation( Configuration and Settings )
    Example :  Loan Account xxxxx this account Open Item Select and Interest Indicator y1,  & Frequency is 1 month is given.
    1. F-02 Posting     Bank A/c  Dr   10000
                               Loan A/c Cr     10000
    next then Go to Fbl3n xxxx loan a/c is open item balance 10000
    2. F.52 G/L account Bal Interest Scale
    Interest tobe Calculated  some amount 1month  Rs 400
    Batch input session run Ok ,( No Errors )
    Interest not Posted to a Particular G/L Account
    ALL Setting Fulfill in Interst Calculation ( Balance )
    Advance Thanks

    Hi John,
    The tables you need are going to be JDT1 (journal lines), OJDT (journal header) and possibly OACT (account master). The contents of these tables should be sufficient to calculate the balance as at a certain date. For details of the columns in each table, you could use the Query Generator or consult the database help file (which is available if you have installed the SDK).
    A basic SQL query would be something like this:
    SELECT T2.AcctCode as AcctCode, T2.AcctName, sum(T0.Debit - T0.Credit) FROM JDT1 T0  INNER JOIN OJDT T1 ON T0.TransId = T1.TransId INNER JOIN OACT T2 ON T0.Account = T2.AcctCode WHERE T1.RefDate <= 'YYYY-MM-DD' and T2.AcctCode = '_Sys00000000019' group by T2.AcctCode, T2.AcctName
    where YYYY-MM-DD is the date you want the balance at and _Sys00000000019 is a made up account number I used as an example.
    Hope this helps,
    Owen

  • Creating Query in Production with Calculated key figures

    Hi BW Experts,
    Can u pls let me know that in case of Production System when we are allowing users to create reports with Adhoc Web Query Designer and using CKF + RKF
    (Calculated key Figure) which is already transported to Production in a specific Package, Is Production system will allow to save report?
    Pls sugges how to solve this problem ..to give permission for users to create reports in production server with CKF RKF?
    Thanks in advance

    rsa1 -> transport conection -> object changeability button -> Set query elements as everything changeable.
    If you want to refine this you have to do by authorizations.

  • SQL Query that retains previous balance

    Hello all,
    First time Oracle forms user here.
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE     10.2.0.3.0     Production
    TNS for 64-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    I want to create a running balance similar to a bank statement such that a beginning balance is calculated then
    as records are read, either the debit amount or the credit amount is added initially to the beginning balance
    then from that resulting calculation the next record's debit or credit is added to show the next value.
    There are separate 'Where' conditions for gathering the beginng balance, the credits and the debits
    The difficulty I am having is retaining the calculated balance from one record to the next.
    The input is from several tables joined together so it is difficult to show sample data. I can provide the SQL I have tried so far if needed.
    The output should look like this:
    EmpCode     Credit               Debit          Balance
    EC100 null null $1000.00
    null null $500.00          $1500.00
    null null $100.00          $1600.00
    null               $50.00          null               $1550.00
    null               $100.00          null               $1450.00
                   Emp. Totals                    $1450.00
    Any help is appreciated.

    Thank you for the tip. Here is the table, inserts and the SQL I've been working on.
    CREATE TABLE RESULT_OUTPUT (                   
                   employer_code           VARCHAR2(10),
                   employer_name           VARCHAR2(30),     
                   balance_forward                   NUMBER(18,2),
                   activity_date           DATE,
                   date_worked          DATE,
                   payment_type             VARCHAR2(2),
                   trans_id                 NUMBER(10),
                   trans_type               VARCHAR2(2),   
                   CREDIT_amount            NUMBER(18,2),
                   DEBIT_amount            NUMBER(18,2),
              BALANCE                 NUMBER(18,2));
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('A001',
                   'ABC CONSTRUCTION',
                    2500.00,
                    to_date('04-01-1999','MM-DD-YYYY'),
                    to_date('03-03-1999','MM-DD-YYYY'),
                    'ET',
                    3434343434,
                    'P',
                     0,
                    -500.00,
              2000.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('A001',
                   'ABC CONSTRUCTION',
                    2500.00,
                    to_date('04-02-1999','MM-DD-YYYY'),
                    to_date('03-04-1999','MM-DD-YYYY'),
                    'ET',
                    3434343435,
                    'P',
                     0,
                    -100.00,
              1900.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('A001',
                   'ABC CONSTRUCTION',
                    2500.00,
                    to_date('04-03-1999','MM-DD-YYYY'),
                    to_date('03-05-1999','MM-DD-YYYY'),
                    'ET',
                    3434343436,
                    'P',
                     0,
                    -500.00,
              1400.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('A001',
                   'ABC CONSTRUCTION',
                    2500.00,
                    to_date('04-04-1999','MM-DD-YYYY'),
                    to_date('03-06-1999','MM-DD-YYYY'),
                    'CK',
                    5757575757,
                    'W',
                     500.00,
                       0.00,
              1900.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
            VALUES('A001',
                   'ABC CONSTRUCTION',
                    2500.00,
                    to_date('04-05-1999','MM-DD-YYYY'),
                    to_date('03-07-1999','MM-DD-YYYY'),
                    'CK',
                    5757575758,
                    'W',
                     100.00,
                       0.00,
              2000.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('C002',
                   'XYZ COMPANY',
                    5000.00,
                    to_date('08-01-1999','MM-DD-YYYY'),
                    to_date('06-01-1999','MM-DD-YYYY'),
                    'ET',
                    3434343434,
                    'P',
                     0.00,
                    -500.00,
              4500.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('C002',
                   'XYZ COMPANY',
                    5000.00,
                    to_date('08-02-1999','MM-DD-YYYY'),
                    to_date('06-04-1999','MM-DD-YYYY'),
                    'ET',
                    3434343435,
                    'P',
                     0.00,
                    -100.00,
              4400.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('C002',
                   'XYZ COMPANY',
                    5000.00,
                    to_date('08-03-1999','MM-DD-YYYY'),
                    to_date('06-05-1999','MM-DD-YYYY'),
                    'ET',
                    3434343436,
                    'P',
                     0.00,
                    -500.00,
              3900.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES(C002,XYZ COMPANY,5000.00,4-AUG-1999,6-JUN-1999,CK,5757575757,W,500.00,0);
         VALUES('C002',
                   'XYZ COMPANY',
                    5000.00,
                    to_date('08-05-1999','MM-DD-YYYY'),
                    to_date('06-06-1999','MM-DD-YYYY'),
                    'CK',
                    5757575757,
                    'W',
                     500.00,
                     0.00,
              4400.00);
    INSERT INTO RESULT_OUTPUT(employer_code,
                   employer_name,     
                   balance_forward,
                   activity_date,
                   date_worked,
                   payment_type,
                   trans_id,
                   trans_type,   
                   CREDIT_amount,
                   DEBIT_amount,
              BALANCE)
         VALUES('C002',
                   'XYZ COMPANY',
                    5000.00,
                    to_date('08-05-1999','MM-DD-YYYY'),
                    to_date('06-07-1999','MM-DD-YYYY'),
                    'CK',
                    5757575758,
                    'W',
                     100.00,
                     0.00,
              4500.00);OUTPUT FOR REPORT:
    EMPNO EMPNAME          TRANSDATE     WORKDATE     TYPE     CREDITS          DEBITS          BALANCE
    A001,ABC CONSTRUCTION     ''          ''          ''     ''          ''          2500.00
    '','',1-APR-1999,3-MAR-1999,ET,0,500.00,2000.00
    '','',2-APR-1999,4-MAR-1999,ET,0,100.00,1900.00     
    '','',3-APR-1999,5-MAR-1999,ET,0,500.00,1400.00
    '','',4-APR-1999,6-MAR-1999,CK,500.00,0,1900.00     
    '','',5-APR-1999,7-MAR-1999,CK,100.00,0,2000.00
              EMP TOTALS: 2000.00
    EMPNO EMPNAME          TRANSDATE     WORKDATE     TYPE     CREDITS          DEBITS          BALANCE
    C002,XYZ COMPANY     ''          ''          ''     ''          ''          5000.00
    '','',1-AUG-1999,3-JUN-1999,ET,0,500.00,4500.00
    '','',2-AUG-1999,4-JUN-1999,ET,0,100.00,4400.00
    '','',3-AUG-1999,5-JUN-1999,ET,0,500.00,3900.00
    '','',4-AUG-1999,6-JUN-1999,CK,500.00,0,4400.00
    '','',5-AUG-1999,7-JUN-1999,CK,100.00,0,4500.00
         EMP TOTALS: 4500.00
    SELECT                   
                   e.employer_code       as ecode,
                   e.employer_name           AS ename,
                   trans.bal_due         AS balance_forward,
                   td.activity_date      as activity_date,
                   NULL                    as date_worked,
                   p.payment_type        as payment_type,
                   t.trans_id            AS transaction_number,
                   t.trans_type          AS trans_type, -- 'Payment or Work Report'
                   t.TRANS_IDENTIFIER      AS trans_ID,    
                   0                      as benefits,
                    td.total_amount       as cash_received
    FROM dbo.employer e
          INNER JOIN dbo.transaction t   ON e.employer_ID = t.ref_key_1
          INNER JOIN DBO.trans_detail td ON t.trans_id = td.trans_id
          INNER JOIN DBO.payment p       ON td.source_key = p.payment_id
          INNER JOIN (select  t2.balance_due as bal_due,  t2.ref_key_1
                      from dbo.transaction t2
                      where t2.ref_key_1 = (select e2.employer_id
                                            from dbo.employer e2
                                            where lower(e2.employer_code) = lower(trim('A001')))
                      and t2.trans_type = 'BAL') trans  ON trans.ref_key_1 = e.employer_ID
    WHERE  lower(e2.employer_code) = lower(trim('A001'))
    AND T.REF_ENTITY_1 = 205
    AND t.trans_type in ('P') 
    AND td.trans_type in ('O', 'CP')
    AND td.activity_date >= '1-MAR-1999'
    AND td.activity_date <= '10-JUN-1999'
    UNION
    SELECT            
                   e.employer_code       as ecode,
                   e.employer_name           AS ename,
                   0                          AS balance_forward,
                   td.activity_date      as activity_date,
                   wr.outer_stop_date      as date_worked,
                   ' '                   as payment_type,
                   t.trans_id            AS transaction_number,
                   t.trans_type          AS trans_type, -- 'Payment or Work Report'
                   t.TRANS_IDENTIFIER      AS trans_ID,
                   td.total_amount       as Benefits,
                   0                     as cash_received
    FROM dbo.employer e
    INNER JOIN dbo.transaction t   ON e.employer_ID = t.ref_key_1
    INNER JOIN DBO.trans_detail td ON t.trans_id = td.trans_id
    INNER JOIN DBO.work_report wr  ON td.source_key = wr.report_id
    WHERE lower(e2.employer_code) = lower(trim('A001'))
    AND T.REF_ENTITY_1 =  205
    AND wr.billing_type = 'CO'
    AND wr.report_status = 'RE'
    AND td.activity_date >= '1-MAR-1999'
    AND td.activity_date <= '10-JUN-1999'
    order by ecode, activity_date,trans_type;

  • Auto-elimination of intercompany profit in inventory - how to eliminate IC balance via rules?

    Hi Experts:
    I’ve designed and developed a data form in HFM to calculate the amount of MARGIN in the inventory of the receiving company (when the receiving company has received the inventory from an intercompany partner).
    Does anyone have any experience or ideas how to write a rule (or use IC logic) to automatically eliminate this calculated amount against IC Cost of Sales?
    The IC Cost of Goods sold entry will be the same at the margin in inventory (but this is not broken out separately in any account – just buried in COGS).
    Does anyone have any suggestions for a rule/account/IC logic that could automatically grab this calculated balance in inventory and remove it from inventory as well as reduce IC_COGS?
    We prefer to do this elim entry automatically if possible.    Is it possible to do an “auto” journal entry that could grab these amounts?    Or could we use a rule to populate an IC account so that this would self eliminate?
    Should we set up an elim account part and populate them automatically via rules, then allow HFM to use it's built in IC elim logic?   This issue is that this entry occurs all on one entity, but I know it's possible to set up IC accounts so that you can book a balance with yourself.
    How do I do this elim entry automatically in HFM?
    Inventory
    $    (1,000)  this will be calculated in HFM.
    IC_COGS
    $      1,000   this will equal to above account
    Thanks,
    Mark

    Hi. Try this. Tag it as an intercompany account (use Y instead of R) and give it a plug account. Put the plug account within COGS. Basically you're doing a one-sided elimination.
    Elimination of profit in inventory is not easy, and if this solves things for you then you're on the easy side of it.
    Regards,
    Eric

  • G/L Interest calculation  procedure

    Balance Interest calculation
    For term loan
    Pls send any one G/L Accounts Interest Calculation procedure
    Configuration
    It is very urgent

    Balance Interest Calculation: -
    It is a calculation of Interest on total balance of an  account or total balance of customer account. it is represented in "s".
    System defined variant for balance interest calculation type is u2018Su2019 and item interest calculation type is u2018Pu2019. Balance interest type calculation is used for G L Accounts. Item interest type calculation is used for vendors and customers.
    To display all transaction codes go to transaction code:SE16
    The Nine configuration steps for calculation of balance interest calculation are
    1) Define interest calculation type (OB46)
    2) Prepare account balance interest calculation (OBAA)
    3) Define reference interest rates (OBAC)
    4) Define time dependent terms (OB81)
    5) Define or specify interest rates (OB83)
    6) Create G L Accounts for Intesrest Gained and Interest allowed and Loan Account (FS00)
    7) Prepare gl account balance interest calculation and Define automatic posting (OBV2)
    8) Entry for Loan (F-02)
    9) Run interest programm (f.52)
    Step 01: Define interest calculation types (OB46)
    Path: SPRO>FInancial Accounting New>Financial Accounting Global Setting New>Business Transaction> Bank A/C interest calculation>Interest calculation global settings>Define interest calculation types
    Go to new entries
    Interest Id (V1) put discription Name Interest calculation type (S) and enter it will take automatically balance interest for S
    Make sure don't tick mark the box given and save it.
    Step 02: Prepare account balance interest calculation (OBAA)
    Path: SPRO>FInancial Accounting New>Financial Accounting Global Setting New>Business Transaction> Bank A/C interest calculation>Interest calculation global settings>Prepare account balance interest calculation
    Go to new entries
    Give calculation indicator as defined V1
    Interest calculation frequency : 01 (1 month)
    Calendar type : G (28-31/365)
    Give number range : 03
    Select balance plus interest.
    Save
    Step 03: Define reference interest rate (OBAC)
    Path: SPRO>FInancial Accounting New>Financial Accounting Global Setting New>Business Transaction> Bank A/C interest calculation>Interest calculation>Define reference interest rates
    Go to new entries
    Reference interest rate : V1 (same as Interest Indicator)
    Long text : 12%balanace interest
    Short text : 12% balance interest
    Date from : 01.03.2010
    Currency : INR
    Save
    Step 04: Define time dependent terms (OB81)
    Path: SPRO>FInancial Accounting New>Financial Accounting Global Setting New>Business Transaction> Bank A/C interest calculation>Interest calculation>Define time dependent terms
    Go to new entries
    Interest calculation indicator : V1
    Currency key : INR
    Effective from : 01.03.2010
    Sequential no : 01
    Term : Debit interest balance interest calculation
    Reference interest rate : V1
    Save
    Go to new entries or F8
    Interest calculation indicator : V1
    Currency : INR
    Effective from : 01.03.2010
    Sequential no : 02
    Term : credit interest balance interest calculation
    Reference interest rate : V1
    Save
    Step 05: Enter Reference Interest Rate Values (OB83)
    Path: SPRO>FInancial Accounting New>Financial Accounting Global Setting New>Business Transaction> Bank A/C interest calculation>Interest calculation>Enter interest values.
    Go to new entries
    Reference int. rate (V1)
    values effective from (01.03.2010)
    interest rate (12%)
    Before creating GL account Go to T.Code: OBD4 to create secured loans account group.
    Go to new entries
    Chart of accounts a/c group name from account to account
    Chart of Account 'TATA' secured loans 100300 100399
    TATA  INTR interest Expenses 400100 400199
    TATA  INTR interest Gained 300100 300199
    Save
    Step 06: Creation of G L Accounts (FS00)
    G L A/C no : 100305
    Company code : TATA (Tata Infotech)
    Select create button
    Account group : secured loans
    Select balance sheet account
    Short text : HSBC Bank Account
    Long text : HSBC Bank Loan Account
    Select control data tab
    Select only balances in local currencies
    Select open item
    Select line item display
    Sort key : 001
    Select create/bank/interest tab
    Field status group : G005
    Select relevant to cash flow
    Interest calculation indicator : V1
    Save
    Give G L A/C no : 400105
    Company code : TATA
    Select create button
    Account group : interest
    Select profit and loss account
    Short text : interest Allowed
    Long text : interest Allowed Account
    Select control data tab.
    Select line item display
    Sort key : 001
    Select create/bank/interest tab
    Field status group : G001
    Save
    Give G L A/C no : 300107
    Company code : TATA
    Select create button
    Account group : interest
    Select profit and loss account
    Short text : interest Gained
    Long text : interest Gained Account
    Select control data tab.
    Select line item display
    Sort key : 001
    Select create/bank/interest tab
    Field status group : G001
    Save
    Step 07: Define automatic posting account (OBV2)
    SPRO>FInancial Accounting New>Financial Accounting Global Setting New>Business Transaction> Bank A/C interest calculation>Interest posting>Prepare G L A/C balance interest calculation
    Go to accounts
    Chart of accounts : TATA
    A/C symbol currency G L A/C
    0002 INR 400105 (interest Allowed)
    2000 Inr 100305 (HSBC Bank Loan Account)
    Save
    Step 08: Entry for loan (F-02):
    Give document date : 01.03.2010
    Posting date : 01.03.2010
    Type : SA
    Company code : TATA
    Currency : INR
    Posting key : 40
    G L Account : 200005 (ICICI bank a/c)
    Enter
    Amount : 50,00,000
    Business area : IRON
    Value date : 01.03.2010
    Text : loan received
    Posting key : 50
    G L Account : 100305 (HSBC bank a/c)
    Enter
    Amount :   *
    Business area : IRON
    Text :   +
    Save
    Step 09: Interest calculation run (F.52):
    Accounting>Financial Accounting>General ledger>Periodic Processing>Interest calculation>Balances
    Give chart of accounts : TATA
    G L A/C no : 100305 (HSBC Bank Account)
    Company code : TATA
    Calculation period : 01.04.2010 to 31.12.2012
    Select leap year.
    Select post also if value date in past
    Select update master records
    Execute
    Go to system on menu bar.
    Select services
    Select batch input
    Select sessions
    Select RFSZIS00
    Select process
    Select display errors only
    Again select process
    The system gives the message: u201Cprocessing of batch input session completedu201D

  • Why the balance is infinity?

    Hello all:
    Can you help me with this simple program which calculates the balance for an investor?
    Problem:
    Whatever I enter for year and invest amount, the calculated balance is always infinite. And year goes up to 50. Even though I enter a small number, for example, 2 for amount and 3 for year, the result is still the same, INFINITY. Why is this?
    BTW, I find the complier can't recognize pow method unless I put Java.lang.Math in front. But I had already imported Java.lang.Math.* at the beginning.
    import java.lang.Math;
    import java.util.*;
    public class Investment
         public static void main(String[] args) throws Exception
              double interest = 0.12,amount,balance,b;
              int year,a;
              System.out.println("Please choose the amount of money you want to invest");
              amount = (double) System.in.read();
              System.in.read(); System.in.read();
              System.out.println("Please specify the years of the investment");
              year = (int) System.in.read();
              System.in.read(); System.in.read();
              for (a=1;a<=year ;a++ )
                   b = a; //Conver int a to double b, because pow need 2 double arguments
                   balance = java.lang.Math.pow ( (amount*(1+interest)),b);//formula to calculate balance
                   amount = balance;
                   System.out.println("Your balance for year " + a +" is " + balance);

    What is most wrong here is your formula for calculating balance.
    The formula is NOT balance = (amount * (1 + interest))^year! It's balance = amount * (1 + interest)^year.
    The for loop should then look like         for (year = 1; year <= maxYear; year++) {
                balance = amount * Math.pow(1 + interest, year);
                System.out.println("Your balance for year " + year + " is " + balance);
            }But since you are calculating successive balances it's much cheaper to use the previous values of balance:         balance = amount;
             for (year = 1; year <= maxYear; year++) {
                balance = balance*(1 + interest);
                System.out.println("Your balance for year " + year + " is " + balance);
            }Then, System.in.read() returns the unicode value of the character that was typed. If you type "1" and enter you get 54. If you type "2" and enter you get 55. You didn't mean it to work like this, did you?
    And the import keyword: It is there only for convenience. It tells the compiler that you'd like to use short class names (like AudioFileReader) instead of the full name (like javax.sound.sampled.spi.AudioFileReader). You can "import" methods only by adding a new public static method to your class that calls Math.pow.

  • 2 questions on variables in BEx

    Hi,
    I have 3 variables popping up on my Selection criteria (when I open a query) which I do not want. I verified all the characteristics in the query and none of these variables show as a restriction on any of the characteristics.  Any ideas on where to find and remove them
    Also, why would a restriction on 0Plant (a row in a query) have    &    in its technical name, i.e. at both ends when it was created and on the next day it disappears?
    Thanks

    Followup to your posts:
    For the rows, columns, etc in the structure, I could easily see those key figures and characteristics with Variable restrictions. It is not so obvious when it comes to the RKF, calculated key figure, etc. Is there an easier way locating such an object other than going through all the restricted key figure, calculated key figures (looking through the various formulas), etc? This will take forever.
    Also, under the rows, char, etc, I could also see variables based on the icons but now, searching through formulas, etc in RKF, calculated key figures, it is becoming tough. Any way to identify a variable in a formula other than knowing the variable complete name?
    The variables are: Plant to, Business Area hierarchy, Valuation class hierarchy and movement Type
    Thanks

  • 2 Questions on Timeline in PS

    Hoping someone can help me out here:
    1. What is the vertical blue-shaded bar below one of the clips on the timeline, in the image below? I have not made any changes to position, opacity, style etc.
    2. Sometimes I can see little blue specks in a horizontal line just below the time mark numbers. Thety are not permanent and come and go while I am editing. Any ideas what they mean?
    Thanks in advance!
    Jacques

    Followup to your posts:
    For the rows, columns, etc in the structure, I could easily see those key figures and characteristics with Variable restrictions. It is not so obvious when it comes to the RKF, calculated key figure, etc. Is there an easier way locating such an object other than going through all the restricted key figure, calculated key figures (looking through the various formulas), etc? This will take forever.
    Also, under the rows, char, etc, I could also see variables based on the icons but now, searching through formulas, etc in RKF, calculated key figures, it is becoming tough. Any way to identify a variable in a formula other than knowing the variable complete name?
    The variables are: Plant to, Business Area hierarchy, Valuation class hierarchy and movement Type
    Thanks

  • Business area financail statement

    hi experts
    i want financial statement as per business area.Could any one tell me what are the necessary steps for that
    Please help me out
    its very urgent requirement
    thanks
    Nilesh

    Dear Nilesh,
    Please let me know you are in which version of SAP?
    This is one of the common requirements, by clients.
    In order to generate BS and P&L at business area level you should carry out the following:
    1.  " Enable BA balance sheet" needs to be checked under Financial Accounting Global Settings.
    2. Check the Transaction Code OBXM and do nessesary configrations for clearing and reconcilation GL account postings.
    3. Execute  Programmes.
    SAPF181 P+L readjustment
    SAPF180A  Calculating balance sheet readjustment
    SAPF180  Posting balance sheet readjustment
    Thanks & Regards
    Sanjay Marathe

  • F.5D, F.5E Bus Area Adjustment

    Hi,
    Give me Explanatiion for below.
    1) what is the use of Bus Area Adjustment ?
    2) How the entires will be Adjusted ?
    3) How the Bus Area balances will tally ?
    4) what are the steps to be followed to complete the process.
    please guide me....
    Regards,
    Shekar.

    Dear Shekhar,
    Below are the steps involved in Business Area Adjusement
    1.F.5G
    2.F.5D
    3.F.5E
    Before doing the above steps please chek the configuratiional settings in FBKP ---> Automatic Postings -
    > Business Area readjustment -
    >> GA1 and  -
    >> GA2
    GL Accounts are maintained or not
    F.5 G = Determination of adjustment Accounts
    F.5 D - Calculating balance sheet adjustment
    F.5 E - Posting balance sheet Adjustments ( Adjustment Entrie Posted atthis level)
    EG :
    At time of Sales Invoice VF01
    Customer Dr                             10000     this line item is with Business Area  ( 1000 )
         To Sales Cr...                       9000      this line item is with Business Area  ( 1000 )
          To Tax Payables Cr....         1000     this line item is not having Business Area ( -
    The Amount posted in Business Area 1000 is
    Dr...  10000
    Cr ....9000
    But 1000 balance Lying in blank Business Area
    this Type entres are picked in Business Area Adjustment Program to adjust the Ballance in Business Area
    Entry got posted is as below at the time of F. 5 E
    Tax Payables Dr...                        1000   this is without Business Area ( -
    Adjustment account Cr...             1000   this is with Business Area ( 1000 )
    then balance is effeted in 1000 Business Area.
    i hope this is clear.....
    Dear Freinds, Please correct me if anyting wrong i represented...
    regards
    Masood

  • Vendor with interest

    Late payment to vendor with interest of 5%.Vendor returns the interest amount.
    assign points.

    hi
    interest calculation in  fi  two types 1 item interest calculation . 2 balance interest calculation.balance interest calculation type  is used for gl a/cs . item interest calculation type is uesd for vendars and customers . item interest calculation is caluculating in dunning.
    steps:
    1 define interest calculation types(TC:OB46)
    2 prepare account balance interest calculation (TC:OBAA)
    3 define refference interest rates (TC:OBAC)
    4 define time depedendant terms (TC:OB81)
    5 enter interest values (TC:OB83)
    6 (TC:XK02) assign item interest indicator in accounting information.
    7 (TC:F-43) ppurchase invoice
    8 dunning procedure (TC:FBMP)
    9 cal dunning (TC:F150).
    i think it is helpful for u
    regards
    sivareddy

  • Bapi for getting openitems with in the date range

    Hi experts,
                     Can anybody suggest me or is there any bapi for calculating balances for vendor with in the given date range.
    Thanks in advance,
    Regards,
    Murali Krishna T

    Hi,
    Please check
    BAPI_AP_ACC_GETBALANCEDITEMS Vendor Account Clearing Transactions in a given Period
    BAPI_AP_ACC_GETCURRENTBALANCE Vendor Account Closing Balance in Current Fiscal Year
    BAPI_AP_ACC_GETKEYDATEBALANCE Vendor Account Balance at Key Date
    BAPI_AP_ACC_GETPERIODBALANCES Posting Period Balances per Vendor Account in Current Fiscal Year
    Regards
    Hiren K.Chitalia

  • Infoset Reporting Problem

    HI,
    I have created a infoset with Sales Order, Delivery, Purchasing and GDP Forecast ODS based on Material and Plant Join.
    I am supposed to display the data from Sales as well as GDP Demand Year to Date and GDP Forecast values.
    For Year to date I used some restricted key figure to get the correct values.
    The values are calculated correctly when I do these RKF calculation on individual ODS. But when done on the infoset, these values multiply.
    e.g For Material AA and Plant BB , correct value of Demand YTD is 12 Then in infoset it is displayed as 144.
    I found out that for this material and plant combination I have 2 records in Sales ODS, 2 in Delivery ODS and 3 in Purchasing ODS.
    so values is calculated as = 12 x 2 x 2 x 3 = 144.
    Now my problem is How should I calculate the number of records from Sales, delivery , Purchasing for a given combination of Material/ Plant.
    If these ODS had a single Key field or two Key field I would have been able to calculated number of records , using Exception aggregation on these variables , but Key fields are more than three for each of these ODS.
    so I would like to know if there is any method to calculate the number of records from each ODS, which I can divide the calculated value of Demand YTD and get the correct result.
    Thanks
    SS

    Hi,
    Try to make this attribute as a navigational attribute and will display in the infoset for reporting.
    Thanks,
    Debasish

Maybe you are looking for

  • Windows or itunes not detecting ipod touch

    my computer is not detecting my ipod, ive tried reinstalling itunes, restarting my computer and device and pretty much all of the troubleshooting solutions offered online but still it will not be detected, it has previously worked without fail its ju

  • How to setup the perfect develop envorinment with Corda Builder

    All, It has been a while since I programmed with JSP/Java. Three years ago I developted some custom web pages within JSP and Eclipse. The webpages queried on a SQL DB. The results were populated via a Corda Builder Chart(PCXML script) in a JSP webpag

  • 5400rpm vs 7200rpm

    Hi, I'm looking to purchase an external portable hard drive for booting OS X Leopard. I've been looking at: LaCie Rugged All-Terrain Hard Disk FireWire 800, FireWire 400 & Hi-Speed USB 2.0 250GB 5400 rpm and OWC Mercury On-The-Go 200 GB 7200rpm FireW

  • Deletion Purchase requisition created by sales orders

    Hi gurus, in my SAP system there are purchase requisition created by schedule line from sales orders. For different reasons the sales orders were deliveried and billed with stock free and not with customer stock. When I try delete de purchase requisi

  • What virus software is compatible with OS 10.4.10?

    I use Microsoft Encourage for my mail and a combination of Opera and Firefox as my browsers (Opera mostly because of its security). I didn't renew my virus software because the Mac ads said that I didn't need to, but closer reading led me to find out