Inventory Import

The initial Inventory import was done improperly.  Our "on hand" count is double what is should be.  How do I correct the item count and ensure the items are in the proper bins?  Can I do this with DTW?

Hi,
In DTW Use oStockTaking Template .
*Close the thread if issue solved.
Regards
Jambulingam.P

Similar Messages

  • Inventory import using MBBM

    I am trying to batch some inventory from 4.6C to 5.0 and need help on creating the BMSEG load file for using tcode MBBM.   I set the BMSEG tcode in the file to call MB11.
    How do I get the serial numbers into the system?  When I run SM35 for the batch created by MBBM a serial maintenace screen pops up requesting a serial for each item (ie: qty = 8 --> need 8 serial numbers)  But the BMSEG layout only allows 1 serial per record.   
    Does anyone know how to set the file so MBBM can see all the serial numbers for creating the batch?   Or is there a better way to do this?

    Hi,
            Report used to create batch input sessions, in order to post material documents for goods movements
    The data for the BTCI session is imported from an external dataset as a sequential file. The structure of this sequential file is predefined in table BMSEG. You can display this structure via the Data Dictionary information system (object class Fields).
    Requirements
    Before you start the report, make sure that the file entered on the selection screen is stored in the specified directory at operating system level.
    Similar to entering data online, the system expects certain data for each goods movement (for example, posting date, document date, material number, quantity). If this data is not made available, an error will occur when the BTCI session is processed.
    Via batch input, you can post material documents with reference to purchase orders or reservations only if the reference documents exist in the system.
    Procedure using test data
    Before data is imported for the production system, a run should be performed using test data. In this case, data is not imported from the sequential file but from the Customizing system. This means that you have to maintain test data for the Customizing system of Inventory Management (under Tools -> Adopt data) -> Stocks -> Test data.
    For testing purposes, the following goods movements are allowed:
    SAP transaction MB01, movement type 101 (goods receipt for PO)
    For this movement, the order number and order item are required (not the material number).
    SAP transaction MB11, movement type 501 (goods receipt w/o PO)
    For this movement, the material number is required.
    SAP transaction MB11, movement type 201 (goods issue for cost center)
    For this movement, the material number and the account assignment (cost center) are required.
    Output
    The system generates a batch input session which you can process via options System -> Services -> Batch input -> Sessions.
    When processing the batch input session for testing purposes, you should set the Display errors only indicator.
    When importing the actual productive data, you should always use the Background indicator.
    If data expected by the system (required-entry fields) does not exist, an error will occur during the batch input session which will interrupt processing.
    check the <b>report RM07MMBL</b> is used to create batch input sessions for goods movements. In a second step, you must process the BTCI sessions, in order to post the material documents for the goods movements.
    Regards

  • INVENTORY import from

    Hi all,
    May I import device from cw2k's topology.
    Because
    We don't have NMS and I think typing more than 200 devices for inventory too tired

    As far as my knowledge goes, you cannot import the device from ciscoworks 2k topology.

  • Inventory Import Program

    Hello All ,
    i have a requriment of buyer updation in oracle inventory master item, on the
    organization basis . the souniero is one buyer is resign from the company
    and it have Assign thousand of items, if we are update manully the buyer then
    it will take lot of time , we want a interface that update the buyer of an item on
    particular suniro , we have a restrication when i user the mtl_system_item_interface that can not update the receord for item master ,
    when i go in metalink i have found the table MTL_ITEM_REVISIONS_INTERFACE
    it has used for the updation of item but it have no buyer id field .
    Now what should i do for it.
    Thanks

    You may try using the item api (ego_item_pub), tough not sure if it allows for what You require. If that's not an option, Dataload may be the last option.

  • Add Hardware Inventory Classes - ClientSDK

    Hi,
    I'm trying to add a new Hardware Class to SCCM 2012 but keep hitting an issue.
    The actual WMI class I'm trying to add is "CCM_Application" within "root\ccm\clientSDK".
    I can add the Hardware class by connecting to a remote client (via the connect option within the Add Hardware Classes) and it shows up in the inventory classes OK.
    But on updating the client machine policy, and start a Hardware Invetory action, the inventory fails with the following message in the InventoryAgent.log file:
    Collection: Namespace = root\ccm\clientSDK; Query = SELECT __CLASS, __PATH, __RELPATH, Id, IsMachineTarget, Revision, AllowedActions, ApplicabilityState, ConfigureState, ContentSize, Deadline, DeploymentReport, Description, EnforcePreference, ErrorCode,
    EstimatedInstallTime, EvaluationState, FileTypes, FullName, Icon, InformativeUrl, InProgressActions, InstallState, IsPreflightOnly, LastEvalTime, LastInstallTime, Name, NextUserScheduledTime, NotifyUser, OverrideServiceWindow, PercentComplete, Publisher, RebootOutsideServiceWindow,
    ReleaseDate, ResolvedState, SoftwareVersion, StartTime, SupersessionState, Type, UserUIExperience FROM CCM_Application; Timeout = 600 secs.
    Unknown error encountered processing an instance of class CCM_Application: 80041024
    If, on the client machine, I run the following command in PowerShell
    Get-WmiObject -ComputerName . -Namespace "root\ccm\clientSDK" -Query "select FullName from CCM_Application"
    I get the following error:
    Get-WmiObject : Provider is not capable of the attempted operation
    At line:1 char:1
    + Get-WmiObject -ComputerName . -Namespace "root\ccm\clientSDK" -Query "select Ful ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
        + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    But if I run the following command:
    Get-WmiObject -ComputerName . -Namespace "root\ccm\clientSDK" -Query "select * from CCM_Application" | Select FullName
    The results are returned OK.
    So it looks as though you cannot select instances but have to use select *
    The question I'm asking is that, is it possible to change the query used by SCCM so that select * is used instead of each instance?
    Thanks

    Although I agree with Jason it's a goofy request, here's a way to get some of the information back. You have to have two edits.
    Add this to the bottom of your Configuration.mof in inboxes\clifiles.src\hinv:
    [Union, ViewSources{"select * from CCM_Application"},ViewSpaces{"\\\\.\\root\\ccm\\clientsdk"}, dynamic,Provider("MS_VIEW_INSTANCE_PROVIDER")]
    class cm_ClientSDKCCMApplication
     [PropertySources{"Id"},key]     string Id;
     [PropertySources{"IsMachineTarget"},key]   boolean IsMachineTarget;
     [PropertySources{"Revision"},key]    string Revision;
     [PropertySources{"ApplicabilityState"}]  string ApplicabilityState;
     [PropertySources{"ErrorCode"}]    uint32 ErrorCode;
     [PropertySources{"FullName"}]    string FullName;
     [PropertySources{"LastEvalTime"}]    datetime LastEvalTime;
     [PropertySources{"LastInstallTime"}]    datetime LastInstallTime;
     [PropertySources{"StartTime"}]   datetime StartTime;
     [PropertySources{"UserUIExperience"}]   boolean UserUIExperience;
    In your Default Client Agent Settings, Hardware Inventory, delete whatever it is you have for this.  Save the below as "ImportThis.mof", and in Default Client Agent Settings, Hardware Inventory, Import... and import it.
    [ SMS_Report (FALSE),
      SMS_Group_Name ("ClientSDKApps"),
      SMS_Class_ID  ("ClientSDKApps"),
      SMS_Namespace (FALSE) ]
    class cm_ClientSDKCCMApplication : SMS_Class_Template
     [SMS_Report(TRUE),key]  string Id;
     [SMS_Report(TRUE),key]  boolean IsMachineTarget;
     [SMS_Report(TRUE),key]  string Revision;
     [SMS_Report(TRUE)    ]  string ApplicabilityState;
     [SMS_Report(TRUE)    ]  uint32 ErrorCode;
     [SMS_Report(TRUE)    ]  string FullName;
     [SMS_Report(TRUE)    ]  datetime LastEvalTime;
     [SMS_Report(TRUE)    ]  datetime LastInstallTime;
     [SMS_Report(TRUE)    ]  datetime StartTime;
     [SMS_Report(TRUE)    ]  boolean UserUIExperience;
    As always, monitor dataldr.log, machine policy refreshes on clients, and see what you get back. 
    Standardize. Simplify. Automate.

  • Help with Java Inventory Program - I almost got it

    Hello, I'm new to the forum so please don't hang me if I'm not posting this correctly or in the right place. I'm writing a Java Inventory Program for class and everything was great until we had to modify it to sort by product name (in my case dvd's). The problem is my arrays for inventory count and price are thrown off when I sort by dvd name because they are predefined. I could cheat and just rearrange the array in a logical order according to the dvd title but that isn't really the answer for me. Can someone help me do where my inventory count and price don't go out of wack when I sort by dvd name, I really don't want to start over.
    Here is my code:
    // Java InventoryProgram2
    // Purpose of application is to Display DVD Inventory
    import java.util.Arrays;
    public class InventoryProgram2 // declare public class
    { // Start of public class InventoryProgram1
         String dvdName[] = { "The Departed", "The Dark Knight","The Mummy", "Minority Report"};
         double itemNum;
         float stockCount[] = {3, 5, 8,2};
         float totalValue [] = new float [4];
         float price[] = { 19, 22, 17, 14};
         float totInvVal;
              // Method for printing dvdName the dvdName
              public void DvdName ()
              { // Start of print method
                   // For loop to calculate total value
                   Arrays.sort(dvdName);
                   for( int itemNum = 0; itemNum < dvdName.length; itemNum ++ )
                        totalValue[itemNum] = stockCount[itemNum] * price[itemNum];
                   System.out.printf( "%s %15s %12s %12s %12s\n", "Item Number", "Dvd Name", "Price", "Stock", "Total"); // Prints title of column
                   for ( int itemNum = 0; itemNum <dvdName.length; itemNum ++ )
                        System.out.printf("%-8d %20s %10.02f %12.02f %12.02f\n", itemNum, dvdName[itemNum], price [itemNum],stockCount[itemNum], totalValue[itemNum]); // Calls the value of each column
         } // end of method to print dvdName
         // Method for total value of the inventory
         public void totalInvValue()
         { //start of method to calc total inv value
         totInvVal = stockCount [0] * price [0] + stockCount [1] * price [1] + stockCount [2] * price [2] + stockCount [3] * price [3];
         System.out.printf("%s", "The Total Value of the Inventory is:","%10.02f");
         System.out.printf("$%.02f", totInvVal);
         } // end of method to calc total inv value
    } // End of public class InventoryProgram1
    // Java InventoryProgram2_Test
    // Purpose of application is to Display DVD Inventory
    public class InventoryProgram2_Test
    { // Start Bracket for InventoryProgram1
    public static void main ( String args[] )
    { // Start Bracket for Public Main
         InventoryProgram2 myInventoryProgram2 = new InventoryProgram2(); // invokes InventoryProgram1
    myInventoryProgram2.DvdName (); // calls DvdName Method
         myInventoryProgram2.totalInvValue(); // call method total inventory value
    } // End Bracket for Public Main
    } // End Bracket for InventoryProgram1
    Edited by: ozzie2132 on Aug 11, 2008 6:57 PM
    Edited by: ozzie2132 on Aug 11, 2008 6:57 PM

    a_turingmachine wrote:
    naive ex:
    class DVD {
    String dvdName;
    float stockCount;
    float price;
    }--turing machine:
    Suggestion 1: If you are going to give code for someone doing homework, try not to give exactly what the OP needs but rather something similar. They will learn a lot more if they have to process your recommendations and then create their own code.
    Suggestion 2: When posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. You may want to click on the Preview tab to make sure that your code is formatted correctly. Another way is to place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}

  • Error in StringTokenizer

    I am trying to run this code that I got from a textbook. The only thing that I changed was the name of the file that was to be read in. It was "inventory.dat" and I changed it to "clients.txt".
    The code compiled fine but when I went to run it I got the following error:
    Exception in thread "main" java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(Unknown Source)
    at CheckInventory.man(CheckInventory.java:34)
    What does this error mean? And why didn't it work? I took it right out of my textbook. Any insight would be appreciated.
    //  CheckInventory.java       Author: Lewis/Loftus
    //  Demonstrates the use of a character file input stream.
    import java.io.*;
    import java.util.StringTokenizer;
    public class CheckInventory
       //  Reads data about a store inventory from an input file,
       //  creating an array of InventoryItem objects, then prints them.
       public static void main (String[] args)
          final int MAX = 100;
          InventoryItem[] items = new InventoryItem[MAX];
          StringTokenizer tokenizer;
          String line, name, file = "clients.txt";
          int units, count = 0;
          float price;
          try
             FileReader fr = new FileReader ("clients.txt");
             BufferedReader inFile = new BufferedReader (fr);
             line = inFile.readLine();
             while (line != null)
                tokenizer = new StringTokenizer (line);
                name = tokenizer.nextToken();
                try
                   units = Integer.parseInt (tokenizer.nextToken());
                   price = Float.parseFloat (tokenizer.nextToken());
                   items[count++] = new InventoryItem (name, units, price);
                catch (NumberFormatException exception)
                   System.out.println ("Error in input. Line ignored:");
                   System.out.println (line);
                line = inFile.readLine();
             inFile.close();
             for (int scan = 0; scan < count; scan++)
                System.out.println (items[scan]);
          catch (FileNotFoundException exception)
             System.out.println ("The file " + file + " was not found.");
          catch (IOException exception)
             System.out.println (exception);
    //  InventoryItem.java       Author: Lewis/Loftus
    //  Represents an item in the inventory.
    import java.text.DecimalFormat;
    public class InventoryItem
       private String name;
       private int units;    // number of available units of this item
       private float price;  // price per unit of this item
       private DecimalFormat fmt;
       //  Sets up this item with the specified information.
       public InventoryItem (String itemName, int numUnits, float cost)
          name = itemName;
          units = numUnits;
          price = cost;
          fmt = new DecimalFormat ("0.##");
       //  Returns information about this item as a string.
       public String toString()
          return name + ":\t" + units + " at " + price + " = " +
                 fmt.format ((units * price));
    }clients.txt
    Widget 14 3.35
    spoke 132 0.32
    wrap 58 1.92
    thing 28 4.17

    when I went to run it I got the following error:
    Exception in thread "main" java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(Unknown Source)
    at CheckInventory.man(CheckInventory.java:34)
    What does this error mean?It means that when you called nextToken() there weren't any more tokens. In other words the input line didn't contain as many tokens as you expected.

  • How to resolve BADMIFS file in SCCM 2012

    Hi,
    I am trying to resolve Hardware inventory issue on the machines which is not reported more than 10 days in SCCM 2012.
    I found there are BADMIFS files created in the below location.
    How to resolve the issue on the machines which is under below each BADMIFS folders. Do we have any troubleshooting steps for each folder?

    For troubleshooting hardware inventory import, you can check below link
    https://sccmfaq.wordpress.com/2013/10/16/sccm-2012-troubleshot-hardware-inventory-import/
    For Resolve-cleanup BadMIFs, you check below script
    https://gallery.technet.microsoft.com/scriptcenter/SCCM-2012-bad-hardware-0bec0ee0
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"Mai Ali | My blog:
    Technical | Twitter:
    Mai Ali

  • Lost and Confused

    I am trying to understand arrays.
    Where do you declare an array?
    I understand that an array is basically a container of like items/objects, but how do I fill the container? How do I get the information into the array? If I don't know the information before hand how do I put it in the array? If I have to be specific and put the information in the array then why do I need an array?
    If I have a main that works, and I have a class that works how do I add an array to make the application hold more than one item and then print out the multiple items?
    In my mind the application should simply use the loop to gather the information then print out the information when the loop reaches it's end.
    All the examples I have found basically show the same thing, just the part of the code that declares the array.
    What the example do not show is how the declaration applies to an application.
    I'm getting nowhere fast, except more confused and frustrated :-(

    petes,
    You helped me work out a problem before :-) If you are not a teacher, you would make an excellent one!
    Turing, I read your link as well!
    I don't know why I can't figure this array part out. It all reads like it should be obvious, but I'm going from bad to worse! I went from 12 errors to 1 error to 22 errors!
    I'm already late on the assignment, that isn't my main objective now. I want to KNOW what I'm doing wrong. It has to be something I can fix. Something I am just not getting.
    //Inventory Program Part 1
    //Inventory enters and displays Part information
    //for product inventory
    *Parts used for testing include Glass Break: part # FG730,
    *Motion Detector: part# Aurora, and W/L Contact: part # 5816.
    *any quantity for units on hand and unit price is appropriate
    *for testing purposes.
    import java.util.Scanner;    // program uses class Scanner
    import java.text.*;
    public class Inventory
    private static void Quit()
             System.out.println("Goodbye");
         System.exit (0);
        // main method begins execution of Java application
         public static void main(String args[])
                     // create Scanner to obtain input from command window
            Scanner input = new Scanner(System.in);
         while(true)// starts loop to test name
                 System.out.print("\nEnter Part Name (stop to quit):  "); // prompt for name
                       part.setName(input.nextLine());   // get name
              if(part.getName().compareToIgnoreCase("stop") == 0)
                     System.out.println("Stop entered, Thank you");
                     Quit();
                     } //end if
            System.out.print("Enter part number for " + part.getName() + ":  ");  // prompt
                       part.setitemNum(input.nextLine());    // read part number from user
            System.out.print("Enter Units on hand: ");    // prompt
                       part.setunits(input.nextDouble());    // read second number from user
         if(part.getunits() <= 0)
                      System.out.println ("Invalid amount, Units on hand worked must be positive");
                      System.out.print("Please enter actual units on hand: ");
                        part.setunits(input.nextDouble());
                      } //end if
         System.out.print("Enter Unit Price: $ ");    // prompt
                       part.setprice(input.nextDouble());    // read third number from user
         if(part.getprice() <= 0)
                      System.out.println ("Invalid amount, Unit Price must be positive");
                      System.out.print("Please enter actual unit price: $ ");
                           part.setprice(input.nextDouble());
                      } //end if
         String fmtStr = "\n%-7s %-10s %12s %12s %12s\n";
         System.out.printf(fmtStr, "Part #", "Part Name",
               "Units On Hand", "Unit Cost", "Total Cost");
          for(int i = 0; i<5; i++)
             part[] Partarray = new part[5];      // allocates memory for 5 strings
             part[0] = "Glass Break"; // initialize first element
             part[1] = "Motion"; // initialize second element
             part[2] = "Keypad"; // etc.
             part[3] = "W/L Contact";
             part[4] = "Contact";
              System.out.println("Element at index 0: " + part[0]);
              System.out.println("Element at index 1: " + part[1]);
              System.out.println("Element at index 2: " + part[2]);
              System.out.println("Element at index 3: " + part[3]);
              System.out.println("Element at index 4: " + part[4]);
         }//end for
            }//end while
        }//end main
    }// end class Inventory
    // Class Part holds Part information
    class Part
       private String name;
       private String itemNum;
       private double units;
       private double price;
       //default constructor
        public Part()
            name = "";
            itemNum = "";
            units = 0;
             price = 0;
        }//end default constructor
         //Parameterized Constructor
        public Part(String name, String itemNum, double units, double price)
             this.name = name;
             this.itemNum = itemNum;
             this.units = units;
             this.price = price;
        }//end constructor
         public void setName(String name) {
             this.name = name;
            String getName()
                return name;
        public void setitemNum ( String itemNum )
            this.itemNum = itemNum;
        public String getitemNum()
         return itemNum;       }
         public void setunits ( double units )
             this.units = units;
         public double getunits()
              return units;
         public void setprice ( double price )
             this.price = price;
         public double getprice()
         return price;
         public double getvalue()
         return (units * price);
    }//end Class PartAnd the original code I started from, which works beautifully......
    //Inventory Program Part 1
    //Program enters and displays part information
    //for product inventory
    import java.util.Scanner;    // program uses class Scanner
    import java.text.*;
    public class Inventory1
    private static void Quit()
            System.out.println("Goodbye");
         System.exit (0);
        // main method begins execution of Java application
        public static void main(String args[])
            Part part = new Part();
            // create Scanner to obtain input from command window
            Scanner input = new Scanner(System.in);
         while(true)// starts loop to test name
                 System.out.print("Enter Part Name (stop to quit):  "); // prompt for name
                       part.setName(input.nextLine());   // get name
                 if(part.getName().compareToIgnoreCase("stop") == 0)
                    System.out.println("Stop entered, Thank you");
                    Quit();
                    } //end if
                    System.out.print("Enter part number for " + part.getName() + ":  ");  // prompt
                     part.setitemNum(input.nextLine());    // read part number from user
                     System.out.print("Enter Units on hand: ");    // prompt
                    part.setunits(input.nextDouble());    // read second number from user
                             if(part.getunits() <= 0)
                                    System.out.println ("Invalid amount, Units on hand worked must be positive");
                                    System.out.print("Please enter actual units on hand: ");
                                    part.setunits(input.nextDouble());
                               } //end if
              System.out.print("Enter Unit Price: $ ");    // prompt
                    part.setprice(input.nextDouble());    // read third number from user
                             if(part.getprice() <= 0)
                                    System.out.println ("Invalid amount, Unit Price must be positive");
                                    System.out.print("Please enter actual unit price: $ ");
                                    part.setprice(input.nextDouble());
                               } //end if
              System.out.printf("\n%s    %s       %.2f    %.2f      %.2f\n", part.getitemNum(), part.getName(), part.getunits(), part.getprice(), part.getvalue());
    input.nextLine();
              }//end while
         }// end method main
    } // end class Inventory
    // Class Part holds Part information
    class Part
       private String name;
       private String itemNum;
       private double units;
       private double price;
       //default constructor
        public Part()
            name = "";
            itemNum = "";
            units = 0;
             price = 0;
        }//end default constructor
        //Parameterized Constructor
        public Part(String name, String itemNum, double units, double price)
            this.name = name;
            this.itemNum = itemNum;
            this.units = units;
             this.price = price;
        }//end constructor
         public void setName(String name) {
            this.name = name;
           String getName()
              return name;
        public void setitemNum ( String itemNum )
            this.itemNum = itemNum;
        public String getitemNum()
              return itemNum;
        public void setunits ( double units )
            this.units = units;
        public double getunits()
              return units;
        public void setprice ( double price )
            this.price = price;
        public double getprice()
              return price;
        public double getvalue()
              return (units * price);
    }//end Class Part

  • Cisco Works SNMP write community string Incorrect

    Hi,
    I have installed Cisco Works at my organisation. Under RME -> Inventory -> Import status -> Device Attribute Error: I am getting: Incorrect SNMP write community strings. Even though i know perfectly well the SNMP write community string is correct. To prove that, if I delete the device and then add the same device using the same SNMP write community string it works fine. then a couple of days later, it comes up with the same message "SNMP write community string is incorrect". I have increased the time and retries for the SNMP settings at the ANI server, still it has not resolved the issue.
    Please help

    I have sharched the CCO bug toolkit and according them, it was a know issue for verion 3.4 but it has been fixed for Ver RME 3.5. But we are currently running RME 3.5, therefore it does not make any sense.

  • Why I am I getting an error saying missing Format specifier 's'

    I keep gettting an error when I try to run this program it says that I am missing a format specifier, I chacked and cannot find where it is missing everything is there.
    The error message when ran is:
    Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier 's'
    at java.util.Formatter.format(Formatter.java:2431)
    at java.io.PrintStream.format(PrintStream.java:920)
    at java.io.PrintStream.printf(PrintStream.java821)
    at Inventory2.printString(Inventory2.java:177)
    at Pens.stringPrint(Pens.java:83)
    at PensTest.main(PensTest.java:21)
    The superclass is Inventory2
    //Nicole Hammers
    //Inventory2
    import java.util.Arrays;
    public class Inventory2
      private String productName[];
      private String productNum[];
      private String temp[];
      private double productUnits[];
      private double productPrice[];
      private int b;
      public Inventory2( String itemName[], String itemNum[], String arraytemp[], double amountUnits[], double pricePerUnit[], int a )
        temp = arraytemp;
        sortProductName( itemName );
        sortProductNum( itemNum, arraytemp, itemName  );
        sortProductUnit( amountUnits, arraytemp, itemName );
        sortProductPrice( pricePerUnit, arraytemp, itemName );
        setCounter( a );
      public String[] getTemp( String arraytemp[] )
        temp = arraytemp;
        return temp;
      public String[] getProductName( String itemName[] )
       sortProductName( itemName );   
       return productName;
      public String[] getProductNum( String itemNum[], String arraytemp[], String itemName[] )
       sortProductNum( itemNum, arraytemp, itemName );
       return productNum;
      public double[] getProductPrice( double pricePerUnit[], String arraytemp[], String itemName[] )
       sortProductPrice( pricePerUnit, arraytemp, itemName );
       return productPrice;
      public double[] getProductUnits( double amountUnits[], String arraytemp[], String itemName[] )
       sortProductUnit( amountUnits, arraytemp, itemName );
       return productUnits;
      public String[] sortProductName( String itemName[] )
        productName = itemName;
        Arrays.sort( productName );
        return productName;
      public int setCounter( int a )
        b = a;
       return b;
      public double findIndBaseTot( double price[], double units[], int b )
        double indBase;
        indBase = price[ b ] * units[ b ];
        return indBase;
      public double findAllBase( double productUnits[], double productPrice[] )
         double total = 0;
         for ( int c = 0; c < productUnits.length; c++ )
           total += productUnits[ c ] * productPrice[ c ];
         return total;
      public String[] sortProductNum( String itemNum[], String arraytemp[], String itemName[] )
       temp = getTemp( arraytemp );
       productName = sortProductName( itemName );
        String arraynew[] = new String[4];
        for ( int c = 0; c < productName.length; c++ )
           for ( int d = 0; d < productName.length; d++ )
             if ( productName[ c ].equals( temp[ d ] ) )
                arraynew[ c ] = itemNum[ d ];}    
         productNum = arraynew;
         return productNum;  
      public double[] sortProductUnit( double amountUnits[], String arraytemp[], String itemName[] )
       temp = getTemp( arraytemp );
       productName = sortProductName( itemName );
        double arraynew[] = new double[4];
        for ( int c = 0; c < productName.length; c++ )
           for ( int d = 0; d < productName.length; d++ )
             if ( productName[ c ].equals( temp[ d ] ) )
                arraynew[ c ] = amountUnits[ d ];}
         productUnits = arraynew;
         return productUnits;  
      public double[] sortProductPrice( double pricePerUnit[], String arraytemp[], String itemName[] )//Sorts double type array according to how string type array is sorted.
       temp = getTemp( arraytemp );
       productName = sortProductName( itemName );
        double arraynew[] = new double[4];
        for ( int c = 0; c < productName.length; c++ )
           for ( int d = 0; d < productName.length; d++ )
             if ( productName[ c ].equals( temp[ d ] ) )
                arraynew[ c ] = pricePerUnit[ d ];}
         productPrice = arraynew;
         return productPrice;  
    public void printString( String itemName[], String arraytemp[], String itemNum[], double amountUnits[], double pricePerUnit[], int a )
        productName = getProductName( itemName );
        productNum = getProductNum( itemNum, arraytemp, itemName );
        productUnits = getProductUnits( amountUnits, arraytemp, itemName );
        productPrice = getProductPrice( pricePerUnit, arraytemp, itemName );
        b = setCounter( a );
       System.out.printf( "%s: %17s \n%s: %15s \n%s :%21.2f \n%s: $%18.2f \n%s: $%19.2f \n%s: $%17.2f \n ", "Product Name", productName[ b ], "Product Number", productNum[ b ], "Quantity", productUnits[ b ], "Unit Price", productPrice[ b ], "Base Cost", findIndBaseTot( productPrice, productUnits, b ) );
    }the subclass
    //Subclass Pens
    import java.util.Arrays;
    public class Pens extends Inventory2
      private double refee;
      public Pens( String itemName[], String itemNum[], String arraytemp[], double amountUnits[], double pricePerUnit[], int a )
         super( itemName, itemNum, arraytemp, amountUnits, pricePerUnit, a );
      public int callcounter( int a )
       a = super.setCounter(a);
       return a;
      public double findRestockFee( double price[], double units[], int a )
        double fee;
        fee = super.findIndBaseTot( price, units, a ) * .05;
        return fee;
    public double findIndTot( double price[], double units[], int a )
      double fee;
      double base;
      double indTot;
      fee = super.findIndBaseTot( price, units, a ) * .05;
      base = super.findIndBaseTot( price, units, a );
      indTot = base + fee;
      return indTot;
      public double findTot( double productUnits[], double productPrice[] )
        double fee = 0;  
        double total = 0;
        fee = super.findAllBase( productUnits, productPrice ) * .05;
        total =  super.findAllBase( productUnits, productPrice ) + fee;
        return total;
      public double findTotUnits( double amountUnits[] )
        double total = 0;
        for ( int a = 0; a < amountUnits.length; a++ )
          total += amountUnits[ a ];
        return total;
      public double findAllFee( double amountUnits[], double pricePerUnit[] )
       double fee;
       fee = super.findAllBase( amountUnits, pricePerUnit ) * .05;
       return fee;
      public void stringPrint( String itemName[], String arraytemp[], String itemNum[], double amountUnits[], double pricePerUnit[], int a )
        super.printString( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
      public void print( String itemName[], String arraytemp[], String itemNum[], double amountUnits[], double pricePerUnit[], int a )
        double refee = findRestockFee( pricePerUnit, amountUnits, a );
        double indTot = findIndTot( pricePerUnit, amountUnits, a );
        System.out.printf( "Restocking Fee:$%17.2f \n%s: $%17.2f \n\n", refee, "Total Cost", indTot );
      public void printAll( String itemName[], double amountUnits[], double pricePerUnit[] )      
        System.out.printf( "%s: %17.2f \n%s: $%17.2f \n%s:$ %17.2f \n%s:$ %.2f \n", "Total Units of Pens", findTotUnits( amountUnits ), "Base Cost of Pens", super.findAllBase( amountUnits, pricePerUnit ), "Restock Fee of Pens", findAllFee( amountUnits, pricePerUnit ), "Total Cost of Pens", findTot( amountUnits, pricePerUnit ) );
    }and the the program to make it all work
    //InventoryMain
    public class PensTest
    public static void main( String args[] )
      String itemName[] = { "Fine Point", "Ball Point", "Gell", "Retractable" };
      String arraytemp[] = { "Fine Point", "Ball Point", "Gell", "Retractable" };
      String itemNum[] = { "123456", "234567", "345678", "456789"};
      double amountUnits[] = { 23, 16, 27, 11 };
      double pricePerUnit[] = { 3.99, 1.99, 2.99, 3.49 };
      int a = 0;
      Pens pens = new Pens( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
      for ( a = 0 ; a < itemName.length; a++ )
       pens.callcounter( a );
       pens.stringPrint( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
       pens.print( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
       pens.printAll( itemName, amountUnits, pricePerUnit );
    }I know I'm missing something but I cannot figure out what.

    Maybe something like this to start. - %
    package inventory;
    import java.io.Serializable;
    import java.text.NumberFormat;
    * Product
    * User: Michael
    * Date: Sep 22, 2007
    * Time: 8:39:12 PM
    public class Product implements Serializable, Comparable
       public static final NumberFormat DEFAULT_CURRENCY_FORMAT = NumberFormat.getCurrencyInstance();
       private String name;
       private int item;    
       private double quantity;
       private double price;
       public Product()
          name = "";
          item = 0;
          quantity = 0;
          price = 0.0;
       public Product(String title, int item, double quantity, double price)
          this.name = title;
          this.item = item;
          this.quantity = quantity;
          this.price = price;
       public void setName(String name)
          this.name = name;
       public String getName()
          return name;
       public void setItem(int item)
          this.item = item;
       public int getItem()
          return item;
       public void setQuantity(double quantity)
          this.quantity = quantity;
       public double getQuantity()
          return quantity;
       public void setItemPrice(double price)
          this.price = price;
       public double getItemPrice()
          return price;
       public double calculateValue()
          return price * quantity;
       public int compareTo(Object o)
          Product p = (Product) o;
          return (name.compareTo(p.name));
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("Product{");
          builder.append("item=").append(item);
          builder.append(", name='").append(name).append('\'');
          builder.append(", quantity=").append(quantity);
          builder.append(", price=").append(DEFAULT_CURRENCY_FORMAT.format(price));
          builder.append('}');
          return builder.toString();
    }

  • Implementing Program into simple GUI

    I have completed a program that will show the inventory one at a time. I am using Netbeans and i have generated two JFrames. One that will be the welcome screen with a start button to show the first item...And the second one to have a textbox with a Next button to act as the enter button for my previous program. I have created the format for both JFrames, I dont know where to start implementing the completed program into a simple screen that will go through each item....not asking for a solution but if there is any suggestions on where to put what...I have created buttons on each JFrame and set it to action..Please help and thank you....
    package inventory;
    import java.util.*;
    public class Main //main class
       // main method
       public static void main( String args[] )
          double total = 0.0;
          Product inventory[]; // This is the array variable
           Scanner input = new Scanner(System.in);
          inventory = new Product[ 5 ];
          inventory [ 0 ] = new Product( "Apple", 1, 200, 1.00 );
          inventory [ 1 ] = new Product( "Banana", 2, 100, 2.00 );
          inventory [ 2 ] = new Product( "Pear", 3, 50, 3.00 );
          inventory [ 3 ] = new Product( "Pinapple", 4, 60, 4.00 );
          inventory [ 4 ] = new Product( "Orange", 5, 150, 5.00 );
           //needed to have a sort method call here BLG
           sortItems(inventory);
          for (int counter = 0; counter < 5; counter++)
             System.out.printf(inventory[counter].toString()); //way to print out
               //added two lines to get one-by-one BLG
               System.out.println("Please press enter to see the next item...");
               input.nextLine();
          } // end for
           total = getTotalValue(inventory); //added BLG
          System.out.printf( "The total value of the inventory is: $%.2f\n\n", total );
       } // end main method
       public static double getTotalValue(Product Items[])
              double totalValue = 0.0;
              for (Product myItem : Items)
                   totalValue += myItem.getValue();     
              return totalValue;
         //sort the items by name  added BLG
         public static void sortItems(Product Items[])
              for(int i=0;i < Items.length; i++)
                   Product myProduct = Items;
                   int j;
                   for (j = i - 1; j >= 0 && Items[j].getproductName().compareTo(myProduct.getproductName()) > 0; j--)
                        //compare the current item to the last item name
                        Items[j+1] = Items[j];
                   Items[j+1] = myProduct;
    } // end class mainpackage inventory;
    public class Product{
    public String name; //Declares product name
    public int id; //Declares product ID
    public int amount; //Declares number of Units
    public double cost; //Declares cost of each unit
    public Product( String name, int id, int unit, double cost ){ //Creates a constructor for Product class
    this.name = name;
    this.id = id;
    this.amount = unit;
    this.cost = cost;
    public Product( double priceUnit )//Seprate constructor for the restock class
    this.cost = priceUnit;
    Product inventory[] = new Product [ 3 ];
    public void setProduct ( String theproductIn ){
    name = theproductIn;
    public void setId ( int itemNumberIn ){
    id = ( ( itemNumberIn > 0 ) ? itemNumberIn :0 );
    public void setAmount ( int unitsIn ){
    amount = ( ( unitsIn > 0 )?unitsIn:0 );
    public void setCost ( double priceUnitIn ){  
    cost = ( ( priceUnitIn > 0.0 )?priceUnitIn:0.0 );
    public String getproductName(){
    return ( name );
    public int getId(){
    return ( id );
    public int getAmount(){
    return ( amount );
    public double getCost(){
    return ( cost );
    public double getValue(){
    return ( amount * cost );
    public String toString (){     
    String formatString = "Product Name : %s\n";
    formatString += "Id Number : %d\n";
    formatString += "Number of units on hand : %d\n";
    formatString += "Price of each unit : $%.2f\n";
    formatString += "Value of total units in stock : $%.2f\n";
    return (String.format ( formatString, name, id, amount, cost, getValue()));

    package inventory;
    public class restock extends Product
            private double reStockingFee;
         public restock(double cost, double reStockingFee,double getValue) {
           super(getValue*1.05);
           this.reStockingFee = reStockingFee;
         public double getCost() {
             return super.getCost() + reStockingFee;
         public String toString() {
               String formatString    = "Restock Price                   : %s\n";
              return (String.format ( formatString, super.getCost()));
    package Inventory4;
    public class Main extends javax.swing.JFrame {
        /** Creates new form Main */
        public Main() {
            initComponents();
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jLabel1 = new javax.swing.JLabel();
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLabel1.setText("    Welcome to the inventory program");
            jButton1.setText("Start");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap(40, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(19, 19, 19))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(86, 86, 86)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(91, Short.MAX_VALUE))
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(37, 37, 37)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(42, 42, 42)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(46, Short.MAX_VALUE))
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(129, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(139, 139, 139))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(35, 35, 35)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(68, Short.MAX_VALUE))
            pack();
        }// </editor-fold>
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration
    }

  • NNM 6.4 and CiscoWorks2000 integration

    Hi,
    I am trying to integrate CiscoWorks 2000 with NNM 6.4. These applications are running on two seperate machines on the same subnet.
    I managed to get some kind of integration but I cannot make the databases talk to each other
    Thanks
    Dione

    If you are trying to import devices into RME from HPOV, go to RME > Administration > Inventory > Import from Remote NMS (since they are on separate machines). Next, choose HP Openview in the NM Product drop-down box. You will come across a number of options which you need to choose from. Next, Fill in the path to the Source Location and click Finish. Lastly, check the Import Status in RME to make sure the devices are in Managed state.

  • Item import to oracle inventory from legacy system

    Hi,
    We have a requirement where we need to import a very large number of items (close to 500,000) from a legacy system to oracle inventory.
    We are using oracle open interface for this. We have designed a temp table for this purpose in order to validate data before moving it to the oracle interface tables. The data to be migrated is present in a separate data base and we need to move this data to Oracle temp table.
    Can we use DB link to migrate this kind of data(in terms of volume)? Also what are the best practices that need to be followed while importing data to Oracle inventory? Is there any other way that this can be done?
    Please share your thoughts and suggestions on this
    Thanks
    AM

    Hi,
    Some times DB link will fail, Please create custom package and try to interface with legacy system for periodically fetching the data into your tables. If the data is bulk please use API instead of Interface tables.
    Thanks.

  • Condition type value is uploaded in inventory ,how can avoid this in import

    Dear Friends,
    I am doing Import , in import pricing  having two condition type which are copy of FRB2 .
    Where i am putting Amount and vendor name.
    ex.
    1) CUSTOM VAT - AMOUNT - AND - VENDOR AS SRILANKAN CUST,
    2) CUSTOM NBT - AMOUNT - AND - VENDOR AS SRILANKAN CUST,
    Both are recoverable.
    Now my question is that what ever amount i am putting here that is going to load on inventory . But I dont want this. how to achieve this???
    Regards,
    Mahesh.

    Hi,
    Cost of  (CUSTOM VAT & CUSTOM NBT) both take to two different G./L account.In import calculation schema in M/08 ,check your CUSTOM VAT & CUSTOM NBT condition types and see account key & accrual must be assigned {say example account key FRE and accrual key FR6 & FR7 ( a copy of FR1)}
    Now use t.code M/06, select CUSTOM VAT & CUSTOM NBT condition type, go to details & select accrual flag in control data 2 TAB & keep B in condition category in control data 1 segment save. Again in OBYC , just assign FR6 accrual key with your  CUSTOM VAT G/L account  and assign FR7 accrual key with your  CUSTOM NBT G/L account  with your chart of account, valuation class & valuation modifier & save.
    Now do transaction and see both are posted to separate G/L account not added to inventory material cost.
    NOTE:
    Cost of  (CUSTOM VAT & CUSTOM NBT) can post Material Inventory Account :
    Use t.code M/06, go to details of CUSTOM VAT & CUSTOM NBT condition types & keep BLANK in condition category in control data 1 segment and do not select accrual flag in control data 2 TAB  for both condition types & save. Do not keep / assign any account key & accrual key are assigned {Keep BLANK} to both CUSTOM VAT & CUSTOM NBT condition types in import calculation schema in M/08.
    Regards,
    Biju K

Maybe you are looking for

  • Apple's ink preference option, randomly appears 2008 Mac Pro???

    Ink or inkwell. Is Apple's own handwriting recognition program It is included in leopard and is only available if your mac detects the presence of a wacom tablet. I don't have a wacom tablet, nor have I ever used one. Yet the ink icon has just recent

  • JBO-35007: Row currency has changed.. when Rollback fom a Dialog page

    Hi All, From a page with an ADF Readonly table, I press 'Edit' button to edit some fields (not all) in an edit page as a Dialog page. Both page use same View Object Instance. Edit page has Commit and Rollback button. Since it is a dialog page , I add

  • Best way to update a solaris jumpstart OS image.

    Hi all,. Ive been recently building some v240's but have run into trouble with the rather out of date 02/02 instance of Solaris 8 (yes, i did say solaris 8 - it's a political thing..) Anyhow, I have cd images of Solaris 8 02/04 and have a copy of the

  • Backup validate check logical database

    What is exactly the following RMAN command do? I want to know Is it doing a full backup or not? rman> backup validate check logical database' . Kindly help me.

  • Garbage collector does not work any way

    when you unload some loaded swf file (Loaded with Loader class) it's Event Listeners continue their jobs is there anyway to solve this problem for example please made three files l1.fla , l2.fla , main.fla in l1 creat a MovieClip with instance name "