Investment Program:

HELP!!!!! I have fixed everything as far as my errors go. These are the last 2. ANYONE PLEASE HELP!!!
Here are the errors and the code:
InvestUnlimitedDH.java [68:1] No method found matching setData(int,int)
myUse.setData (21, c);
^
InvestUnlimitedDH.java [72:1] No method found matching setData(int,int)
myUse.setData (248, c);
^
2 errors
import java.text.DecimalFormat;
import javax.swing.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
public class InvestUnlimitedDH
public static void main (String args [])
InvestGui myInvest = new InvestGui();
myInvest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
class InvestGui extends JFrame implements ActionListener
JComboBox box;
JButton button1, button2;
JRadioButton rbutton1, rbutton2;
//JTextArea
//ListText
public void Invest()
Container c = getContentPane();
c.setLayout(new FlowLayout());
String []names = {"Disney", "Black and Decker", "OutBack Steakhouse"};
box = new JComboBox (names);
c.add(box);
button1 = new JButton ("Chart");
button2 = new JButton ("Average");
rbutton1 = new JRadioButton ("Month");
rbutton2 = new JRadioButton ("Year");
c.add(button1);
c.add(button2);
c.add(rbutton1);
c.add(rbutton2);
box.addActionListener(this);
button1.addActionListener(this);
button2.addActionListener(this);
setSize (200, 150);
setVisible (true);
public void actionPerformed (ActionEvent event)
if (event.getSource() == button2)
int c = box.getSelectedIndex();
UseDataClass myUse = new UseDataClass();
if(rbutton1.isSelected())
myUse.setData (21, c);
double y = myUse.getAvg();
else
myUse.setData (248, c);
//double y = myUse.getAvg();
else ;
class GraphicGui extends JFrame
public void paint (Graphics g)
super.paint(g);
//the outer rectangle
g.drawRect(30,30,478,350);
//the y value gridlines
g.drawLine(30,80,508,80);
g.drawString("60",15,85);
g.drawLine(30,130,508,130);
g.drawString("50",15,135);
g.drawLine(30,180,508,180);
g.drawString("40",15,185);
g.drawLine(30,230,508,230);
g.drawString("30",15,235);
g.drawLine(30,280,508,280);
g.drawString("20",15,285);;
g.drawLine(30,330,508,330);
g.drawString("10",15,335);
//the array holds the data in reverse order - most recent data at top
//we want to graph oldest to newest (left to right)
//so array is accessed from the end to zero, i allows us to place data
//left to right, while reading array from bottom up
int i = 0;
for (int count = data.length-1; count >=0; count--)
//x = position from left always starting 30 pixels out(1.9 is used to
//spread the data across window
int x = (int)(30+(i*1.9));
//380 is the location of the bottom line of rectangle, measure up from
//380 to determine location of where price should go (5.0 is used to //spread data correctly)
int y = (int)(380-(data[count]*5.0));
g.fillOval(x,y, 3, 3);
i++;
class DataClass
//dataList has three rows and 248 columns of doubles
private static double[][]dataList = new double [3] [100]
//these are the names of the files that hold the data
private static String[]fileNames = {"Disney", "Black and Decker", "OutBack Steakhouse"};
public static void setData()
try
for(int index = 0; index < fileNames.length; index++)
BufferedReader dat = new BufferedReader(new FileReader("a:\\" + fileNames[index]));
//inner loop will go through 248 times-the length of the file
for (int count = 0; count < 100; count ++)
//reads in a string from file and converts to a double and stores in the array
dataList[index][count] = Double.parseDouble(dat.readLine());
//close file before opening next file
dat.close();
catch(FileNotFoundException e)
System.out.println(e);
catch(IOException x)
System.out.println(x);
//called by method setData in UseDataClass
public static double[][]getData()
return dataList;
class UseDataClass
//t = the timeframe and comp = the company
int t, comp;
//x = the dataList
double[][]x = DataClass.getData();
private double [][]theData;
//gets the array from the DataClass
public int setData ()
theData = DataClass.getData(month, year)
company number t = time; comp = co;
setData (int time, int co);
findMin();
//this method finds out the smallest number in each array
void findMin()
//set minimum = to first value in array
double min = theData[comp][0];
for int count = 0; count < theData[comp].length; count ++)
if (theData[comp][count] < min)
//found new minimum
min = theData[index][count];
public double getAvg()
month = t * 21;
year = t * 248
return result;

