Reg:-Help in Inventory
Hi all,
How to know inventory org assosicated to Master Org in Inventory. Any Table or View are capturing this details . Help me on this.
Thanks in advace
--Sandy
Reg: Inventory Help
Similar Messages
-
Dear Gurus,
Good Morning everybody,
My issue is like this,
We have a inventory number range in calendar year basis; we have changed the number ranges on 01st Jan 2008 and assign new number ranges for 2008. Now we got request from plant to do the physical inventory. When I saved MI01 document created as 2007 number range.
Ex - I have assigned current number for 2008 1xxxxxx100 but system is taking 1xxxxxx50 is new number and I am receiving mail like this
Update was terminated
System ID.... PRD
Client....... 400
Transaction.. MI01
Update key... 477FF86EECD30517E1000000C0A80197
Generated.... 07.01.2008, 09:38:04
Completed.... 07.01.2008, 09:38:05
Error info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC.
Why system is taking 2007 number range. How can I resolve this issue?
Reg/ Shankar G.
Edited by: Shankar G on Jan 7, 2008 5:33 AMHi Shankar,
Can you do the following check in production cleint:
1. In the place where you configured the new number range, can you check the old number range is upto what year.
ie. in t-code SNUM for object MATBELEG check the number range year.
Example for the 1xxxxxx50 number range if the year is 2007 then till 2007 calender year is over the same number range will be picked up.
In such a case, you have to delete the 2007 record itself, and create a new record with year 2008 and give the new number range.
Please let me know if the above update is not clear to you. give me call at 1-408-368-1370 if you need further help.
Thx,
MJ -
Need help with Inventory System
I am trying to throw together a semi-elegant inventory
viewing system for a web site I am creating. The current website is
going to be scrapped and remade relatively soon, so I really just
want a quick and dirty solution. As such, I have been using some
spry with xml datasets. I happened upon an article
here
that clued me in to a particularly interesting method of presenting
the data, so I am attempting a similar design, along with code from
spry samples (lots of cut-n-paste unfortunately, which is probably
a major reason why I have so many problems). Anyway, here is the
relevant info:
Right now I have folders for each category, with an xml file
for each size category. I arranged it this way, because I was
originally going to use straight html files for each size category
and in each folder, obviously not very practical. I played around
with the idea of putting all sizes into one file and letting some
spry+xml magic sort it out, but since I can't even get this to work
I haven't really tried it. If you experts would clue me in as to
which version might be more efficient or if you have any other
ideas please feel free to put me in my place.
Before I go any further, my main problem is the third line of
the first piece of code, I'm having trouble getting the dsStock xml
to load properly. The original example I cited above was using
Coldfusion, but I guesstimated that it wouldn't be a problem to
just load some straight xml files. Before I go any further I would
at least like to know if what I am attempting is possible.
Code to load in data for menus, category selection, and
actual inventory etc........
quote:
var dsCategories = new Spry.Data.XMLDataSet("diamond.xml",
"diamonds/diamond");
var dsSize = new Spry.Data.XMLDataSet("size.xml",
"sizes/size");
var dsStock = new
Spry.Data.XMLDataSet("{dsCategories::@id}/{dsSize::name}.xml",
"inventory/product");
diamond.xml
quote:
<?xml version="1.0" encoding="utf-8"?>
<diamonds>
<diamond
id="AS"><name>Asscher</name><img>../img/diamond/thumb/asscher_diamond_chicago.jpg</img></ diamond>
<diamond
id="CU"><name>Cushion</name><img>../img/diamond/thumb/cushion_diamond_chicago.jpg</img></ diamond>
</diamonds>
size.xml
quote:
<?xml version="1.0" encoding="utf-8"?>
<sizes>
<size><name>0.70-0.99</name></size>
<size><name>1.00-1.49</name></size>
</sizes>
snip of some inventory
quote:
<?xml version="1.0" encoding="utf-8"?>
<inventory>
<product
id="B801-508"><shape>Asscher</shape><weight>0.7</weight><color>G</color>
<clarity>VVS2</clarity><depth>71.1</depth><table>61</table><flo>None
</flo><polish>Excellent</polish>
<symmetry>Very
Good</symmetry><dim>4.97x4.77x3.39</dim><price>2592.1</price>
</product>
<product
id="B800-125"><shape>Asscher</shape><weight>0.7</weight><color>G</color>
<clarity>VS1</clarity><depth>68.2</depth><table>58</table><flo>None
</flo><polish>Very Good</polish>
<symmetry>Very
Good</symmetry><dim>4.93x4.78x3.26</dim><price>2366.7</price>
</product>
</inventory>
Here is the actual code in the site (this seems to work out
alright). I haven't rewritten the actual inventory portion yet,
since I can't really get it to load properly. If I can get the xml
I know that I can get it on the page.
quote:
<ul spry:region="dsCategories"
spry:repeatchildren="dsCategories">
<li class="product" spry:selectgroup="1"
spry:select="selected" spry:hover="hover"
spry:setrow="dsCategories">{dsCategories::name}</li>
</ul>
<ul spry:region="dsSize" spry:repeatchildren="dsSize">
<li class="product" spry:selectgroupd="2"
spry:select="selected" spry:hover="hover"
spry:setrow="dsSize">{dsSize::name}</li>
</ul>
Sorry for the long post, but thanks for taking the time to
give it a read and see if you can help me out. I will be eternally
grateful.Hi StevenMig,
I'm not seeing anything obvious. Have you tried loading your
XML files directly to see if there are errors in the XML? Is your
server serving up XML files with a Content-Type of text/xml or
application/xml?
If you post a sample page, perhaps me or someone else on the
forum can take a look?
--== Kin ==-- -
Help with Inventory Program Buttons & images
I'm supposed to have buttons that move between the items in my program individually showing them one by one and also going to the first item when the last one is reached and vice versa, but I cannot get the buttons to to show even show up. I'm also having problems getting any type of image to show up. Any help on this would be appreciated.
My code is below
import java.awt.GridLayout;
import java.text.NumberFormat;
import java.util.Arrays;
import javax.swing.*;
//Begin Main
public class InventoryProject {
@SuppressWarnings("unchecked")
public static Product[] sortArray(Product myProducts[])
//Comparator comparator = null;
ProductComparator comparator = new ProductComparator();
Arrays.sort(myProducts, comparator);
return myProducts;
public static double CalculateInventory(Product myProducts[])
double total = 0;
for (int i = 0; i < myProducts.length; i++)
total += myProducts.calculateInventory();
return total;
public static void main (String[] args) {
Product products[] = new Product.Supplier[5];
//Create 5 Product Objects
Product.Supplier invItem0 = new Product.Supplier("The Matrix (DVD)", 100001, 12, 15.99, "Warner Brothers");
Product.Supplier invItem1 = new Product.Supplier("The Matrix Reloaded (DVD)", 100002, 9, 17.99, "Warner Brothers");
Product.Supplier invItem2 = new Product.Supplier("The Matrix Revolutions (DVD)", 100003, 27, 18.99, "Warner Brothers");
Product.Supplier invItem3 = new Product.Supplier("300 (DVD)", 100004, 5, 18.99, "Warner Brothers");
Product.Supplier invItem4 = new Product.Supplier("Harry Potter and the Sorcerers Stone (DVD)", 100005, 10, 15.99, "Warner Brothers");
//products array
products[0] = invItem0;
products[1] = invItem1;
products[2] = invItem2;
products[3] = invItem3;
products[4] = invItem4;
products = sortArray(products);
// Output Product Object
JTextArea textArea = new JTextArea();
for (int a = 0; a < products.length; a++)
textArea.append(products[a]+"\n");
textArea.append("\nTotal value of the inventory is "+new java.text.DecimalFormat("$0.00").format(CalculateInventory(products))+"\n\n");
JButton prevBtn = new JButton("Previous");
prevBtn.setEnabled(false);
JButton nextBtn = new JButton("Next");
JPanel p = new JPanel(new GridLayout(1,2));
p.add(prevBtn); p.add(nextBtn);
JFrame frame = new JFrame();
frame.getContentPane().add(new JScrollPane(textArea));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("DVD Inventory");
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
/* for (int a = 0; a < products.length; a++)
System.out.println(products[a]); //use the toString method that you have defined in your Product class to print out the product information.
System.out.println("Total Value of The Inventory: " + nf.format (CalculateInventory(products)));
private String name;
private int number;
private int unitCount;
private double unitPrice;
// public String SupplierName;
// public static double calculateInventory;
//Constructor
public Product (String name, int number, int unitCount, double unitPrice)
setName(name);
setNumber(number);
setUnitCount(unitCount);
setUnitPrice(unitPrice);
// get and set methods for Number attribute
public void setNumber(int itemnumber){
number = itemnumber;
public int getNumber(){
return number;
// get and set methods for Name attribute
public void setName(String names){
name = names;
public String getName(){
return name;
// get and set methods for UnitCount attribute
public void setUnitCount(int count){
unitCount = count;
public int getUnitCount(){
return unitCount;
// get and set methods for UnitPrice attribute
public void setUnitPrice(double price){
unitPrice = price;
public double getUnitPrice(){
return unitPrice;
// get and set Total Inventory method
public double calculateInventory()
return getUnitPrice() * getUnitCount();
public String toString () {
return "Item Name: " + name + "\n" + "Item Inventory Number: " + number + "\n" + "Item Unit Count: " + unitCount + "\n" + "Item Unit Price: " + unitPrice + "\n" ;
public void Supplier() {
// TODO Auto-generated method stub
return;
// public Supplier getSupplierName() {
// // TODO Auto-generated method stub
// return null;
static class Supplier extends Product
//private double restockFee;
private String supplierName;
NumberFormat nf = NumberFormat.getCurrencyInstance();
public Supplier(String Name, int Number, int UnitCount, double UnitPrice, String SupplierName)
super(Name, Number, UnitCount, UnitPrice);
setSupplierName(SupplierName);
//setRestockFee(restockFee);
this.supplierName = SupplierName;
//get and set methods for Supplier attribute
public String setSupplierName(String supplier)
supplierName = supplier;
return supplierName;
public String getSupplierName()
return supplierName;
public double calculateRestockFee()
return (((getUnitPrice()) * (getUnitCount())) * 0.05);
public double calculateInventory()
return ((getUnitPrice() * getUnitCount()));
public String toString ()
return "Item Name: " + getName() + "\n" + "Item Inventory Number: " + getNumber() + "\n" + "Item Unit Count: " + getUnitCount()
+ "\n" + "Item Unit Price: " + nf.format(getUnitPrice()) + "\n" + "Inventory Value: " + nf.format(calculateInventory()) + "\n"
+ "Supplier Name: " + getSupplierName() + "\n" + "Restock Fee: " + nf.format(calculateRestockFee()) + "\n";
public int compareTo(Product arg0)
// TODO Auto-generated method stub
return (this.name.compareTo(arg0.getName()));
}public class ProductComparator implements java.util.Comparator
public int compare(Object o1, Object o2)
if(o1 == null) return -1;
if(o2 == null) return 1;
Product p1 = (Product) o1;
Product p2 = (Product) o2;
String s1 = p1.getName();
String s2 = p2.getName();
int compVal = s1.compareTo(s2);
return compVal;The program does work because I can get the content of my array to show in a GUI the only problem is the buttons aren't showing up in the GUI which is what I'm having a problem with. I also tried adding the panel to the frame but it didn't do any good either so maybe I'm not doing it right although when I compile I get 0 errors. What's the link to the swing tutorial?
JTextArea textArea = new JTextArea();
for (int a = 0; a < products.length; a++)
textArea.append(products[a]+"\n");
textArea.append("\nTotal value of the inventory is "+new java.text.DecimalFormat("$0.00").format(CalculateInventory(products))+"\n\n");
JButton prevBtn = new JButton("Previous");
prevBtn.setEnabled(false);
JButton nextBtn = new JButton("Next");
JPanel panel1 = new JPanel(new GridLayout(1,2));
panel1.add(prevBtn); panel1.add(nextBtn);
JFrame frame = new JFrame();
frame.getContentPane().add(new JScrollPane(textArea));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("DVD Inventory");
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.add(panel1);Edited by: Morepheus on May 20, 2009 12:55 AM
Edited by: Morepheus on May 20, 2009 12:58 AM
Edited by: Morepheus on May 20, 2009 1:00 AM -
Need help with inventory program!!! someone please help me!!!
Ok I have to write this inventory program for one of my classes.
For part one i needed to Create a product class that holds the item number, the name of product, the number of units in stock, and the price of each unit.
Then create a java application that displays all of the above info plus the total value of the inventory. I have done this so far with success.
For part two i needed to modify the program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time including the item number, the name of the product, the number of units in stock, the price per unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.
so create a method to calculate the value of the entire inventory.(i did this)
and create another method to sort the array items by the name of the product. ( i did this)
The program compiles and runs fine except it is not doing anything from part two. It just does the same thing that it did when i wrote part one.
Does anyone know why or what i need to do to my code.
Here is my code.
import java.util.Scanner; // program uses class Scanner
import java.util.Arrays;
class ProductList
Product[] products = new Product[100]; // an array of 100 pruducts
private void populate() {
products[0] = new Product(0, "Good Luck Chuck" , 25, 4.95);
products[1] = new Product(1, "The Bourne Identity" , 3, 7.95);
products[2] = new Product(2, "The Reaping" , 5, 8.99);
products[3] = new Product(3, "Deja Vu" , 2,12.99);
products[4] = new Product(4, "I Know Who Killed Me" , 3,10.95);
private void sortByTitle() {
private void print() {
for(int i=0; i<products.length; i++) {
System.out.println(products);
private void printTotalInventoryValue() {
System.out.println("Total Inventory Value = "+calculateTotalInventoryValue());
private double calculateTotalInventoryValue() {
double total = 0D;
for(int i=0; i<products.length; i++) {
total += products[i].calculateInventoryValue();
return total;
public static void main( String args[] ) {
ProductList list = new ProductList();
list.populate();
list.sortByTitle();
list.print();
list.printTotalInventoryValue();
} class Product
private int id;
private String title;
private int stock;
private double price;
public Product(int id, String title, int stock, double price) {
setId(id);
setTitle(title);
setStock(stock);
setPrice(price);
public int getId() { return this.id; }
public void setId(int id) { this.id = id; }
public String getTitle() { return this.title; }
public void setTitle(String title) { this.title = title; }
public int getStock() { return this.stock; }
public void setStock(int stock) { this.stock = stock; }
public double getPrice() { return this.price; }
public void setPrice(double price) { this.price = price; }
public double calculateInventoryValue() {
return getStock() * getPrice();
public class Inventorypt2
private String ProductInfo; // call class product info
public static void main(String args[])
//create Scanner to obtain input from command window
Scanner input = new Scanner( System.in );
int num; // product's item number
int stock; // number of items in stock
double price; // price each of item
ProductInfo product; // product information instance
System.out.println(); // blank line
String name = "go";
// loop until sentinel value read from user
while ( !name.equalsIgnoreCase ("stop") )
System.out.print( "Enter DVD title, or STOP to quit: "); // prompt
name = input.nextLine(); // read item name from user or quit
System.out.print( "Enter the item number: "); // prompt
num = input.nextInt(); // read item number from user
while ( num <=0 ) //loop until item number is positive
System.out.println ("Item number must be positive. Please re-enter item number: ");//prompt user to re-enter item number
num = input.nextInt(); // read item number
} //end while
System.out.print( "Enter the quantity in stock: "); // prompt
stock = input.nextInt(); // read stock quantity from user
while ( stock <0 ) //loop until stock is positive
System.out.println ("Quantity in stock can not be less than zero. Please re-enter the quantity in stock: ");//prompt user to re-enter quantity in stock
stock = input.nextInt(); // read stock quantity from user
} //end while
System.out.print( "Enter the price of DVD: "); // prompt
price = input.nextDouble(); // read item price from user
while ( price <=0 ) //loop until price is positive
System.out.println ("Product price must be positive. Please re-enter the price of the product: ");//prompt user to re-enter product price
price = input.nextDouble(); // read item price from user
} //end while
product = new ProductInfo( num, name, stock, price); // initialize ProductInfo variables
System.out.println(); // blank line
System.out.printf( "Item Name: %S\n", product.getName());
System.out.printf( "Item Number: %s\n", product.getNum());
System.out.printf( "Qty. in Stock: %s\n", product.getStock());
System.out.printf( "Price Each: $%.2f\n", product.getPrice());
System.out.printf( "Total Value in Stock: $%.2f\n", product.getInventoryTotal());
System.out.println(); // blank line
System.out.print( "Enter DVD title, or STOP to quit: "); // prompt
name = "";
while ( name.equals("") )
name = input.nextLine(); // read new product name from user or quit
} //end while
System.out.println(); // blank line
System.out.println("Good Bye!"); // exit message
Edited by: jay1981 on Mar 16, 2008 2:07 PMYou will get more help if your code is formatted better:
* Only post code that is already formatted correctly including indentations.
* Get rid of all those comments cluttering up your code.
* Make sure your posted code compiles without need for any changes. Yours doesn't at present. Where is the ProductInfo class?
Again, you want it easy for a volunteer here to read your post, otherwise he/she simply won't do it. Good luck. -
Java help needed-Inventory System
I urgently need help in finishing my java inventory project for school. Can anyone help me usin files and streams to get the program to save data and help me get the menu to work pls THANKS> Heres the source code below:
// TextForm.java
// A simple label/field form panel
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class TextForm extends JPanel {
private JTextField[] fields;
// Create a form with the specified labels, tooltips, and sizes.
public TextForm(String[] labels,
int[] widths, String[] tips) {
super(new BorderLayout());
JPanel labelPanel = new JPanel(new GridLayout(labels.length, 1));
JPanel fieldPanel = new JPanel(new GridLayout(labels.length, 1));
add(labelPanel, BorderLayout.WEST);
add(fieldPanel, BorderLayout.CENTER);
fields = new JTextField[labels.length];
for (int i=0; i < labels.length; i+=1) {
fields[i] = new JTextField();
if (i < tips.length) fields.setToolTipText(tips[i]);
if (i < widths.length) fields[i].setColumns(widths[i]);
JLabel lab = new JLabel(labels[i], JLabel.RIGHT);
lab.setLabelFor(fields[i]);
labelPanel.add(lab);
JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT));
p.add(fields[i]);
fieldPanel.add(p);
JScrollBar JScrollBar = new JScrollBar();
JScrollBar vbar = new JScrollBar(JScrollBar.VERTICAL, 30, 40, 0, 300);
add(vbar, BorderLayout.EAST);
public String getText(int i) {
return( fields[i].getText() );
public static void main(String[] args) {
String[] labels = { "115ml Medicine", "236.60ml Water-clear", "236.60 Water-Amber", "250ml Irish Moss",
"250ml Sauce", "355ml Water", "380ml Juice", "473ml Vinegar", "500ml Water", "500 ml Blue Water", "600ml Water",
"750ml Syrup/honey", "900ml Disinfectant", "1000ml Syrup", "1500ml Water", "Total # caps:" };
int[] widths = { 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 ,12 };
String[] descs = { "", "Enter Quantity" };
final TextForm form = new TextForm(labels, widths, descs);
JButton submit = new JButton("Save Inventory");
JButton cancel = new JButton( "Cancel");
submit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showConfirmDialog(null,"Are you sure you want to save this record?");
JOptionPane.showMessageDialog(null, " Inventory status updated");
JOptionPane.showConfirmDialog(null, "Do you want to exit?");
JFrame f = new JFrame("Sweet Inventory System");
f.getContentPane().add(form, BorderLayout.NORTH);
JPanel p = new JPanel();
p.add(submit);
f.getContentPane().add(p, BorderLayout.CENTER);
f.pack();
f.setVisible(true);
Its error free except i cant see the menubar or get it to save items usin files and streams.
HELP PLEASETELL ME THE CODE I CAN USE TO MAKE IT SAVE ITEMS LIKE
IN A TEXT FILE AND HOW CAN I ATTACH IT TO THE SAVE
BUTTON USIN A LISTENER
THANKS
PLS POST HEREPosts like this make me ignore you forever. -
Help regarding Inventory related concurrent managers to be assigned
Hi,
I am looking for a help regarding the below aspects
1)Which concurrent managers needs to be assigned to run the following five concurrent programs.
INV Transaction Worke
Inventory transaction worker
Interface Trip Stop
Min Max report planning
Pick selection List Generation
2)We are facing issues with the above jobs. Currently except Inventory transaction worker all the other concurrent programs are running under standard manager.
because of which Min max planning report programs are piling up under standard manager. Min max programs were going to “Pending” status and never getting picked up as they were waiting for other programs in the queue to get finished. There were thousands piled up after the environment was bring up.
How can we solve this issue.. please suggest835129 wrote:
The metalink notes you provided didnt gave me any information about the concurrent managers under which these programs should run. Any help regarding concurrent managers would be helpfulI believe you have not read my reply properly since I mentioned "WIP Move Manager and Inventory Manager". Plus, the docs mention it clearly so please read it again!
Thanks,
Hussein -
Need Help in Inventory Exercise -
Dear All,
I need your help to resolve the issue in Inventory Cube Exercise. I have searched the entire blog for similar problem but i didn't get any solution.
Here is the Problem.
Due to the marker problem the entire data in cube was corrupted, We have removed entire data in Cube. And we have taken the downtime and performed all necessary steps in R/3. The same was loaded to BW.
2lis_03_BX --> Loaded to BW (Initialization Stock, and one time job), But the request was Not Compressed.
2lis_03_BF--> initialize the delta without data transfer - Here i have only 1 record (initialized record) -- Request not compressed
2lis_03_UM--> Initialize the delta without data transfer - Here i have only 1 record (initialized record) -- Request not compressed
After Initialization, daily delta loads are running and those are fine. i am able to see the data in cube.
=>> After this i have loaded historical data from 2007 to 2010. (UM & BF) (each year One Request- Total 8 request for both).
NOW
1. i have Initialize Stock request in infocube for 2lis_03_BX
2. i have Initialization request, delta requests and historical data requests in infocube for 2lis_03_BF
3. i have Initialization request, delta requests and historical data requests in infocube for 2lis_03_UM
Here is the Big task for Me. Since Two months the delta loads are running. Now i need to do compression on this cube.
Please do remember, till now there is no compression (not even initial requests or no single requests) happened in this cube. Now i have to perform this task immedly.
No requests are compression in the ZINV_C03_C (inventory cube) till now. ****
I need to perform immdly, because i have downtime fror three days from 28 dec to 30th Dec due to plant closing.
Please guide me to do this exercise.
Thanks in Advance
Venkat.Hi Maximiliano
I got an idea on compression scenarios, but my question is if i do compression on selective requests (one By one) is there any problem to be face? and how to done. Please suggest me if you have any suggestions.
And i have repairfull requests for Historical Data (2lis_02_bf, 2lis_02_um) 2007 to 2010. so how to do compression on these requests. Please give me your valuable suggestion .
For your idea i am giving my action plan on this cube:
Request ID Data Source Data Update Action on Compression
820452 2LIS_02_BX Initialization Compression with Marker (u2018No Ticku2019 Selection) - One time only
820453 2LIS_02_BF Initialization Compression without Marker (u2018with Ticku2019 Selection)One time only
820454 2LIS_02_BF Delta Compression with Marker (u2018No Ticku2019 Selection) - All following Delta requests for BF
821951 2LIS_02_BF Repairful (2009) What to do ????????????
825106 2LIS_02_BF Repairful (2008) What to do ????????????
etc..
820455 2LIS_02_UM Initialization Compression without Marker (u2018with Ticku2019 Selection) - One time only
820456 2LIS_02_UM Delta Compression with Marker (u2018No Tick Selection) -All Following Delta requests for UM
821900 2LIS_02_UM Repairful (2009) What to do ????????????
825107 2LIS_02_UM Repairful (2008) What to do ????????????
etc..
Till this point i dont have any issues, but and how to handle compression for historical data (repairfull requests). "This is only biggest question in my mind".
Please suggest me on this scenario.
Thanks in Advance
Venkat -
Help with inventory Java program
Hello,
I've been working on this and couldn't get what's the problem is :(
Can somebody explain to me what would be the problems?
import java.util.Scanner;
public class Product
public static void main(String[] args)
Scanner s = new Scanner(System.in);
System.out.print("Enter the item number: ");
int item = s.nextInt();
System.out.print("Enter the product name: ");
String product = s.next();
System.out.print("Enter the unit: ");
int unit = s.nextInt();
System.out.print("Enter the price for each unit: ");
double price = s.nextDouble();
product p = new product(item, product, unit, price);
System.out.println("You entered: ");
System.out.print("Item: " + p.getItemNumber() + "\nProduct: " + p.getProductName() + "\nUnits: " + p.getUnits() + "\nPricePerUnit: " + p.getPriceUnit() + "\n");
System.out.println("Here is the value of inventory :" + p.getPriceInventory());
class Inventory1
private int itemNumber;
private String productName;
private int Unit;
private double priceUnit;
public Inventory1(int itemNumber, String productName, int Unit, double priceUnit)
this.itemNumber = itemNumber;
this.productName = productName;
this.Unit = Unit;
this.priceUnit = priceUnit;
public int getItemNumber()
return itemNumber;
public void setItemNumber(int itemNumber)
this.itemNumber = itemNumber;
public double getPriceUnit()
return priceUnit;
public void setPriceUnit(double priceUnit)
this.priceUnit = priceUnit;
public String getProductName()
return productName;
public void setProductName(String productName)
this.productName = productName;
public int getUnit()
return Unit;
public void setUnit(int Unit)
this.Unit = Unit;
public double getPriceInventory()
double number = getUnit() * getPriceUnit();
return number;
}Build output:
--------------------Configuration: <Default>--------------------
java:10: class Product is public, should be declared in a file named Product.java
public class Product
^
TestProduct.java:23: cannot find symbol
symbol : class product
location: class Product
product p = new product(item, product, unit, price);
^
TestProduct.java:23: cannot find symbol
symbol : class product
location: class Product
product p = new product(item, product, unit, price);
^
3 errors
Process completed.General output:
java.lang.NoClassDefFoundError: Product
Caused by: java.lang.ClassNotFoundException: Product
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"
Process completed.Help!!
Thank you in advanceI adjusted and this time it says:
Build Output
--------------------Configuration: <Default>--------------------
16: cannot find symbol
symbol : variable product
location: class Product
Product p = new Product(item, product, unit, price);
^
16: internal error; cannot instantiate Product.<init> at Product to ()
Product p = new Product(item, product, unit, price);
^18: cannot find symbol
symbol : method getItemNumber()
location: class Product
System.out.print("Item: " + p.getItemNumber() + "\nProduct: " + p.getProductName() + "\nUnits: " + p.getUnits() + "\nPricePerUnit: " + p.getPriceUnit() + "\n");
^
18: cannot find symbol
symbol : method getProductName()
location: class Product
System.out.print("Item: " + p.getItemNumber() + "\nProduct: " + p.getProductName() + "\nUnits: " + p.getUnits() + "\nPricePerUnit: " + p.getPriceUnit() + "\n");
^
18: cannot find symbol
symbol : method getUnits()
location: class Product
System.out.print("Item: " + p.getItemNumber() + "\nProduct: " + p.getProductName() + "\nUnits: " + p.getUnits() + "\nPricePerUnit: " + p.getPriceUnit() + "\n");
^
18: cannot find symbol
symbol : method getPriceUnit()
location: class Product
System.out.print("Item: " + p.getItemNumber() + "\nProduct: " + p.getProductName() + "\nUnits: " + p.getUnits() + "\nPricePerUnit: " + p.getPriceUnit() + "\n");
^
19: cannot find symbol
symbol : method getPriceInventory()
location: class Product
System.out.println("Here is the value of inventory :" + p.getPriceInventory());
^
7 errors
Process completed.General Output
--------------------Configuration: <Default>--------------------
java.lang.NoClassDefFoundError: Product
Caused by: java.lang.ClassNotFoundException: Product
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"
Process completed.(>_<)
I forgot to mention...
That I need to create a product class that holds the item number, the name of the product, the number of units in stock and the price of each unit (I think I got this part)
I need to create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit).
Edited by: yodartas on Sep 27, 2008 7:54 PM -
Need help with Inventory program part 6
if any one can help or give me a clue to how to do this Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item.
? Add a Save button to the GUI that saves the inventory to a C:\data\inventory.dat file.
? Use exception handling to create the directory and file if necessary.
? Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that product?s information in the GUI.
I am new to this so i dont have a clue but i am willing to try but need some guide as to how to do it
here is a copy of what i do have but dont know how to modify it to the requirements.
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
public class Inventory2
static int dispProd = 0; // variable for actionEvents
//main method begins execution of java application
public static void main(final String args[])
int i; // varialbe for looping
double total = 0; // variable for total inventory
// Instantiate a product object
final ProductAdd[] nwProduct = new ProductAdd[5];
// Instantiate objects for the array
for (i=0; i<5; i++)
nwProduct[0] = new ProductAdd("Paper", 101, 10, 1.00, "Box");
nwProduct[1] = new ProductAdd("Pen", 102, 10, 0.75, "Pack");
nwProduct[2] = new ProductAdd("Pencil", 103, 10, 0.50, "Pack");
nwProduct[3] = new ProductAdd("Staples", 104, 10, 1.00, "Box");
nwProduct[4] = new ProductAdd("Clip Board", 105, 10, 3.00, "Two Pack");
for (i=0; i<5; i++)
total += nwProduct.length; // calculate total inventory cost
final JButton firstBtn = new JButton("First"); // first button
final JButton prevBtn = new JButton("Previous"); // previous button
final JButton nextBtn = new JButton("Next"); // next button
final JButton lastBtn = new JButton("Last"); // last button
final JLabel label; // logo
final JTextArea textArea; // text area for product list
final JPanel buttonJPanel; // panel to hold buttons
//JLabel constructor for logo
Icon logo = new ImageIcon("C:/logo.jpg"); // load logo
label = new JLabel(logo); // create logo label
label.setToolTipText("Company Logo"); // create tooltip
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout( new GridLayout(1, 4)); //set layout
// add buttons to buttonPanel
buttonJPanel.add(firstBtn);
buttonJPanel.add(prevBtn);
buttonJPanel.add(nextBtn);
buttonJPanel.add(lastBtn);
textArea = new JTextArea(nwProduct[3]+"\n"); // create textArea for product display
// add total inventory value to GUI
textArea.append("\nTotal value of Inventory "+new java.text.DecimalFormat("$0.00").format(total)+"\n\n");
textArea.setEditable(false); // make text uneditable in main display
JFrame invFrame = new JFrame(); // create JFrame container
invFrame.setLayout(new BorderLayout()); // set layout
invFrame.getContentPane().add(new JScrollPane(textArea), BorderLayout.CENTER); // add textArea to JFrame
invFrame.getContentPane().add(buttonJPanel, BorderLayout.SOUTH); // add buttons to JFrame
invFrame.getContentPane().add(label, BorderLayout.NORTH); // add logo to JFrame
invFrame.setTitle("Office Min Inventory"); // set JFrame title
invFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // termination command
//invFrame.pack();
invFrame.setSize(400, 400); // set size of JPanel
invFrame.setLocationRelativeTo(null); // set screem location
invFrame.setVisible(true); // display window
// assign actionListener and actionEvent for each button
firstBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd = 0;
textArea.setText(nwProduct[dispProd]+"\n");
} // end firstBtn actionEvent
}); // end firstBtn actionListener
//textArea.setText(nwProduct[4]+"n");
prevBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd--;
if (dispProd < 0)
dispProd = 0;
//dispProd = (nwProduct.length+dispProd-1) % nwProduct.length;
textArea.setText(nwProduct[dispProd]+"\n");
} // end prevBtn actionEvent
}); // end prevBtn actionListener
lastBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd = nwProduct.length-1;
textArea.setText(nwProduct[dispProd]+"\n");
} // end lastBtn actionEvent
}); // end lastBtn actionListener
nextBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd++;
if (dispProd >= nwProduct.length)
dispProd = nwProduct.length-1;
textArea.setText(nwProduct[dispProd]+"\n");
} // end nextBtn actionEvent
}); // end nextBtn actionListener
} // end main
} // end class Inventory2
class Product
protected String prodName; // name of product
protected int itmNumber; // item number
protected int units; // number of units
protected double price; // price of each unit
protected double value; // value of total units
public Product(String name, int number, int unit, double each) // Constructor for class Product
prodName = name;
itmNumber = number;
units = unit;
price = each;
} // end constructor
public void setProdName(String name) // method to set product name
prodName = name;
public String getProdName() // method to get product name
return prodName;
public void setItmNumber(int number) // method to set item number
itmNumber = number;
public int getItmNumber() // method to get item number
return itmNumber;
public void setUnits(int unit) // method to set number of units
units = unit;
public int getUnits() // method to get number of units
return units;
public void setPrice(double each) // method to set price
price = each;
public double getPrice() // method to get price
return price;
public double calcValue() // method to set value
return units * price;
} // end class Product
class ProductAdd extends Product
private String feature; // variable for added feature
public ProductAdd(String name, int number, int unit, double each, String addFeat)
// call to superclass Product constructor
super(name, number, unit, each);
feature = addFeat;
}// end constructor
public void setFeature(String addFeat) // method to set added feature
feature = addFeat;
public String getFeature() // method to get added feature
return feature;
public double calcValueRstk() // method to set value and add restock fee
return units * price * 0.05;
public String toString()
return String.format("Product: %s\nItem Number: %d\nIn Stock: %d\nPrice: $%.2f\nType: %s\nTotal Value of Stock: $%.2f\nRestock Cost: $%.2f\n\n\n",
getProdName(), getItmNumber(), getUnits(), getPrice(), getFeature(), calcValue(), calcValueRstk());
} // end class ProductAddTry these modifications at your own risk:
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
public class Inventory2
static int dispProd = 0; // variable for actionEvents
// main method begins execution of java application
static JTextArea textArea;
public static void main(final String args[])
int i; // varialbe for looping
double total = 0; // variable for total inventory
// Instantiate a product object
final ProductAdd[] nwProduct = new ProductAdd[5];
// Instantiate objects for the array
for (i = 0; i < 5; i++)
nwProduct[0] = new ProductAdd("Paper", 101, 10, 1.00, "Box");
nwProduct[1] = new ProductAdd("Pen", 102, 10, 0.75, "Pack");
nwProduct[2] = new ProductAdd("Pencil", 103, 10, 0.50, "Pack");
nwProduct[3] = new ProductAdd("Staples", 104, 10, 1.00, "Box");
nwProduct[4] = new ProductAdd("Clip Board", 105, 10, 3.00,
"Two Pack");
for (i = 0; i < 5; i++)
total += nwProduct.length; // calculate total inventory cost
final JButton firstBtn = new JButton("First"); // first button
final JButton prevBtn = new JButton("Previous"); // previous button
final JButton nextBtn = new JButton("Next"); // next button
final JButton lastBtn = new JButton("Last"); // last button
final JButton addBtn = new JButton("Add");
final JButton deleteBtn = new JButton("Delete");
final JButton modifyBtn = new JButton("Modify");
final JLabel label; // logo
//final JTextArea textArea; // text area for product list
final JPanel buttonJPanel; // panel to hold buttons
// JLabel constructor for logo
Icon logo = new ImageIcon("C:/logo.jpg"); // load logo
label = new JLabel(logo); // create logo label
label.setToolTipText("Company Logo"); // create tooltip
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout(new GridLayout(0, 4)); // set layout
// add buttons to buttonPanel
buttonJPanel.add(firstBtn);
buttonJPanel.add(prevBtn);
buttonJPanel.add(nextBtn);
buttonJPanel.add(lastBtn);
buttonJPanel.add(addBtn);
buttonJPanel.add(deleteBtn);
buttonJPanel.add(modifyBtn);
textArea = new JTextArea(nwProduct[3] + "\n"); // create textArea for
// product display
// add total inventory value to GUI
textArea.append("\nTotal value of Inventory "
+ new java.text.DecimalFormat("$0.00").format(total) + "\n\n");
textArea.setEditable(false); // make text uneditable in main display
JFrame invFrame = new JFrame(); // create JFrame container
invFrame.setLayout(new BorderLayout()); // set layout
invFrame.getContentPane().add(new JScrollPane(textArea),
BorderLayout.CENTER); // add textArea to JFrame
invFrame.getContentPane().add(buttonJPanel, BorderLayout.SOUTH); // add
// buttons
// to
// JFrame
invFrame.getContentPane().add(label, BorderLayout.NORTH); // add logo
// to JFrame
invFrame.setTitle("Office Min Inventory"); // set JFrame title
invFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // termination
// command
// invFrame.pack();
invFrame.setSize(400, 400); // set size of JPanel
invFrame.setLocationRelativeTo(null); // set screem location
invFrame.setVisible(true); // display window
// assign actionListener and actionEvent for each button
firstBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd = 0;
textArea.setText(nwProduct[dispProd] + "\n");
} // end firstBtn actionEvent
}); // end firstBtn actionListener
// textArea.setText(nwProduct[4]+"n");
prevBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd--;
if (dispProd < 0)
dispProd = 0;
// dispProd = (nwProduct.length+dispProd-1) % nwProduct.length;
textArea.setText(nwProduct[dispProd] + "\n");
} // end prevBtn actionEvent
}); // end prevBtn actionListener
lastBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd = nwProduct.length - 1;
textArea.setText(nwProduct[dispProd] + "\n");
} // end lastBtn actionEvent
}); // end lastBtn actionListener
nextBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
dispProd++;
if (dispProd >= nwProduct.length)
dispProd = nwProduct.length - 1;
textArea.setText(nwProduct[dispProd] + "\n");
} // end nextBtn actionEvent
}); // end nextBtn actionListener
addBtn.addActionListener(new extraBtnAxnL());
deleteBtn.addActionListener(new extraBtnAxnL());
modifyBtn.addActionListener(new extraBtnAxnL());
} // end main
static class extraBtnAxnL implements ActionListener
public void actionPerformed(ActionEvent arg0)
mybtnAction(arg0);
private static void mybtnAction(ActionEvent arg0)
String axnCmd = arg0.getActionCommand();
Font oldFont = textArea.getFont();
textArea.setFont(new Font(oldFont.getName(), Font.BOLD, 16));
if (axnCmd.equalsIgnoreCase("add"))
textArea.setText(new String(asqasp));
else if (axnCmd.equalsIgnoreCase("delete"))
textArea.setText(new String(iow));
else if (axnCmd.equalsIgnoreCase("modify"))
textArea.setText(new String(dyogdhw));
private static byte[] asqasp =
0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x20,
0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20,
0x74, 0x6f, 0x20, 0x61, 0x73, 0x6b, 0x20, 0x73, 0x70, 0x65, 0x63,
0x69, 0x66, 0x69, 0x63, 0x20, 0x0a, 0x71, 0x75, 0x65, 0x73, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20,
0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72,
0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x2e, 0x0a, 0x0a, 0x4e, 0x6f,
0x74, 0x20, 0x61, 0x20, 0x73, 0x69, 0x74, 0x65, 0x20, 0x74, 0x6f,
0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a,
0x65, 0x63, 0x74, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x0a, 0x61, 0x6e, 0x64, 0x20,
0x61, 0x73, 0x6b, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x2e
private static byte[] iow =
0x49, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x6f,
0x72, 0x64, 0x73, 0x2e, 0x2e, 0x2e
private static byte[] dyogdhw =
0x44, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e,
0x20, 0x67, 0x6f, 0x64, 0x2d, 0x64, 0x61, 0x6d, 0x6e, 0x20, 0x68,
0x6f, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x21
} // end class Inventory2Message was edited by:
petes1234 -
Help needed Inventory 0IC_C03
Hi guys,
I am presently working on an inventory project.
I have activated the busines content for the whole process flow i.e the cube 0IC_C03 and its respective datasources and infosources.
Now I want to understand the logic thst is being used in the start and update routines.Is there any doc that gives the logic for these routines.
For example a KF 0ISSVALSCRP which exists in the cube 0IC_C03 is mapped from its infosource using the rulename Issue Qty: Scrap - Purch.Val. from Matl Doc. on Posting Date.
The routine used is 'Perform routine_0030'.
which is
IF ( COMM_STRUCTURE-movetype EQ '551' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '552' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '553' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '554' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '555' "GI scrapping blocked
OR COMM_STRUCTURE-movetype EQ '556' ) "GI scrapping blocked
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
AND COMM_STRUCTURE-cppvlc <> 0 .
Could somebody tell me the logic implemented in this piece of code.Is there any document for the same.
Points will be assigned.
Thanks
AnkitHi guys,
I am presently working on an inventory project.
I have activated the busines content for the whole process flow i.e the cube 0IC_C03 and its respective datasources and infosources.
Now I want to understand the logic thst is being used in the start and update routines.Is there any doc that gives the logic for these routines.
For example a KF 0ISSVALSCRP which exists in the cube 0IC_C03 is mapped from its infosource using the rulename Issue Qty: Scrap - Purch.Val. from Matl Doc. on Posting Date.
The routine used is 'Perform routine_0030'.
which is
IF ( COMM_STRUCTURE-movetype EQ '551' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '552' "GI scrapping
OR COMM_STRUCTURE-movetype EQ '553' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '554' "GI scrapping QI
OR COMM_STRUCTURE-movetype EQ '555' "GI scrapping blocked
OR COMM_STRUCTURE-movetype EQ '556' ) "GI scrapping blocked
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
AND COMM_STRUCTURE-cppvlc <> 0 .
Could somebody tell me the logic implemented in this piece of code.Is there any document for the same.
Points will be assigned.
Thanks
Ankit -
Hello,
I am new to Java programming and I need some assistance in trying to complie my program correctly. I would greatly appreciate it.
I have started my program, but keep getting the same two compile errors.
C:\Program Files\Java\Product.java:91: illegal start of expression
public InventoryPart1(String name, double number, double units, double price)
^
C:\Program Files\Java\Product.java:113: class, interface, or enum expected
}//end class InventoryPart1
My assignment ask:
Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software).
Create a product class that holds the item number, the name of the product, number of units in stock and the price of each unit.
Create a Java application that displays the product number, the name of the product, number of units in stock, the price of each unit, and the value of inventory (the number of units multiplied by price of each unit). Pay attention to the good programming practices in the text to ensure your source code is readable and well documented.
This is what I have so far.
* Product.java
* @author Amy Summers
* A class created as a Product
* which hold information with a constructor
//Create and manipulate a Product class.
import java.util.Scanner;//program uses Scanner
class Product
private String nameIn;
private double numberIn;//item number
private double unitsIn;//number of units in stock
private double priceIn;//price of each unit
//four-argument constructor
public Product( String nameIn, double numberIn,
double unitsIn, double priceIn )
//implicit call to Object constructor occurs here
nameIn = nameIn;
numberIn = numberIn;
unitsIn = unitsIn;
priceIn = priceIn;
}//end four-argument Product constructor
// set product name
public void setNameIn (String name)
name = nameIn;
}//end method setNameIn
//return product name
public String getNameIn()
return nameIn;
}//end method getNameIn
// set number
public void setNumberIn (double number)
number = numberIn;
}//end method setNumberIn
//return number
public double getNumberIn()
return numberIn;
}//end method getNumberIn
//set units
public void setUnitsIn ( double units)
units = unitsIn;
}//end method setUnitsIn
//return units
public double getUnitsIn()
return unitsIn;
}//end method getUnitsIn
//set price
public void setPriceIn (double price)
price = priceIn;
}//end method set priceIn
//return price
public double getPriceIn()
return priceIn;
}//end method getPriceIn
}//end class Product
* InventoryPart1.java
* @author Amy Summers
public class InventoryPart1
private String Productname;//product name for this
InventoryPart1
//constructor initializes productName
public InventoryPart1(String name, double number,
double units, double price)
Product myProduct1 = new Product
();//initializes productName
System.out.printf("%s%s\n", "Name",
getnameIn() );//display name
System.out.printf("%s%
s\n", "Number",
getnumberIn() );//display number
System.out.printf("%s%s\n", "Units",
getunitsIn() );//display units
System.out.printf("$%.2f\n", "Price",
getpriceIn() );//display price
value = unitsIn * priceIn;//mulitple
numbers
System.out.printf("$%.2f\n",
value);//display inventory value
}//end main method
}//end class InventoryPart1* Product.java
* @author Amy Summers
* A class created as a Product
* which hold information with a constructor
//Create and manipulate a Product class.
import java.util.Scanner;//program uses Scanner
class Product
private String nameIn;
private double numberIn;//item number
private double unitsIn;//number of units in stock
private double priceIn;//price of each unit
//four-argument constructor
public Product( String nameIn, double numberIn, double unitsIn, double priceIn )
//implicit call to Object constructor occurs here
nameIn = nameIn;
numberIn = numberIn;
unitsIn = unitsIn;
priceIn = priceIn;
}//end four-argument Product constructor
// set product name
public void setNameIn (String name)
name = nameIn;
}//end method setNameIn
//return product name
public String getNameIn()
return nameIn;
}//end method getNameIn
// set number
public void setNumberIn (double number)
number = numberIn;
}//end method setNumberIn
//return number
public double getNumberIn()
return numberIn;
}//end method getNumberIn
//set units
public void setUnitsIn ( double units)
units = unitsIn;
}//end method setUnitsIn
//return units
public double getUnitsIn()
return unitsIn;
}//end method getUnitsIn
//set price
public void setPriceIn (double price)
price = priceIn;
}//end method set priceIn
//return price
public double getPriceIn()
return priceIn;
}//end method getPriceIn
}//end class Product
* InventoryPart1.java
* @author Amy Summers
public class InventoryPart1
private String Productname;//product name for this InventoryPart1
//constructor initializes productName
public InventoryPart1(String name, double number, double units, double price)
Product myProduct1 = new Product();//initializes productName
System.out.printf("%s%s\n", "Name",
getnameIn() );//display name
System.out.printf("%s%s\n", "Number",
getnumberIn() );//display number
System.out.printf("%s%s\n", "Units",
getunitsIn() );//display units
System.out.printf("$%.2f\n", "Price",
getpriceIn() );//display price
value = unitsIn * priceIn;//mulitple numbers
System.out.printf("$%.2f\n", value);//display inventory value
}//end main method
}//end class InventoryPart1Sorry about that. -
Hello,
I downloaded Flash 6 and was very pleased so I decided to buy
the registration key...
I waited until the trial ended to put my registration key
in... dont know why....
now there is no way for me to select register, the start
screen simply says "trial period blah,blah,blah"
Pleeeeeeeease.... help!ai_anarki wrote:
> please some1 help me in any way...
Macromedia do not sale Flash 6 for last 3 years.
You a bit over due with the registration.
Contact customer support, they will be able to help you
www.adobe.com
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Reg:Help option in IR and ID
hi friends
how i can find documentation for each object in XI i mean like F1 help in ABAP is there any option in XI . i need documentation for Adapter objects node in repository.
Thanks & regards
sumanHi Suman,
There is no F1 help in XI/PI.
All you can do is to refer Help.sap.com
Check this for Adapter Objects:
http://help.sap.com/saphelp_nw04/helpdata/en/65/dfc755843b734992ce0d8f93f35178/frameset.htm
and this for other XI objects:
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
Sachin -
Hi All,
I am new to this OBIEE... Even i question may be very silly.. I will be happy , if any one in forum group help me. I heard from my friends that OBIEE was used to creating report. I want the basic purpose why OBIEE is used and Wat component it has and its useful too.. Basically i am technical Consultant, in which i have to focus on OBIEE. Plz help me out with your valuable suggestion.
Thanks in Advance
--HappyHi,
Look on the below thread
Re: need help
And see below link also helpful for you,
http://www.biblogs.com/2008/02/15/a-future-oracle-obiee-architecture/
Thanks,
Balaa...
Edited by: Balaa on Jun 4, 2010 12:16 PM
Maybe you are looking for
-
This statement pops up on some occasions when I am sending an Email, but the Emails are usually received by the recipient! who are mostly Family so I have been able to check that that have been read.
-
Need help. pdf is just grey? but why?
Hello, and thanks for helping. I've received a pdf. When I open it is Adobe it is just a solid light grey. When I open it in Apple's Preview it is the pdf as it should be with text. Why is this happening? Can I do something so that it open prope
-
Sub-report variable on main report
HI Forum, I have a report with a sub-report. I am trying to have the sub-report to get an item "price" from a salesorder on a given year in this case 2010... i get that with a shared variable... the sub-report prints the correct value.... except that
-
Will FCX run on a Macbook Air?
-
I don't want to fill the Actual GI Date field automatically when GI
Hi experts When I post good issue a delivery, Actual GI Date field is filled automatically. I don't want it. I don't want the Actual GI Date field to be filled automatically. Please, let me know how to. With config or user exit, anything possible. Th