LDEP and LALL expansion functions do not perform as expected

Hi all
I really need some help on this issue:
System: SAP BPC NW 7.5 SP7
Problem: The EVDRE LDEP and LALL expansion functions do not perform as expected when combined with PARENTAFTER.
Example: Assume that PARENT_A is HLEVEL 1
u2022     When using LDEP(5,PARENT_A),PARENTAFTER
u2022     HLEVEL 2 and 3 are displayed correctly with the members display first followed by the parent
u2022     However, all levels thereafter i.e. HLEVEL 4 + are displayed after their parent members
Note:
u2022     It is not restricted to HLEVEL greater than 3
u2022     Problem level = N +2 where N is the HLEVEL of specified parent member within the LDEP or LALL formula

My experience is that LDEP and LALL are buggy in BPC 7.5 NW.  If you reference the documentation only MEMBERS, BASMEMBERS, BAS, DEP, ALL, SELF, NOEXPAND, GDEP, GBAS, and GALL are supported memberset parameters/functions.  My advice if you choose to mix the MS and NW worlds of BPC is to test VERY THOROUGHLY before productionizing any EVDRE since the MS functions are not officially supported by SAP in NW.

Similar Messages

  • "Some Export Functions Were Not Performed"

    I am running Lightroom 4.2 on Windows 8 and routinely receive the message "Some Export Functions Were Not Performed" / "File Cannot Be Written" when trying to export. I have 128GB of space available on the drive I am writing to, do not use a "Second Copy", and have full administrative rights to the drive. There were a couple times when I was able to export an image but when trying to repeat the same process they too now fail.
    Any assistance would be greatly appreciated!

    More detail...
    I eliminated GoodSync, Windows 8 Photo app, and Adobe PhotoShop Elements Organizer as the root of the problems as I was still experiencing the inability to export with these services totally disabled.
    I still do not know the cause of the problem but when LR4 exports a file that it said it couldn't do successfully it creates an illegitimate JPG file in the destination folder and I am unable to delete the bad JPG file because LIGHTROOM has a lock on it.
    I'm wondering if it is a Windows 8 issue.
    Anyone else?

  • HT1212 My iPhones screen is broken(a black screen and the touch function does not work). I want to back it up, however I can't unlock it. I don't need to fix it, but i do need the information back up to new iPhone. How can i back it up?

    My iPhones screen is broken(a black screen and the touch function does not work).I want to back it up, however I can't unlock it. I don't need to fix it, but i do need the information back up to new iPhone. How can i back it up?

    i don't see a way for you to back up your phone, because it will require you to unlock the phone. 

  • Probelm regarding function ( can not perform dml openration inside a query

    hi all,
    i have created on function which is used for delete rows and insert new rows ( records) but when i run i got
    ora-14551 -can not perform a DML operation inside a query
    0ra-06512 - fn_brok_upfdate_dtltbl , line no 21
    this error
    following are my code please help me
    CREATE OR REPLACE FUNCTION Fn_Brok_Update_Dtltbl
    (fnBROK_TYPE VARCHAR2,fnSLAB_ID VARCHAR2, fnINV_TYPE_CODE VARCHAR2)
    RETURN NUMBER
    AS
    fnCOUNT      PLS_INTEGER;
    fnTBLNAME     VARCHAR2(40);
    fnTMPINV_TYPE_CODE VARCHAR2(1000);
    fnTMPINVCODE       VARCHAR2(50);
    fnMYQUERY          VARCHAR2(4000);
    BEGIN
          IF UPPER(fnBROK_TYPE) = 'UPFRONT' THEN
          fnTBLNAME :='UPFRONT_RECD_DTL';
          END IF ;
        IF fnSLAB_ID IS NOT NULL AND fnINV_TYPE_CODE IS NOT NULL THEN
        fnTMPINV_TYPE_CODE := fnINV_TYPE_CODE ;
                 fnMYQUERY := 'SELECT COUNT(*) FROM '||fnTBLNAME||' WHERE SLAB_ID = '''||fnSLAB_ID||'''' ;
                 EXECUTE IMMEDIATE fnMYQUERY INTO fnCOUNT  ;
              IF fnCOUNT > 0 THEN
                    DELETE FROM UPFRONT_RECD_DTL WHERE slab_id = fnslab_id ;
              END IF ;
              WHILE fnTMPINV_TYPE_CODE IS NOT NULL
                    LOOP
                        SELECT  CASE WHEN INSTR(fnTMPINV_TYPE_CODE,',')= 0 THEN fnTMPINV_TYPE_CODE
                        ELSE Strsplit(fnTMPINV_TYPE_CODE,1,INSTR(fnTMPINV_TYPE_CODE,',') - 1  ) END  INTO fnTMPINVCODE FROM DUAL ;
                        fnMYQUERY := 'INSERT INTO '||fnTBLNAME||'(SLAB_ID, INV_TYPE_CODE)
                                VALUES ('''||fnSLAB_ID||''','||fnTMPINVCODE||') ' ;
                        EXECUTE IMMEDIATE fnMYQUERY ;
                        SELECT CASE WHEN INSTR(fnTMPINV_TYPE_CODE,',')= 0 THEN NULL
                        ELSE Strsplit(fnTMPINV_TYPE_CODE,INSTR(fnTMPINV_TYPE_CODE,',')+ 1 , LENGTH(fnTMPINV_TYPE_CODE)) END
                        INTO fnTMPINV_TYPE_CODE FROM DUAL ;
                   END LOOP ;
       fnCOUNT := 1 ;
       RETURN fnCOUNT ;
       END IF ;
    END ;
    [\pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    How did you call this function ? from SQL Statement ? Then No way .. . .
    ORA-14551: cannot perform a DML operation inside a query
    Cause: DML operation like insert, update, delete or select-for-update cannot be performed inside a query or under a PDML slave.
    Action: Ensure that the offending DML operation is not performed or use an autonomous transaction to perform the DML operation within the query or PDML slave

  • I plugged a usb controller into my mac and the vibrate function is not stopping. Do macs not support plug and play?

    I'm still very new to forums so please excuse anything that may have been previously asked. I purchased a USB controller for my mac to play a couple games and the vibrate function on the controller will not stop. I was wondering if there is a way to access the controller setting or if os x supports plug and play controllers? Any help is greatly apprectiated.

    Hello Knowledgelink
    Go through the steps in the article below to restart your iPhone into recovery mode to then restore your iPhone to the latest version of iOS.
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Regards,
    -Norm G.

  • Notification "Launch the app and go to the library" not working as expected

    Hello,
    we are sending notification "Launch the app and go to the library" - but it's not working as expected, it's still just launching app with last open folio.
    Whats wrong there? Do we need v30 app? We have V29, but this is not mentioned in documentation.
    Thanks
    Martin

    Ah.
    Ok, now it's clear.
    Anyway i would appreciate possibility to force viewer to switch to library view after new issue is detected, even without notification. Quite often requested feature - "there is new cover in Newsstand, but customer don't know how to download new publication easily".
    Martin

  • Can anyone see in this code why my insert and check username function is not working?

    Hi guys.
    I have an error that has me stumped.
    I have a form that inserts text from a text field into a
    mysql database and I have added a check user name function to check
    if this number already exists.
    Here's the page
    http://www.thechallenge.net.au/redemption2.php
    The error I get when using the page on the web is this
    Duplicate entry '' for key 1
    Can anyone help with this?

    ducati1 wrote:
    > Ok we are now getting somewhere.
    > I have reset the mysql database as recommended and
    everything works Except the
    > pay pal receipt number is being entered into the
    database as only numbers and
    > no letters. For example when I entered 123456f it went
    to the database as
    > 123456 with no "f".
    > What should I set the database and text field properties
    to so it records all
    > that might be in a pay pal receipt number?
    I noticed previously you changed it to int, that means
    integer, which is
    a numeric datatype.
    You want mixed characters and numbers? Is it always the same
    length? If
    it is, use a CHAR datatype and set it to the length you need,
    CHAR(12)
    for instance will let you use 12 characters. Even if the
    number entered
    isn't 12 characters, it will be stored as 12 characters, but
    with spaces
    where there are no characters. I personally never use this
    unless I am
    100% certain that its going to be exactly the same length,
    otherwise
    doing comparisons is problematic, as you need to TRIM the
    white space.
    If the length is going to vary, then use VARCHAR(12), this
    let you use
    up to 12 characters. It won't put extra spaces in. This is my
    preference.
    Now, if you are also storing double byte characters, like
    foreign
    characters, you might want to consider using NVARCHAR or
    NCHAR.
    Oh, these examples are based on MS SQL datatypes, so MySQL
    might be
    slightly different, so it may be worth checking the manual
    first.
    Dooza

  • Drag and relate from User query not working as expected

    Hi All,
    Could anyone shed some light on why using drag and relate from a user query is not working for me?
    Drag and relate works well from all system generated queries, but not from my user queries.
    For example:
    - System query/report - running a system stock report and dragging the 'Item number' field result to a D&R Sales Order generates a report of all Sales Orders for the selected Item Number. As expected - success.
    - User Query - running a item lookup report from a user generated query and then D&R to Sales order for the selected Item Number does not work. Error = 'No matching records found (ODBC -2028) [message 131-183]
    Any ideas?
    Best regards,
    John

    Hi John,
    I believe Drag and relate only works for system form.  The whole function is hard coded.  It will not work for any queries including system queries.
    Thanks,
    Gordon

  • Function SPLIT_LINE not working as expected

    Dear All,
    I have created a BDC to upload Long Text of CJ20N along with the Dates. For this first the editable ALV is used where in the User can enter Long Text. It is working fine. I have used the below FM to split the text after every 50 characters but it is not working properly
    CALL FUNCTION 'SPLIT_LINE'
            EXPORTING
              TEXT       = W_TEMPUPLOAD-REM  " Long Text
              LEN        = TLEN   " Total Length of String
              MAXLEN     = 50
            TABLES
              RESULT_TAB = LT_RESULT_TAB.
          L_LINES-TDFORMAT = ''.
          L_LINES-TDLINE = ''.
          APPEND L_LINES .
    It is breaking text of length 128 from 42 ,50,34 characters one by one . It is not working fine. also it is not uploading it correctly . Say for eg the word 'asked' is written then it is uploading 'aske'.
    Please guide me in this matter.
    Regards,
    Bharti Jain

    Hi,
    Refer this -
    PARAMETERS: po_text TYPE STRING,
                po_len  TYPE i.
    DATA: wa_line TYPE char255,
          i_line TYPE STANDARD TABLE OF char255.
    DATA: w_length TYPE i,
          w_mod TYPE i,
          w_count TYPE i,
          w_check TYPE i.
    w_length = STRLEN( po_text ).
    w_mod = w_length mod po_len.
    w_count = w_length / po_len.
    IF ( w_mod NE 0 ).
      w_count = w_count + 1.
    ENDIF.
    CLEAR: w_mod.
    DO w_count TIMES.
      w_check = w_mod + po_len.
      IF w_check GT w_length.
        po_len = w_length - w_mod.
      ENDIF.
      wa_line = po_text+w_mod(po_len).
      APPEND wa_line TO i_line.
      w_mod = w_mod + po_len.
    ENDDO.
    CALL FUNCTION 'CREATE_TEXT'
      EXPORTING
        fid               = 'AVOT'
        flanguage         = 'E'
        fname             = 'WA_AFVC-CON3'
        fobject           = 'AUFK'
    *   SAVE_DIRECT       = 'X'
    *   FFORMAT           = '*'
      tables
        flines            = i_line
    * EXCEPTIONS
    *   NO_INIT           = 1
    *   NO_SAVE           = 2
    *   OTHERS            = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Change details in Create_text according to your need.
    Regards,
    Harsh Bansal

  • Adding and displaying a new JPanel -- not working as expected

    I'm starting my own new thread that is based on a problem discussed in another person's thread that can be found here in the New to Java forum titled "ActionListener:
    http://forum.java.sun.com/thread.jspa?threadID=5207301
    What I want to do: press a button which adds a new panel into another panel (the parentPane), and display the changes. The Actionlistener-derived class (AddPaneAction) for the button is in it's own file (it's not an internal class), and I pass a reference to the parentPane in the AddPaneAction's constructor as a parameter argument.
    What works: After the button is clicked the AddPaneAction's actionPerformed method is called without problem.
    What doesn't work: The new JPanel (called bluePanel) is not displayed as I thought it would be after I call
            parentPane.revalidate();  // this doesn't work
            parentPane.repaint(); 
    What also doesn't work: So I obtained a reference to the main app's JFrame (I called it myFrame) by recursively calling component.getParent( ), no problem there, and then tried (and failed to show the bluePanel with) this:
            myFrame.invalidate();  // I tried this with and without calling this method here
            myFrame.validate();  // I tried this with and without calling this method here
            myFrame.repaint();
    What finally works but confuses me: I got it to work but only after calling this:
            myFrame.pack(); 
            myFrame.repaint();But I didn't think that I needed to call pack to display the panel. So, what am I doing wrong? Why are my expectations not correct? Here's my complete code/SSCCE below. Many thanks in advance.
    Pete
    The ParentPane class:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class ParentPane extends JPanel
        private JButton addPaneBtn = new JButton("Add new Pane");
        public ParentPane()
            super();
            setLayout(new BorderLayout());
            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            setBackground(Color.yellow);
            JPanel northPane = new JPanel();
            northPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            northPane.setBackground(Color.yellow);
            northPane.add(addPaneBtn);
            add(northPane, BorderLayout.NORTH);
            // add our actionlistener object and pass it a reference
            // to the main class which happens to be a JPanel (this)
            addPaneBtn.addActionListener(new AddPaneAction(this));
        public static void main(String[] args)
            javax.swing.SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShowGUI();
        private static void createAndShowGUI()
            JFrame frame = new JFrame("test add panel");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(new ParentPane());
            frame.pack();
            frame.setVisible(true);
    } the AddPaneAction class:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    public class AddPaneAction implements ActionListener
        private JPanel parentPane;
        private JFrame myFrame;
        public AddPaneAction(JPanel parentPane)
            this.parentPane = parentPane;
         * recursively get the JFrame that holds the parentPane panel.
        private JFrame getJFrame(Component comp)
            Component parentComponent = comp.getParent();
            if (parentComponent instanceof JFrame)
                return (JFrame)parentComponent;
            else
                return getJFrame(parentComponent);
        public void actionPerformed(ActionEvent arg0)
            JPanel bluePanel = new JPanel(new BorderLayout());
            bluePanel.setBackground(Color.blue);
            bluePanel.setPreferredSize(new Dimension(400, 300));
            JLabel myLabel = new JLabel("blue panel label");
            myLabel.setForeground(Color.LIGHT_GRAY);
            myLabel.setVerticalAlignment(SwingConstants.CENTER);
            myLabel.setHorizontalAlignment(SwingConstants.CENTER);
            bluePanel.add(myLabel, BorderLayout.CENTER);
            parentPane.add(bluePanel);
            myFrame = getJFrame(parentPane);
            //parentPane.revalidate();  // this doesn't work
            //parentPane.repaint(); 
            //myFrame.invalidate(); // and also this doesn't work
            //myFrame.validate();
            //myFrame.repaint();
            myFrame.pack();  // but this does!?
            myFrame.repaint();
    }

    For me (as it happens I'm using JDK 1.5.0_04) your code appears to work fine.
    It may be that we're seeing the same thing but interpreting it differently.
    1. When I run your application with your "working" code, and press the button then the JFrame resizes and the blue area appears.
    2. When I run your application with your "not working" code and press the button then the JFrame does not resize. If I manually resize it then the blue area is there.
    3. When I run your application with your "not working" code, resize it first and then press the button then the JFrame then the blue area is there.
    I interpret all of this as correct behaviour.
    Is this what you are seeing too?
    Are you expecting revalidate, repaint, invalidate or validate to resize your JFrame? I do not.
    As an aside, I do remember having problems with this kind of thing in earlier JVMs (e.g. various 1.2 and 1.3), but I haven't used it enough recently to know if your code would manifest one of the previous problems or not. Also I don't know if they've fixed any stuff in this area.

  • T42p vista fn + f3 and fn + f4 functions (turn off screen and sleep) not working correctly

    Hi -- I recently installed windows vista on my T42p.  It works fine except that the fn+f3 and fn+f4 functions do not work as expected.  Before installing the hotkeys driver, the fn+f4 function worked correctly while f3 did not (going to sleep worked, turning the monitor off did not).  I then installed the recommended hotkeys driver.  Now fn+f4 makes the monitor turn off while f3 does nothing ... fn+f4 is supposed to put the laptop to sleep.  On top of this, if i select "sleep" from the start menu, the computer turns the monitor off instead of going to sleep.
    Presumably, the sleep button could still be telling the computer to go to sleep, but the actual operation of going to sleep is now broken?  Just a guess.  Anyways -- anyone know how to resolve this so that fn+f3 turns my monitor off and fn+f4 puts my computer to sleep?

    I've too this problem, but more, my sound mute wasn't worked (for deblock, but it can block it few second before...) 5 days in 5-6 instalation of three version of winxp: winxp ru x64 sp2, winxp es/ru sp3 x32.
    eventually I've found and ran "TPOSDSVC.exe" in instalation directory and it give an opportunity  deblocking the sound volume!!!!!!!!!!!! and I don't need more functions 
    volume levels and brightness adjustment worked well without OSD (before I ran TPOSDSVC.exe) and with OSD.
    and now I don't know worked this bustered sound driver in winxp x64.
    ThinkPad T61 7664

  • My search function does not work. How can I fix it?

    Hello
    I need help I just bough a macbook 13 inch, with snow leopard
    and the search function does not work.
    The window opens but when I write the name i searh it gives me no results.
    How can i fix it?
    Do i need really to re install all snow leopard?
    thanks
    pt

    Hello paola t & welcome to the forums
    I need help I just bough a macbook 13 inch
    It may be that Spotlight hasn't completed indexing just yet - is there a dot (indicates busy) inside the magnifying icon top right?
    Also, check System Preferences/Spotlight to see what if any exclusions are configured, etc.

  • The Versions and Auto Save functions do they work with Office 2011?

    I recently installed LION on my Apple Pro. However the VERSIONS and AUTO SAVE functions do not seem to work with OFFICE 2011 Word and Excel. Does anyone know why?
    Gabriel

    Waiting for Microsoft to update them

  • Upgraded to 6.83 and now Toshiba stack is not reco...

    Dear friends
    My phone is Nokia 6280. I have been using the Toshiba Bluetooth stack with the Nokia PC Suite without any inconveniences, but when I upgraded Nokia PC Suite to the latest Version 6.83, This new Pc suite does not recognize the Toshiba stack, I uninstalled it and installed the previous software which came with my phone, now I have the old PC suite and the Bluetooth function is not working, I tried several things , reinstalling the stack, and this isworking since my Toshiba stack recognises my nokia phone.
    I would appreciate any help since I keep synchronizing my phone and PC suite has been very useful for me.
    Thank you very much

    I recently got a Toshiba laptop with centrino duo processor 1GB ram and it came in with vista re installed. i have my N6280 which i tried it for the first time on this vista. went thru all the installation of PC suite from the website.
    instlled the BT monitor and the Microsoft stack....all it does it stop at the passcode window and silence nothing happens .......
    Then i try the USB thing it stops at the connect cable and phone and stays there for a long time n does nothing ....hey wait a minute somehings happening.......
    Oh goodness gracious me.. MALFUNCTION.....How can that be. its the frst time i have installed PC Suit or BT stack ....
    What is the matter with the PC Suit?WHat shud i do about it?
    The Nokia website mentions that this version is Vista "Compatible".....
    Please put me out of my misery/....SHUD I dumb it down to the version that came with the NOKIA 6280 phone.
    PLZZ HELP
    REGARDS
    NIEL
    P.S before I go i need to mention that the bluetooth is recognising my phone alright. I can see the phone and connect like dial up and stuff but not the PC Suit.

  • Compiles but does not execute as expected????

    Here is my code. I can compile and execute but does not perform as expected What do I need to change?
    import java.io.;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import java.math.*;
    public class CalcTest extends JFrame implements ActionListener, ItemListener
    public JMenuBar createMenuBar()
            JMenuBar mnuBar = new JMenuBar();
            setJMenuBar(mnuBar);
                //Create File & add Exit
            JMenu mnuFile = new JMenu("File", true);
            mnuFile.setMnemonic(KeyEvent.VK_F);
            mnuFile.setDisplayedMnemonicIndex(0);
            mnuBar.add(mnuFile);
            JMenuItem mnuFileExit = new JMenuItem("Exit");
            mnuFileExit.setMnemonic(KeyEvent.VK_F);
            mnuFileExit.setDisplayedMnemonicIndex(1);
            mnuFile.add(mnuFileExit);
            mnuFileExit.setActionCommand("Exit");
            mnuFileExit.addActionListener(this);
            JMenu mnuFunction = new JMenu("Function", true);
            mnuFunction.setMnemonic(KeyEvent.VK_F);
            mnuFunction.setDisplayedMnemonicIndex(0);
            mnuBar.add(mnuFunction);
           JMenuItem mnuFunctionClear = new JMenuItem("Clear");
           mnuFunctionClear.setMnemonic(KeyEvent.VK_F);
           mnuFunctionClear.setDisplayedMnemonicIndex(1);
           mnuFunction.add(mnuFunctionClear);
           mnuFunctionClear.setActionCommand("Clear");
           mnuFunctionClear.addActionListener(this);
            // Fields for Principle 
      JPanel row1 = new JPanel();
      JLabel dollar = new JLabel("How much are you borrowing?"); 
      JTextField money = new JTextField("", 15);
            // Fields for Term and Rate
       JPanel row2 = new JPanel();
       JLabel choice = new JLabel("Select Year & Rate:");
       JCheckBox altchoice = new JCheckBox("Alt. Method");
       JTextField YR = new JTextField("", 4);
       JTextField RT = new JTextField("", 4);
           //Jcombobox R=rate,Y=year
       String[] RY =  {   
            "7 years at 5.35%", "15 years at 5.5 %", "30 years at 5.75%", " "  
      JComboBox mortgage = new JComboBox(RY);
                // Fields for Payment   
        JPanel row3 = new JPanel(); 
        JLabel payment = new JLabel("Your monthly payment will be:");
        JTextField owe = new JTextField(" ", 15); 
              //Scroll Pane and Text Area
       JPanel row4 = new JPanel();
       JLabel amortization = new JLabel("Amortization:");
       JTextArea chart = new JTextArea(" ", 7, 22); 
       JScrollPane scroll = new JScrollPane(chart, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,  
                                               JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);  
        StringBuffer amt = new StringBuffer();
        Container pane = getContentPane(); 
        FlowLayout flow = new FlowLayout(FlowLayout.LEFT);
        JButton Cal = new JButton("Calculate"); 
        NumberFormat currency = NumberFormat.getCurrencyInstance();  
      public CalcTest() 
               // Title and Exit of JFrame  
         super("Mortgage and Amortization Calculator"); 
         setSize(475, 328);  
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
                //JFrame layout      
         pane.setLayout(flow);     
               //Input output fields added to JFrame  
         row1.add(dollar);    
         row1.add(money);   
         pane.add(row1);    
         mortgage.setSelectedIndex(3);   
         mortgage.addActionListener(this);    
         mortgage.setActionCommand("mortgage");
         row2.add(altchoice);     
         altchoice.addItemListener(this);  
         row2.add(choice);     
         YR.setEditable(false);    
         RT.setEditable(false);     
         row2.add(YR);     
         row2.add(RT);      
         row2.add(mortgage);    
         pane.add(row2);     
         row3.add(payment);   
         row3.add(owe);       
         pane.add(row3);      
         owe.setEditable(false);  
                 //Scroll Pane added to JFrame     
          row4.add(amortization);      
          chart.setEditable(false); 
          row4.add(scroll);   
          pane.add(row4);     
                //Executable Button- Clear,Exit, Calculate 
          JPanel row5 = new JPanel();
          JButton clear = new JButton("Clear");  
          clear.addActionListener(this);     
          row5.add(clear); 
          pane.add(row5); 
          JButton exit = new JButton("Exit"); 
          exit.addActionListener(this);    
          row5.add(exit);      
          Cal.setEnabled(false);  
          Cal.addActionListener(this); 
          row5.add(Cal);       
          pane.add(row5);   
          setContentPane(pane);   
          setVisible(true); 
      }                    //End of constructor   
        private void calculate()
          String loanAmount = money.getText(); 
             if(loanAmount.equals(""))      
               return;      
               double P = Double.parseDouble(loanAmount);     
               int y;     
               double r;    
             if(altchoice.isSelected())   
              if(YR.getText().equals("") || RT.getText().equals(""))  
                 return;        
               y = Integer.parseInt(YR.getText());     
                r = Double.parseDouble(RT.getText());   
               else     
                  int index = mortgage.getSelectedIndex();  
                  if(index == 3)         
                  return;          
                  int[] terms = { 7, 15, 30 };     
                  double[] rates = { 5.5, 5.35, 5.75 }; 
                  y = terms[index];  
                  r = rates[index];  
                  double In = r / (100 * 12.0);  
                  double M = P * (In / (1 - Math.pow(In + 1, -12.0 * y)));
                  owe.setText(currency.format(M));      
                         //Column Titles for Text Area     
           chart.setText("Pmt#\tPrincipal\tInterest\tBalance\n");  
         for (int i = 0; i < y * 12; i++)     
      {            double interestAccrued = P * In;     
                   double principalPaid = M - interestAccrued;          
                   chart.append(i + 1 + "\t" + currency.format(principalPaid)           
                                    + "\t" + currency.format(interestAccrued)     
                                          + "\t" + currency.format(P) + "\n");      
                    P = P + interestAccrued - M;   
         public void itemStateChanged(ItemEvent ie) 
      {        int status = ie.getStateChange();    
           if (status == ItemEvent.SELECTED)     
               mortgage.setEnabled(false);  
               YR.setEditable(true); 
               RT.setEditable(true);   
               Cal.setEnabled(true);  
            else 
            mortgage.setEnabled(true); 
            YR.setEditable(false);    
            RT.setEditable(false);     
           Cal.setEnabled(false);     
      public void actionPerformed(ActionEvent ae)//Calculations and Button executions
          String command = ae.getActionCommand();  
                  // Exit program      
           if (command.equals("Exit"))   
            System.exit(0);
                  // Cal button 
          if (command.equals("Calculate") || command.equals("mortgage")) 
              calculate();      
                 // Clear fields  
          if (command.equals("Clear")) 
             money.setText(null);
             mortgage.setSelectedIndex(3); 
             owe.setText(null);   
             chart.setText(null); 
    }             //End actionPerformed 
       public static void main(String args[]) throws IOException
               new CalcTest();
    [/Code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Here is the code again
    import java.io.;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import java.math.*;
    public class CalcTest extends JFrame implements ActionListener, ItemListener
    public JMenuBar createMenuBar()
            JMenuBar mnuBar = new JMenuBar();
            setJMenuBar(mnuBar);
                //Create File & add Exit
            JMenu mnuFile = new JMenu("File", true);
            mnuFile.setMnemonic(KeyEvent.VK_F);
            mnuFile.setDisplayedMnemonicIndex(0);
            mnuBar.add(mnuFile);
            JMenuItem mnuFileExit = new JMenuItem("Exit");
            mnuFileExit.setMnemonic(KeyEvent.VK_F);
            mnuFileExit.setDisplayedMnemonicIndex(1);
            mnuFile.add(mnuFileExit);
            mnuFileExit.setActionCommand("Exit");
            mnuFileExit.addActionListener(this);
            JMenu mnuFunction = new JMenu("Function", true);
            mnuFunction.setMnemonic(KeyEvent.VK_F);
            mnuFunction.setDisplayedMnemonicIndex(0);
            mnuBar.add(mnuFunction);
           JMenuItem mnuFunctionClear = new JMenuItem("Clear");
           mnuFunctionClear.setMnemonic(KeyEvent.VK_F);
           mnuFunctionClear.setDisplayedMnemonicIndex(1);
           mnuFunction.add(mnuFunctionClear);
           mnuFunctionClear.setActionCommand("Clear");
           mnuFunctionClear.addActionListener(this);
            // Fields for Principle 
      JPanel row1 = new JPanel();
      JLabel dollar = new JLabel("How much are you borrowing?"); 
      JTextField money = new JTextField("", 15);
            // Fields for Term and Rate
       JPanel row2 = new JPanel();
       JLabel choice = new JLabel("Select Year & Rate:");
       JCheckBox altchoice = new JCheckBox("Alt. Method");
       JTextField YR = new JTextField("", 4);
       JTextField RT = new JTextField("", 4);
           //Jcombobox R=rate,Y=year
       String[] RY =  {   
            "7 years at 5.35%", "15 years at 5.5 %", "30 years at 5.75%", " "  
      JComboBox mortgage = new JComboBox(RY);
                // Fields for Payment   
        JPanel row3 = new JPanel(); 
        JLabel payment = new JLabel("Your monthly payment will be:");
        JTextField owe = new JTextField(" ", 15); 
              //Scroll Pane and Text Area
       JPanel row4 = new JPanel();
       JLabel amortization = new JLabel("Amortization:");
       JTextArea chart = new JTextArea(" ", 7, 22); 
       JScrollPane scroll = new JScrollPane(chart, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,  
                                               JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);  
        StringBuffer amt = new StringBuffer();
        Container pane = getContentPane(); 
        FlowLayout flow = new FlowLayout(FlowLayout.LEFT);
        JButton Cal = new JButton("Calculate"); 
        NumberFormat currency = NumberFormat.getCurrencyInstance();  
      public CalcTest() 
               // Title and Exit of JFrame  
         super("Mortgage and Amortization Calculator"); 
         setSize(475, 328);  
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
                //JFrame layout      
         pane.setLayout(flow);     
               //Input output fields added to JFrame  
         row1.add(dollar);    
         row1.add(money);   
         pane.add(row1);    
         mortgage.setSelectedIndex(3);   
         mortgage.addActionListener(this);    
         mortgage.setActionCommand("mortgage");
         row2.add(altchoice);     
         altchoice.addItemListener(this);  
         row2.add(choice);     
         YR.setEditable(false);    
         RT.setEditable(false);     
         row2.add(YR);     
         row2.add(RT);      
         row2.add(mortgage);    
         pane.add(row2);     
         row3.add(payment);   
         row3.add(owe);       
         pane.add(row3);      
         owe.setEditable(false);  
                 //Scroll Pane added to JFrame     
          row4.add(amortization);      
          chart.setEditable(false); 
          row4.add(scroll);   
          pane.add(row4);     
                //Executable Button- Clear,Exit, Calculate 
          JPanel row5 = new JPanel();
          JButton clear = new JButton("Clear");  
          clear.addActionListener(this);     
          row5.add(clear); 
          pane.add(row5); 
          JButton exit = new JButton("Exit"); 
          exit.addActionListener(this);    
          row5.add(exit);      
          Cal.setEnabled(false);  
          Cal.addActionListener(this); 
          row5.add(Cal);       
          pane.add(row5);   
          setContentPane(pane);   
          setVisible(true); 
      }                    //End of constructor   
        private void calculate()
          String loanAmount = money.getText(); 
             if(loanAmount.equals(""))      
               return;      
               double P = Double.parseDouble(loanAmount);     
               int y;     
               double r;    
             if(altchoice.isSelected())   
              if(YR.getText().equals("") || RT.getText().equals(""))  
                 return;        
               y = Integer.parseInt(YR.getText());     
                r = Double.parseDouble(RT.getText());   
               else     
                  int index = mortgage.getSelectedIndex();  
                  if(index == 3)         
                  return;          
                  int[] terms = { 7, 15, 30 };     
                  double[] rates = { 5.5, 5.35, 5.75 }; 
                  y = terms[index];  
                  r = rates[index];  
                  double In = r / (100 * 12.0);  
                  double M = P * (In / (1 - Math.pow(In + 1, -12.0 * y)));
                  owe.setText(currency.format(M));      
                         //Column Titles for Text Area     
           chart.setText("Pmt#\tPrincipal\tInterest\tBalance\n");  
         for (int i = 0; i < y * 12; i++)     
      {            double interestAccrued = P * In;     
                   double principalPaid = M - interestAccrued;          
                   chart.append(i + 1 + "\t" + currency.format(principalPaid)           
                                    + "\t" + currency.format(interestAccrued)     
                                          + "\t" + currency.format(P) + "\n");      
                    P = P + interestAccrued - M;   
         public void itemStateChanged(ItemEvent ie) 
      {        int status = ie.getStateChange();    
           if (status == ItemEvent.SELECTED)     
               mortgage.setEnabled(false);  
               YR.setEditable(true); 
               RT.setEditable(true);   
               Cal.setEnabled(true);  
            else 
            mortgage.setEnabled(true); 
            YR.setEditable(false);    
            RT.setEditable(false);     
           Cal.setEnabled(false);     
      public void actionPerformed(ActionEvent ae)//Calculations and Button executions
          String command = ae.getActionCommand();  
                  // Exit program      
           if (command.equals("Exit"))   
            System.exit(0);
                  // Cal button 
          if (command.equals("Calculate") || command.equals("mortgage")) 
              calculate();      
                 // Clear fields  
          if (command.equals("Clear")) 
             money.setText(null);
             mortgage.setSelectedIndex(3); 
             owe.setText(null);   
             chart.setText(null); 
    }             //End actionPerformed 
       public static void main(String args[]) throws IOException
               new CalcTest();

Maybe you are looking for

  • All 3rd party apps Crash - Already Restored FIVE Times to date - Apple fix?

    Since the 2.0 update my apps have had constant crashing issues. Usually after opening 8 or so apps in a row (very easy to do when downloading and testing many apps) ... Powering down and powering back up usually helped/fixed the issue, if temporarily

  • Default Purchasing organisation for Purcashing Document type

    Dear Gurus, I need to make default Purchasing organisation for Purcashing Document type. How to configue this. Please advice me. Thanks RS

  • Back Camera Failed to launch

    I have an iphone 5 which i been using it for two weeks, the camera was working fine and everything is okay, from 2 days ago i had a problem with the back camera, it is not launching and it freeze the phone everytime i open it, any help please !

  • Regarding unicode problem

    Hi friends, Iam converting report programs from 4.6 to ECC 6.0. Error: The type of database table and work area (internal table) I_TAB are not unicode convertible. Statements: table declaration: DATA: BEGIN OF I_TAB OCCURS 100,         MANDT   TYPE Z

  • Automatic imports for javafx files?

    I've been using the Netbeans JavaFX plugin for the past few days. I can't figure out how to get Netbeans to add necessary import statements to JavaFX files like it does with normal Java classes. For example, I in the following simple fx file, I need