You don't have a setData(int, int) method defined, only a setData() method that takes no arguments.

Similar Messages

  • Assign Investment program Position for IW31 through exit/BADI

    Hi
    My requirement is, I've to assign investment program details to Maintainence order (IW31) in creation mode through enhancement. I am able to do so in change mode using the FM "AIPP_ALLOCATE_POSITION_DARK", but when I use the same FM in creation mode it is throughing "Update Termination " error.
    Please let me know is there  any BADI/User Exit/Enhancement Point to achieve the same.
    Regards,
    Chandu
    Edited by: Poorna Chandrasekhar on Nov 13, 2009 11:10 AM

    I've created enhancement point in the FM CO_ZV_ORDER_POST

  • Archiving error message - order linked to old investiment program

    During CO-Order object archiving, error message saying that order is linked to investment program. Check it is an 2001 old investment program. Tried, but could not settle balance/order. Is there any CO flag to allow access to 2001 investment program?
    Thanks.

    During CO-Order object archiving, error message saying that order is linked to investment program. Check it is an 2001 old investment program. Tried, but could not settle balance/order. Is there any CO flag to allow access to 2001 investment program?
    Thanks.

  • Copy Internal Order between Investment Programs

    We have a investment program in approval year 2014  which has 1 Internal Order assigned to it and the budget has been fully allocated.  We want to budget against this internal
    Now we have created a new investment program in approval year 2015 and want to the use the internal order(measure from the invesment program in 2014. We have tried the following:
    IM22 Change program - assignments add internal order get error message "There is already an existing assignment to program position 2014"
    IMCAOV Budget Carryfoward - No impact on the measure as there is no budge to carry forward.
    Can anyone advise how we can budget on the same Internal Order in the new fiscal year ?
    thanks
    Joe

    Hello,
    the little late answer to your question is the table IMZO. It links the investment program / positions to internal orders. I found this thread while searching for my own problem which is quite the same:
    In my WebDynpro for ABAP investment planning tool I'm using the FM BAPI_INTERNALORDER_CREATE to create internal orders as a result of the planning process. This BAPI is similiar to the transaction ko01 except that I can't assign an investment program / position to my internal order (this is also pointed out in the help to the BAPI/FM).
    But how can I assign an investment program / position to my internal order NOT using an ABAP insert/update statement on the table IMZO (which links the internal orders and investment programs/positions).
    Does anybody know a FM or BAPI I could use? I really don't like the idea of a self made insert/update into a sap table...
    Thank you in advance,
    Christian Bracht

  • Planned costs for investment program

    I am having a problem configuring planned costs for inv program positions, which should reflect as the planned cost for the investment measure being created.
    Appropriation request is being used in the scenario to create measures automatically. these measures will require to have the same plan values as the position to which they are assigned.
    Please help.

    The Measure is the cost collector through which spending will be controlled & measured, which is a key integration object with IM.
    WBS Elements are the collectors associated with PS, whereas IO’s are cost collectors found in the CO module.
    The Measure is always assigned to the lowest program position within IM. Program Position is found on Investment Program Hierarchy at its lowest level which may relate to a capital project or project component.
    Hence accordingly the appropriation request serves as a tool to plan the spending and which is therefore upon approval becomes the Measure for the IO or WBS.

  • Assign Investment Program/Position to Internal CO Order

    Hi Experts,
    I'm looking for a BAPI / FM that assigns Investment Program to a CO Order.
    Thanks in advance.
    Enrique

    Thanks for your answer Raj, but what i'm looking for is a BAPI (or FM) that I can use from an external application (Visual Composer) where It will be possible to assign the investment program to a CO Order.
    There are some BAPI's to create Orders but I can't find a BAPI for that.
    Thanks asgain,
    Enrique

  • Not possible to delete link investment program position from Appropriation request

    Dear specialists,
    We have a problem with deleting a linked investment program position in an appropriation request (IMA3, IMA11 or IMA12).
    We could edit some of the appr.req.'s but a few give an error.
    Steps done:
    We deleted the status BUDG from the linked projects (budgets deleted and OPSX for deletion of status).
    The we run the IM27_repeat.
    For the most of the appr.req.'s the linke was removed (table IMZO).
    For a few of our req.'s the link is not removed so that we can't link the new progr.pos. to this appr.req.
    Regards,
    Marcel

    Hello Marcel,
    Please check Customizing of the investment program type under 'assignable operative objects' in t-code OIT3 or in following path
    SPRO --> Investment Management --> Investment Programs --> Master Data --> Define Program Types
    Also check in following SAP note
    130216 - Program position not allowed for measure
    Regards
    Tushar

  • Budget Return to the Investment Program (module IM)

    Hi All,
    I need your advice regarding my case :
    *. My company use PS (project and allocate the budget in WBS) and also Investment program.
    *. There are some unused budget in 2005 and 2005 as well as some PR/PO in 2005,2006 (open commitment). They want their budget can be used in 2007 thru investment prog or in other words, the unused budget can be return to the pool/investment prog.
    *. The company policy doesnot allow to do the carry forward budget.
    Plz correct me / give some ideas about my plan :
    1. I suggest them to force close all PO 2005/2006 on this year . as well as delete all PR. Then, close the project/wbs . Therefore, there is no posting anymore in particular project/wbs.
    2. Automatically,there will be no commitment. All money will back to available budget in 2005/2006.
    3. I suggest them to do the budget return (IM52) to the investment program.
    4. As a result, the unused budget in 2005/2006 will be back to the pool/investment program and can be distributed to 2007.
    Do you think this one a good solution ? plz give me another ideas regarding this case. Really appreciate.

    Hi,
    you might use budget carryforward.
    Check out IMCAOV in IM and CJCF / CJCO in PS.
    Cheers
    Hein

  • Changes to investment program

    I've made a few changes to the investment program, throguh t-code IM05. I can see the changed made through t-code IMV2, but I cannot select the measure code to see those changes. That is, I can select the position ID of an investment program and see what happenede to it, but not the project number.
    My question is, does anybody know if there is report which tells me the reassigments of measures made? That way I could answer this question: Where has the project xxxxx been assigned in the last year?
    Thank you all

    HI,
    db profile 000000000005 doesn't exist....
    000000000001     Std profile: structure overview (desc.)
    000000000002     Std profile: structure overview (sched)
    000000000003     Std profile: structure overview (d/s)
    000000000004     Std profile: structure overview (d/s)
    1                             Std profile: structure overview (desc.)
    2                             Std profile: structure overview (sched)
    3                             Std profile: structure overview (d/s)
    4                             Std profile: structure overview (d/s)
    SAPPS_EV0001     Std profile: earned value analysis
    I've tried all and , unless I'm doing something wrong, I don't get it....

  • Creation of Investment program and budget upload

    Hi,
    I need to create a investment program using th data in a excel file. Once the structure is uploaded, I need to do the budget upload. Is there any BAPI for achieving this functionality. Kindly share your valuable inputs if you have worked on similar kind of requirement.
    Regards,
    Mamta

    To find out bapis , go to BAPI transaction - take the alphabetical order tab - find your business object ( budget ) - on the right side you will see the tools option - create bapi select and click the search button.
    This will give you all the bapis associated with that business object.
    Also searching SE37 with BAPI_EXPENDITURE* will be good idea.
    Mathews

  • Validation on Investment program position

    Dear All,
    In current configuration, a  WBS element of a project is linked to an Investment program position.     
    When saving reservations for materials, Can we do a validation for WBS element specified in the Proc. Param of a material and the Investment program position.
    Please let me know whether this can be achieved without a customization.
    Thanks

    I've used both and never had any issues.
    But be thoughtful of coding masks (of AR and WBS) in case you use appropriation request creation followed by WBS/project creation.
    Regards
    Sreenivas

  • Investment Program in Budget Profile

    Hi Experts,
    I would like to know on how to create and assign an Investment program in Budget profile.
    Is an investment program mandatory for Investment Project and for New Product Development Projects?
    Will there be any implication if we do not assign an Investment program in Budget profile settings in OPS9.
    Please suggest & advise.
    Thanks & Regards,
    Kabir

    Hi Virendra,
    Thank you for the reply.
    Please clarify this in your 2nd sentence, "if you do wnat to budget for opex in your project" . Is it do or do not want to?
    Awaiting your reply.
    Regards,
    Kabir

  • How to change Investment program position assignd to a wbs element

    Hi all,
    Could you please help me to find out which bapi can do necesary changes for a particular wbs element like investment program position and year.
    The Investment position and year can be showed in cj02 transaction for a particular wbs element.
    Thanks in advance,
    Sourya Prakash.

    Hi,
    You can use BAPI_PROJECTDEF_GETDETAIL to get relevant details. If that does not serve, you can go through the list available on this link ---
    http://wiki.sdn.sap.com/wiki/display/PLM/HowtouseBAPIinProjectSystem+Module
    Thanks.
    Kumar Saurav.

  • Validating department in WBS element code with dept in Investment program

    Hello Guru's,
    While assigning Investment program, in WBS  in CJ20N or CJ11, in our current business process we need to to validate the Department code in both WBS code and Investment program code.
    At present we have planned to used same department code in WBS Code and Investment program code.
    Need to to do this enhancement for our current project.
    Please suggest the way to do it.
    Regards,
    Amlan

    Hi,
    I assume this "Department Code" is one of your customer specific field that is made available both in WBS as well as the iM program. If that is the case then either you can use any of the user exits for the WBS Elements to write your code or create a validation for the WBS and put your code in one of those exits invalidation.
    Regards
    Sreekanth

  • Carry Forward of Budget in Investment Program

    Dear Experts
    I am trying to carry forward the budget of the Investment program from FY 2010 to FY 2011. I have used IM27 for copying the program structure and Internal Orders. The Budget Values, Commitments of IO has been carried forward but I am not able to carry forward the budget at the Position ID and NODE Level.
    Kindly help.
    Vikash

    Hello,
    You can run the BPCARRY01 program to copy the most recent budget structure to a target year. In doing so, you no longer have to maintain BS elements that already exist.
    You execute the program, under Accounting - Public Sector Management  - Funds Management - Master Data - Budget Structure - Former Budgeting  -Transfer from Previous Year. This is, as Eli said, FM9Z.
    Helene

  • How to release investment program  budget

    Hi expert:
            We distribute original  budget  in investment program using Tcode Im32,  but our customer  require to release
    original  budget ,  because  two position require to approve this budget.  
             We use Tcode Im52 to distribute budget to project,  our customer also approve this operation. but i donot know
    whether the system provide standand release function.
            how to  realize this two functions?     thank you

    You are distributing  budget from Investment prog.  to project.
    In IM there is not concept of Budget release. If you want to control your budget at Release  ( which is called Active budget control ) you have to does the same in PS.
    Your flow would be like that
    IM32 :Change origional Prog. budget
    IM52 : Budget distribution from Prog to measue i.e. Project/ WBS.
    CJ32: Change release Budget. ( so, sys will check budget against this release budget ) 
    For using Release budget funcation you have to activate avalability control in your Budget profile (OPS9 txn ) for the Release & assign that budget profile to budget profile.
    Refer this online material
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/c4/5dbfa8e7cc11d496eb0000e835339d/frameset.htm
    Regards
    Nitin

Maybe you are looking for

  • How to delete an operation from order using the bapi

    Can somebody please tell me how to delete an operation from order using the bapi BAPI_ALM_ORDER_MAINTAIN. Following was the test data for the BAPI. 000000 OPERATION DELETE 0000040052810070 000000 SAVE 0000040052810070 Even I tried entering the operat

  • Why custom logon error messages doesn't work in WAS 7.0, EP 7.0?

    I managed to get custom error messages in WAS 6.40 / EP 6.0. I'm using JAAS custom Login module for user authentication and from there different Login Exceptions are thrown. I have modified logon.par file to display different error messages like "Log

  • Missing files after powering down and back up

    I turned off my new Air for the first time in weeks. When I powered back up I was and am missing alot of  open office documents and pictures I had downloaded and saved. Please help these aren't files I can lose.

  • Sharing Photos

    Is it possible to share an album to selected people over the internet? In other words, make an album of my son, share it with my mom so this new album shows up in her iPhoto to view. I know I can post it online in several ways, but it would be cool t

  • PO Rounding Issue

    I have an issue with PO’s rounding up the unit when in days and subsequently calculating the value of the PO based on the rounded up figure. In summary, when a half a day is selected on shopping cart for services, the shopping cart calculates the val