Abstract:
Methods and apparatus, including computer program products, implementing and using techniques for managing data items in an inventory management system. A set of data items representing stock items is maintained in an inventory, wherein at least one stock item is described by two or more values. Each value being expressed in different units of measurement. A change request for a change of the values for the stock item that is described in the two or more different units of measurement is received. The two or more values for the stock item that is described in two or more different units of measurement are updated.

Description:
RELATED APPLICATIONS  
       [0001]    This application is a continuation-in-part of, and claims priority from, co-pending U.S. patent application Ser. No. 10/136,847 filed on Apr. 30, 2002, having common inventors Matthias Heinrichs, Pascale Van Laetham, Markus Seng, and Achim Heger, common ownership, and titled Inventory Management, the contents of which are incorporated herein by reference. 
     
    
     
       BACKGROUND  
         [0002]    This invention relates to inventory management.  
           [0003]    A typical supply chain management (SCM) system involves the management of materials, information, and finances as they move in a process from a supplier to a manufacturer, a wholesaler, a retailer, and to the final consumer. A SCM system can be viewed as a process that includes a product flow, an information flow, and a finance flow. The product flow includes the movement of goods from a supplier to a customer, as well as any customer returns or service needs. The information flows involves transmitting orders and updating the status of the delivery. The finance flow includes credit terms, payment schedules, and consignment and title ownership arrangements. All these different types of flows can be controlled and monitored using computer software.  
           [0004]    Typically, SCM software can be divided into two application categories: planning applications and execution applications. Planning applications use advanced algorithms to determine the best means to fill an order. Execution applications track the physical status of goods, the management of materials, and financial information involving the various parties in the supply chain.  
           [0005]    One example of a software solution for supply chain management is the mySAP Supply Chain Management (mySAP SCM) solution provided by SAP AG, located in Walldorf, Germany. The mySAP SCM solution is integrated with the mySAP.com e-business platform that also provides other solutions, such as mySAP Product Lifecycle Management that ties suppliers into the design process and thereby increases quality and reduces time to market; mySAP Supplier Relationship Management that is used to locate the best suppliers and shorten sourcing cycles; and mySAP Customer Relationship Management that provides visibility into the end customer (see www.sap.com for further information about the mySAP.com e-business platform).  
           [0006]    One important function of SCM systems is to manage stock, for example, keeping stock quantities, recording stock quantity changes resulting from goods movements, and providing information in response to queries about stock quantities and stock movements. In the current mySAP.com e-business solution, most of the functionality relating to Enterprise Resource Planning (ERP), including stock management, is performed by an SAP R/3 software component.  
           [0007]    The changing nature of supply chains cause new needs that can not or can only partly be fulfilled by existing solutions, such as the SAP R/3 component. For example, the flow of goods in a global supply chain often includes the participation of several partners working with different SCM systems. It would be desirable to be able to retrieve stock information throughout the whole supply chain. Another example of new needs relate to logistic service providers, who need to manage physical inventories from different companies in a single warehouse. In existing applications, the underlying structure for stock management functionality is typically linked to the structure of the company owning the stock and can not handle an organization that only temporarily manages the stock (such as a logistics service provider).  
           [0008]    There is also an increased need for management of stock quantity data substantially in real time. Some types of stock need to be represented in multiple units of measure, because certain properties may change (for example, gasoline increases its volume when the temperature increases, while the mass is constant, and therefore a volume representation only is insufficient), or because different participants in the supply chain may need to obtain information about a certain stock item in a certain unit of measure (for example, steel pipes can be represented in pieces, meter and kilograms in the metal industry). Companies also need the flexibility to add new products, product groups, and so on to their stock management applications.  
         SUMMARY  
         [0009]    In general, in one aspect, this invention provides methods and apparatus, including computer program products, implementing and using techniques for managing data items in an inventory management system. A set of data items representing stock items is maintained in an inventory, wherein at least one stock item is described by two or more values. Each value being expressed in different units of measurement. A change request for a change of the values for the stock item that is described in the two or more different units of measurement is received. The two or more values for the stock item that is described in two or more different units of measurement are updated.  
           [0010]    Advantageous implementations can include one or more of the following features. A relationship between the different units of measurement can be defined based on a user input. The change request can be performed by any participating party in a supply chain. The change request can include an add operation for increasing values representing a stock item, and a delete operation for reducing values representing a stock item. The change request can be expressed in the two or more units of measurement. The change request can be expressed in only one unit and at least one more unit can be updated based on a relationship between the two different units. A data item can be queried for one or more values of a particular unit for the stock item that is described in the two or more different units of measurement. A first data item can represent a first stock portion owned by a first user and a second data item represents a second stock portion owned by a second user, the first and second stock portions being commingled in a same location.  
           [0011]    The invention can be implemented to realize one or more of the following advantages. The Lean Inventory Management Engine (LIME) can keep near real time information about which quantities of a physical inventory is stored on which handling unit and at which location. Inventory management functions can be supported along the whole supply chain, from procurement and delivery to consumption, production and sales, shipping, transportation and value-added services (for example, labeling and packing). The inventory management functions include keeping stock quantities, recording the stock quantity changes resulting from goods movements, and answering queries about stock quantities and stock movements.  
           [0012]    Stock information can be retrieved throughout the whole supply chain because stock quantities are visible from various locations in the supply chain (for example, in an external warehouse or on a truck). This is particularly useful for vendor-managed inventories (VMI), where a vendor is responsible for the replenishment of the stock of his customers.  
           [0013]    LIME provides the necessary functionality for customers to handle, monitor and manage inventories in several units of quantity simultaneously, where the conversion factors may not be constant. In special cases, such as the oil industry, there are industry and process specific ways of converting the quantities.  
           [0014]    In LIME stock quantity data is organized using object-oriented techniques, which allows the physical inventory to be represented in a hierarchical inventory structure, that is, a tree-like structure of nodes representing locations, handling units, or stock units. The location nodes contain handling unit nodes, which in turn contain stock unit nodes. When any node in the hierarchy is moved, nodes below the current node are moved automatically, which is useful in a wide range of situations. For example, a logistics service provider can move a container without having knowledge of the actual contents of the container. Stock quantities of a location can easily be moved to another location. A warehouse can easily be outsourced, so that all content of the warehouse changes the operator. Bulk transportation in tanks and compartments can be made possible, even when the contents of the tanks and compartments are owned by several legal entities.  
           [0015]    Logistic service providers can manage physical inventories from different companies in the same warehouse, which is not possible with existing storage management applications since the inventory management typically is related to the structure of a company. With LIME, a logistics service provider (such as an external warehouse) can manage the same material number for different stock units from different companies in the same location. Changes in company structures (such as merging and outsourcing) are easy to handle, since a stock operator and a stockowner can be treated separately.  
           [0016]    LIME allows for Logistics systems and Finance systems to be separated, which is a benefit because finance applications typically deal with periodic information and can accept a certain delay in their data update, while logistics applications need exact quantities at all time and require updates within seconds or fractions of a second (zero latency). Such a separation is typically not possible in existing inventory management engines, because valuation data is deeply embedded in the applications. When financial data (documents and accounts), controlling data, material-ledger data, and so on, are updated for every update of stock quantity data during a goods movement, a performance degradation of the quantity update will result due to the many updates that are necessary. LIME avoids this problem by dealing with quantities only. The value updates as well as the updates in most subsequent applications can take place periodically in an aggregated form at a later time. Furthermore, stock quantities themselves are kept in one place in LIME, instead of in various components, which often is the case with conventional systems. Therefore, redundant quantity updates during a goods movement can be avoided, as well as complex consistency and repair reports that are needed to ensure that all components are matching.  
           [0017]    LIME is based on a flexible data architecture. For example, LIME can operate in a standalone manner as a sub-component for applications that manage stock quantities, can be integrated with SAP R/3 systems, has clearly defined interfaces so as to cooperate with components such as finance, business information warehouse, classical materials management inventory management (MM-IM) systems as well as with external systems such as warehouse management (WM) systems.  
           [0018]    The details of one or more implementations of the invention are set forth in the accompanying drawings and the description below. Other features and advantages of the invention will be apparent from the description and drawings, and from the claims. 
       
    
    
     DESCRIPTION OF DRAWINGS  
       [0019]    FIGS.  1 A-C show simplified block diagrams of various implementations of an inventory management system.  
         [0020]    [0020]FIG. 2 shows a table structure used in one implementation of the inventory management engine.  
         [0021]    [0021]FIG. 3 is a stock quantity entity relationship diagram showing the relationship between the tables used in the inventory management engine.  
         [0022]    [0022]FIG. 4 shows a process in an inventory management system.  
         [0023]    [0023]FIG. 5 shows how to add new entries into the table structure in the inventory management engine.  
         [0024]    [0024]FIG. 6 shows goods movement in the table structure in the inventory management engine.  
         [0025]    [0025]FIG. 7 shows how to select a particular entry in the table structure in the inventory management engine.  
         [0026]    [0026]FIG. 8 shows a representation of commingled stock represented in multiple units of measurement at an oil terminal in one implementation of the invention.  
         [0027]    [0027]FIG. 9 shows an alternative representation of commingled stock represented in multiple units of measurement at an oil terminal in another implementation of the invention. 
     
    
       [0028]    Like reference symbols in the various drawings indicate like elements.  
       DETAILED DESCRIPTION  
       [0029]    Overview  
         [0030]    The inventory management engine, also referred to as Lean Inventory Management Engine (LIME), works as a service and can be used as a stand-alone component or an add-on component in an existing SCM system. The inventory management engine does not contain any user interfaces. Therefore, all dialog functions related to the physical stock quantities and stock movements are contained in separate, external components, as will be described below. The primary purpose of the inventory management engine is to keep and move the physical stock and answer queries from other applications about stock quantities and stock movements.  
         [0031]    [0031]FIG. 1A is a simplified block diagram of one implementation of an inventory management system ( 100 ), for example, for a company having one inventory to manage.  
         [0032]    The company can be a manufacturer that receives supplies from n suppliers and operates the inventory management system ( 100 ) in a manner that permits the suppliers to input data regarding the particular stock items they supply to the manufacturer. For example, the manufacturer can have an agreement with the suppliers that all finished products in the suppliers&#39; warehouses that will be available to the manufacturer are to be input into the inventory management system ( 100 ) such that the manufacturer will be able to anticipate shortages of supplies. Individual suppliers can also be authorized to view data in the inventory management system ( 100 ) that pertains to levels of the particular stock item the individual suppliers supply. For example, the suppliers may have an arrangement with the manufacturer to maintain an inventory range of a particular part at the manufacturer&#39;s facility. Thus, viewing the inventory data will enable the suppliers to supply stock items as necessary to ensure that the number of stock items at the manufacturer&#39;s facility is within the specified range. The suppliers also will be able to determine whether they must increase or reduce their production.  
         [0033]    The management system ( 100 ) includes a web application server ( 105 ) that runs an inventory management engine ( 110 ) and that communicates over a network ( 115 ) with the suppliers ( 120 ). The web application server ( 105 ) communicates with a database ( 125 ) that includes inventory related data. The company operating the web application server ( 105 ) can be, for example, a manufacturer of simple and/or complex items. A manufacturer of a complex item may receive supplies from many suppliers, whereas the manufacturer of a simple item may receive supplies from much fewer suppliers. Nevertheless, in either situation the inventory management system operates scalably to handle the transactions required of the system ( 100 ). One example of an inventory management engine ( 110 ) is SAP&#39;s LIME.  
         [0034]    An example of a network ( 115 ) includes a wired network, such as the Internet, or a wireless network. The inventory management engine ( 110 ) includes a set of interface layers ( 112 ) so that the inventory management engine ( 110 ) can communicate with a large variety of external systems.  
         [0035]    [0035]FIG. 1B is a simplified block diagram of an implementation of a second inventory management system ( 130 ) to, for example, a company that receives stock items from n suppliers ( 120 ) and also manufactures and supplies stock items to n customers ( 135 ). For example, the customers ( 135 ) may be manufacturers of other items. In this implementation, the inventory management system must be able to store the data and handle the queries and transactions of both the suppliers and the customers. The company operating the web application server ( 105 ) and inventory management engine ( 110 ) of FIG. 1B may be, for example, one of the suppliers of FIG. 1A. As may be evident from FIGS. 1A and 1B, each supplier, manufacturer, and customer in a supply chain may have the need to operate an inventory management system ( 100 ,  130 ). Moreover, there may be sharing of some of the data stored in the individual databases ( 125 ) between multiple inventory management engines ( 110 ) such that the members of the supply chain have as much information as possible to ensure that their inventory management is optimized.  
         [0036]    [0036]FIG. 1C is a simplified block diagram of an implementation of a third inventory management system ( 140 ). The inventory management system ( 140 ) includes a company that acts as a service broker of the web application server ( 105 ) and the inventory management engine ( 110 ) for entities, such as suppliers ( 120 ), customers ( 135 ), manufacturers ( 145 ), warehouse operators ( 150 ), and shippers ( 155 ). In this implementation, the inventory management system stores the data and handles the queries and transactions of all of the entities that are provided this service by the service broker. Each entity accessing the inventory management engine would be provided an authorization code to access only certain data and only the supply chains in which that entity is involved. In this implementation, the entities advantageously avoid the initial capital costs of setting up an inventory management system as well as the ongoing costs of maintaining the software and hardware associated with such a system. However, the entities are required to pay fees to the service broker for the use of the inventory management system ( 140 ).  
         [0037]    As was described above, the LIME engine can communicate with a variety of external systems, such as a SAP R/3 system, a non-SAP system (for example, a legacy system in a conventional inventory system), and a valuation system ( 150 ). The valuation system can be an accounting or finance system that performs functions related to the valuation of the stock quantity data, such as reporting or analyzing the value of the stock stored in one or more locations. The SAP system can be based on an SAP R/3 computing environment that includes a classical inventory management system (MM-IM), a warehouse management system (LE-WM), and a handling unit (HU) management system, or other computer systems. The external systems can be client computers, such as desktops or laptop personal computers (PCs), having the necessary software for communicating with the web application server over the network. Depending on what type of external system is used, different interfaces are selected from the interface repository ( 112 ). Some external systems can use XML (eXtensive Markup Language) to communicate with LIME via application integration. Other applications, such as the SAP system, can use XML via application integration, a CIF (Common Interchange Format) interface, function modules, BAPI (Business Application Programming Interface) and BAdIs (Business Add-Inns). In some cases, the inventory management engine may also communicate with other function modules or engines in the same system through function modules and ABAP (Advanced Business Application Programming) OO (Object Oriented) methods.  
         [0038]    The inventory management engine provides the stock quantity data in response to transaction requests from the external systems. For example, a valuation system may send a transaction request requesting to monitor specific stock quantity data so that the valuation system can further process the data such as analyzing the data and producing a report based on the analyzed data. In the retail industry, such a process may include producing a report of the quantity and value of the merchandise in one or more locations.  
         [0039]    An exemplary implementation of the inventory management engine will now be described in further detail, in particular with regards to table structures, rules, and how to add or delete entries from a table.  
         [0040]    Data Table Structures  
         [0041]    An inventory management engine in accordance with one implementation of the invention will now be described by way of example.  
         [0042]    As can be seen in FIG. 2, the database model of a LIME kernel includes a hierarchical tree ( 200 ) that contains a set of guids (Global Unique IDentifiers) representing locations (L 1  through L 3 ), one or more handling units (H 1 ), stock units (S 1  through S 3 ) and serial numbers (Serial 1  through Serial  3 ). A location identifies the physical location of a stock unit and can, for example, be a warehouse, a warehouse gate, a delivery point, a shelf, a storage bin, and so on. A handling unit is an aggregation of stock quantities bundled together for distribution and logistics purposes. Examples of handling units include an individual item in a carton, combined items on pallets and skids, or items transferred in independently identified containers, such as ocean containers, rail cars or trucking trailers. A handling unit usually has a worldwide unique identifier SSCC (Serial Shipping Container Code). The quantity for a handling unit is always one. A stock unit is the smallest entity or item that can be handled and can be physically identified in a logistics process. A stock unit cannot be divided into components for logistic purposes. Single instances of a stock unit are not distinguished, but own the identical attributes and identifier. The stock unit is the carrier of the stock quantity. Examples of stock units include: material, trade item, SKU (T-shirt size L, style country, color green), batch (different production lots for paints, dyes, wallpapers, pharmaceutical products), quantity with a certain shelf-life expiration, serial number, split valuation new/used, manufacturer part number (separate stock units for different manufacturers), value only article is a stock unit using the currency unit as quantity unit, and so on.  
         [0043]    Every node in the hierarchical tree ( 200 ) has a unique identifier marked with “X” and a number. The hierarchical tree ( 200 ) is represented as a table identified by “/LIME/TREE” (not shown) in the inventory management engine&#39;s database. The “/LIME/TREE” table is one of the main components of the inventory management engine, and will be discussed in further detail below. First, however, the other tables in the inventory management engine will be described. These other tables include index tables ( 205 - 215 ), a stock table ( 220 ) identified by “/LIME/STOCK,” and a serial number table ( 225 ) identified by “/LIME/SERIAL.” 
         [0044]    There are three types of index tables in the inventory management engine; index tables for location ( 205 ), index tables for handling units ( 210 ), and index tables for stock units ( 215 ). The index tables ( 205 - 215 ) are used to map real world numbers (that is, business keys) to guids that are to be used in the /LIME/TREE, /LIME/STOCK, and /LIME/SERIAL tables. As can be seen in FIG. 2, there are two index tables for locations ( 205 ), which are marked LOC_I 001  and LOC_I 002 . It should be noted that none of the tables in FIG. 2 are complete, but are only used to illustrate the principle of the LIME database model. The location index table LOC_I 001  has a first column LGNUM representing a warehouse number and a second column LGTYP representing a storage type. The location index table LOC_I 002  additionally contains a third column LGPLA representing a bin location. As can be seen from the tables LOC_I 001  and LOC_I 002 , there is a unique guid L 1  for the warehouse number and storage type, and unique guids L 2  and L 3  for each of the bin locations. Similarly the handling unit index table ( 210 ) identified by HU_I 001  represents the SSCC with a unique guid H 1 . The upper one of the stock unit index tables ( 215 ) identified by STOCK_I 002  has a guid S 1  representing the material yogurt, batch C 1 , produced by Nestle. The lower one of the stock unit index tables ( 215 ) identified by STOCK_I 001  in which guid S 3  represents a gold ore owned by Smith, and a guid S 2  represents a cellular telephone owned by Nokia.  
         [0045]    All of the guids presented above are of a type referred to as index guids. Index guids refer to the index tables for location, handling unit, or stock item. Another type of guids that is used in the inventory management engine is of a type referred to as node guids. Node guids are used to identify nodes in the hierarchy tree ( 200 ). If the same stock item (for example, S 1  for material yogurt batch C 1 ) has stock quantities at two different places (for example, handling unit H 1  and location L 3 ), each stock quantity S 1  will have a different node guid (X 8  and X 6 ). A stock quantity can be found in the table /LIME/STOCK ( 220 ) with the node guid as a unique key. A serial number is linked to a stock quantity via the node guid and stored in the table /LIME/SERIAL ( 225 ).  
         [0046]    A stock quantity that is represented in several units, also referred to as a Multiple Transaction Quantity (MTQ), has the same node guid. This can, for example, be seen in node X 4  of the hierarchy tree ( 200 ), where the gold ore (identified by guid S 3 ) is represented as 1 TO and 1.15635 Oz, respectively. The /LIME/STOCK table ( 220 ) also reflects this by having two entries for the gold ore. As can be seen from the /LIME/STOCK table ( 220 ), the yogurt (identified by guid S 1 ) is represented in two units. However, this should not be confused with the MTQ, because in the case of the yogurt, it is only represented in one unit per location (KA at location X 8  and PC at location X 6 ). Consequently, when changes occur to the gold ore, both quantity entries for the gold ore in the stock table ( 220 ) need to be updated, but when changes occur to the yogurt in one of the locations, only the single quantity entry corresponding to that particular location needs to be updated. The described representation allows any one stock item to be represented in as many units as necessary, and it also allows any participant in the supply chain to access the stock item in any measurement unit, as long as the unit has been specified and added to the stock table /LIME/STOCK ( 220 ).  
         [0047]    The table /LIME/STOCK ( 220 ) is the only table containing stock quantities. A stock quantity refers to a specific node in the hierarchy tree ( 200 ). The exemplary /LIME/STOCK table ( 200 ) in FIG. 2 contains an index guid column with the guids obtained from the stock index tables ( 215 ), a parent column that identifies the parent node of the stock item, a VSI (Virtual Stock Indicator) column that indicates whether the stock item relates to a physical or virtual stock item, a unit column that indicates the unit of measure for the stock item, a quantity column that indicates the quantity of the stock item, and a node column that is a unique key for a stock quantity. The unit of measure is a key field, which allows stock items represented in multiple units of measure to have different entries in the /LIME/STOCK table ( 220 ). The VSI is included in the /LIME/STOCK table ( 220 ) since there can be a requirement to store the same physical stock quantity twice within LIME. For example, when a LIME is used in a warehouse, the VSI can be used to mark stock quantities as ‘transport pending’ in addition to the real physical quantities. Another requirement known from the oil and gas industry is to separate the so called “physical stock levels,” which are derived from absolute measurements of a stock item quantity, from the “book stock levels,” which are calculated by the system adding or subtracting delta quantities to the stock item quantity table. With the VSI indicator, this separation can be achieved. Queries can then use the VSI indicator to retrieve stock item quantities for a defined VSI only.  
         [0048]    In one implementation, a stock quantity node without a VSI is the real quantity and a stock quantity node with a VSI is a virtual quantity needed for special purposes only. The VSI ensure that the same physical quantity is not counted twice when calculating the total physical stock.  
         [0049]    The individual serial numbers are stored in a table ( 225 )/LIME/SERIAL and can be linked to any type of stock item through the node guids without having to add the serial number field to the corresponding index table. The number of serial number entries is linked to the stock quantity in a specific unit of measure, for example, three serial numbers are linked to the node X 7  which has a quantity of 3 in the stock index table ( 220 ) in FIG. 2. In an alternative implementation, serial numbers can be stored as stock quantity entries in table ( 220 ), but that might lead to a very large number of entries in the stock index table ( 220 ) and might be performance-critical for queries.  
                                           TABLE 1                                       Parent   Parent   Parent           Guid   Idx   Type   Parent   Idx   Type   Level   Node                   S3   001   S   L1   001   L   1   X4       S3   001   S   ROOT   —       2   X4       S2   001   S   L3   002   L   1   X7       S2   001   S   L1   001   L   2   X7       S2   001   S   ROOT   —       3   X7       S1   002   S   L3   002   L   1   X6       S1   002   S   L1   001   L   2   X6       S1   002   S   ROOT   —       3   X6       S1   002   S   H1   001   H   i   X8       S1   002   S   L2   002   L   2   X8       S1   002   S   L1   001   L   3   X8       S1   002   S   ROOT   —       4   X8       H1   001   H   L2   002   L   1   X5       H1   001   H   L1   001   L   2   X5       H1   001   H   ROOT   —       3   X5       L3   002   L   L1   001   L   1   X3       L3   002   L   ROOT   —   L   2   X3       L2   002   L   L1   001   L   1   X2       L2   002   L   ROOT   —       2   X2       L1   001   L   ROOT   —       1   X1                  
 
         [0050]    Table 1 above contains the relationship between a hierarchy node and its parents as well as all ancestors (grand-parents and higher). A node at the highest hierarchy level has a default parent ROOT. The node guid is the exact identifier of a node and can be used to retrieve the complete path from a node to all the ancestors of the node. The column headings Idx and Type above refer to index table number and index table type, respectively. In this exemplary implementation of the LIME engine, the structure and the entries of the /LIME/TREE table have two primary goals. First, writing to the /LIME/TREE table should be fast. Therefore, there is only a small number of fields and all entries (relationship node to parent and node to ancestors) can be inserted in a single database statement. Second, queries, in particular bottom-up queries, such as “Where can I find a stock quantity (node) within a location (ancestor)?” need to be efficient. This is particularly important for warehouse management applications, where it should be possible to obtain information with a minimum of DB accesses. With the /LIME/TREE table it is possible, for example, to read the stock quantity node guids directly of any location (ancestor) in the hierarchy tree, read the stock quantity of any node in table /LIME/STOCK ( 220 ) via the node guid, and read the intermediate nodes (e.g. HU, sub-location) in /LIME/TREE via the node guid if the hierarchy information is requested by the query.  
         [0051]    Furthermore, no additional entries are requested in the table /LIME/TREE for MTQ (Multiple Transaction Quantities) of the same stock item. All quantities have the same guids (stock index guid, parent index guid, node guid) because they represent the same physical stock. The MTQ quantities are kept in table /LIME/STOCK ( 220 ) only (where the unit of measure is a key field).  
         [0052]    Table Rules  
         [0053]    The table structures described above allow the users to build virtually any kind of hierarchy, but the logical consistency needs to be checked against two kinds of rules, namely hierarchy rules (for example, a stock guid cannot have any children; a HU cannot be parent to a location, the highest node should always be a location, and so on) and business logic rules (for example, a bin location cannot be parent to a plant/storage location, and so on). A user can define specific business rules in customizing/system tables.  
         [0054]    In one implementation of the inventory management engine, the hierarchy rules are as follows:  
         [0055]    1. Stock quantities can only be found at stock item level. There can be no stock quantities at the handling unit, location, or serial number levels.  
         [0056]    2. A serial number is always linked to a stock item. The serial number cannot be linked directly to a handling unit or to a location.  
         [0057]    3. A multi-level hierarchy of locations (nested locations) and handling units (nested handling units) is possible.  
         [0058]    4. A multi-level hierarchy of stock items (containing the stock quantities) is not allowed (no nested stock items).  
         [0059]    5. A stock item must have either a handling unit or a location as parent.  
         [0060]    6. A stock item can be appended to each node of the hierarchy. It is thus possible to represent a location containing materials on handling units and materials without handling units.  
         [0061]    7. A location can exist without a handling unit or without a stock item (empty location).  
         [0062]    8. A handling unit can exist without a stock item (empty handling unit).  
         [0063]    9. A stock item or a handling unit cannot exist without a location.  
         [0064]    10. A location can only have another location as parent (no handling unit or stock item).  
         [0065]    11. A node in the hierarchy tree can only have one parent.  
         [0066]    12. A specific location or a specific handling unit can only exist once in the hierarchy tree. Consequently, it is not possible to have a recursive hierarchy.  
         [0067]    A user may define additional hierarchical rules and business rules to further constrain the functionality of the inventory management engine to specific situations, if necessary.  
         [0068]    The database model and index tables described above are also shown in FIG. 3 in the form of a conventional entity relationship diagram for stock quantities.  
         [0069]    Creating and Deleting Entries in the Inventory Management Engine  
         [0070]    To add new locations, handling units, or stock items, entries need to be created in the corresponding index table and in the hierarchy tree. In one implementation, stock items can be created “on the fly” with a goods movement, while handling units need to be created through calling a particular maintenance module. When creating a location, a handling unit, or a stock item the LIME ensures that the hierarchy rules described above are not violated. In one implementation this means that a parent node always needs to be specified for locations or handling units. For locations (but not for handling units or stock items), the parent node can be the ROOT node. Whenever entries in the index tables are updated, the LIME updates the tree table /LIME/TREE and performs the necessary checks.  
         [0071]    Entries in the stock index tables can be created without specifying a parent node. The new stock table entries are integrated into the table representing the hierarchy tree when a goods movement process occurs. The integration takes place by calling a BADI that enables the caller to decide if the stock should be created, or if the goods movement should be canceled with an error. Materials with batches or goods movements with new stock categories are examples of were it could be suitable to create stock entries “on the fly.” 
         [0072]    [0072]FIG. 5 shows how the index tables and their entries are changed when creating the location L 2  and the handling unit H 1 . In addition to creating the location L 2  and the handling unit H 1 , two batches of the material ‘Butter’ are also created in a goods movement operation. Originally, only the rightmost hierarchy tree ( 500 ) exists and the corresponding entries in tables  510 ,  520 ,  525  and  530 , that is, entries with guids L 3  and S 1 . When a user wishes to create a new location, the location index table ( 510 ) is updated with the new location information and a new guid L 2  is assigned. The hierarchy tree table ( 525 ) is also updated with a new entry that corresponds to L 2  and only has ROOT as a parent, and a new node guid X 2  is assigned to the new location L 2 .  
         [0073]    Next, a handling unit is created in location L 2  by creating an entry in a handling unit index table ( 515 ) and updating the hierarchy tree table ( 525 ) with the corresponding handling unit entry, as well as adding a new node guid X 5  to the handling unit. Finally a set of two stock items “Butter” are added to the handling unit by updating the stock index table ( 520 ) with two new entries. The new guids S 2  and S 3  are generated for the two new “Butter” items, and the corresponding entries are created in the stock item table ( 530 ) and in the hierarchy tree ( 525 ) table. The resulting hierarchy tree ( 505 ) is shown in the left hand side of FIG. 5. How the actual writing to the various tables is carried out will be discussed in further detail below.  
         [0074]    In this exemplary implementation of the invention, it is only possible to delete locations or handling units if the locations or handling units are on a leaf level of the hierarchy tree, that is, if the location or handling unit does not have any children. Entries from the stock index tables can be deleted only if the corresponding entries to be deleted from the table /LIME/STOCK has a quantity of zero.  
         [0075]    Writing and Reading Data in the Inventory Management Engine  
         [0076]    The data table model used in LIME has been designed to allow fast queries for complex supply chain networks and fast writing of data when stock movement documents are posted. Entries of the table /LIME/STOCK can be identified using either the guid and parent guid combination, or using the node guid. For goods movements, the guid and parent guid combination is used to avoid an additional select operation on the /LIME/TREE table. Queries use the node guid when the stock item, but not the direct parent, is specified.  
         [0077]    Movements of products for owners and total stock levels result in updates of only one table (the /LIME/STOCK table). As long as the hierarchy is not changed, table /LIME/TREE does not change and does not need to be updated. Movement of the handling unit to a different location, on the other hand, results in a change in table /LIME/TREE but table /LIME/STOCK remains unchanged. Similarly, a stock change can be posted to the handling unit, which in return leads to an update of the relevant entry in table /LIME/STOCK only.  
         [0078]    [0078]FIG. 6 shows how a goods movement is reflected in LIME. In the example it is assumed that stock S 1  (yogurt), in location L 3  (warehouse number 0001 and storage location 0002) is increased by 10 liters and 11 kilograms, respectively (in the scenario, it is assumed that yogurt is measured both in the units liters and kilograms). First, the location guid (L 3 ) is selected in the location index table /LIME/LOC_I 001 . Second the stock guid (S 1 ) for yogurt is selected in the stock index table /LIME/STOCK_I 001 . Finally the stock corresponding to guids S 1  and L 3  is updated in the stock table /LIME/STOCK.  
         [0079]    With the hierarchy tree table concept, most queries can be carried out using a single select statement (joined with the relevant index table) on the table /LIME/TREE. A distinction can be made between two general types of queries: top-down queries, where the basic query is “Show me what I contain,” and bottom-up queries, where the basic query is “Show me where I am in the world.” Depending on the business scenario and setup of the supply chain, optimized queries can be developed using this basic conceptual approach.  
         [0080]    [0080]FIG. 7 shows how LIME selects the stock of S 1  in location L 1 . First, the location guid (L 1 ) is selected in the location index table /LIME/LOC_I 001 . Second the stock guid (S 1 ) for yogurt is selected in the stock index table /LIME/STOCK_I 001 . Third, the nodes in the hierarchy table /LIME/TREE are identified using the guids S 1  and L 1 . Since the table /LIME/TREE holds all parents of a stock item, it is possible to find all occurrences of a stock item with only one select operation on the table /LIME/TREE. It is not necessary to do one select operation for each level against the tree table. From the hierarchy table /LIME/TREE, it can be seen that the nodes are X 5  and X 7 . Finally, the stock quantities corresponding to nodes X 5  and X 7  are retrieved from the “Quantities” column in the stock table /LIME/STOCK.  
         [0081]    Functional Overview  
         [0082]    A more detailed process for inventory management in accordance with one implementation of the invention will now be described with reference to the schematic block diagram ( 400 ) in FIG. 4. In FIG. 4, all the blocks outside the dashed lines (that is, blocks  402 - 412 ,  418 ,  438 , and  444 - 450 ) represent external components, while all the blocks inside the dashed lines (that is, blocks  414 - 416 ,  420 - 436 , and  440 - 442 ) represent the inventory management engine.  
         [0083]    LIME receives a message from a calling application ( 402 ,  404 ) containing stock movement data or physical inventory data. The message can be an XML document that is forwarded to LIME via an Application Integration Server ( 412 ) or it can be a function module call from a mySAP application ( 404 ). The incoming document is kept by LIME during the whole process.  
         [0084]    LIME then generates ( 414 ) an update log (prima nota) ( 416 ) if necessary. The prima nota holds all input data that is required for recovery in the event of a system failure or auditing. After generating the prima nota ( 416 ), LIME extracts ( 420 ) its own data from the incoming document, such as location, handling unit, stock quantities, and so on and maps it to the LIME internal structures described above according to a set of mapping rules ( 422 ). An external data check or data enrichment ( 418 ) is also carried out, if necessary, and a stock quantity controller ( 424 ) updates a stock quantity database ( 426 ).  
         [0085]    External applications ( 406 - 410 ) can submit stock inquiries to LIME through the stock quantity controller ( 424 ). Each application that is interested in stock movement or physical inventory documents subscribes to LIME, and defines the dispatching rules for the documents. Users of the LIME application can include rules based on various conditions, such as which criteria are relevant for the subscribing application (for example, finance applications need to be informed of changes in stock ownership), how often the subscribing application will receive documents from LIME (for example, once per day), and whether the documents will be cumulated by LIME before dispatching and what the aggregation rules are.  
         [0086]    An event controller ( 430 ) then checks the subscriber rules ( 436 ) for the various applications and forwards the document (maybe in cumulated form) to the interested applications using a dispatcher ( 432 ). The forwarding may include adding cumulated data ( 428 ) and obtaining other external data ( 438 ) for enrichment ( 440 ) with the LIME data before the LIME data is passed on to the receiving applications. The receiving applications may include an MM-IM system ( 444 ), a R/3 accounting interface ( 446 ), and an Application integration server ( 448 ). The application integration server ( 448 ) may call various subsequent applications ( 450 ), such as finance applications, legacy applications, and so on. These applications can in turn customize ( 442 ) the subscriber rules ( 436 ) used by the event controller to dynamically change the behavior of the event controller ( 430 ) and dispatcher ( 432 ) before the next event takes place.  
         [0087]    MTQ Usage Scenarios  
         [0088]    [0088]FIG. 8 shows an example of an oil terminal tank containing diesel from two different owners (Exxon and Shell). The diesel stock is kept in several units of measure (liter, denoted by L, and liter at 12° C., denoted by L 12 ). The hierarchy tree ( 800 ) in the left hand side of FIG. 8 shows the real-world view, and the hierarchy tree ( 805 ) in the right hand side of FIG. 8 shows the internal representation in LIME.  
         [0089]    The oil terminal tank is represented by location guid L 1 , as shown in the location index table LOC_I 005 . The owner is a key field of index table STOCK_I 003 , therefore the same material has a different guid for each owner, that is, S 1  (for Exxon) and S 2  (for Shell). In the stock table /LIME/STOCK, each owner&#39;s oil is represented by two entries, one for each unit of measure and each having an associated quantity. The unit of measure is a key field in the stock table /LIME/STOCK, so that all MTQ quantities can be managed with the same guid and parent guid combination. Physically the MTQ quantities belong to the same stock item.  
         [0090]    [0090]FIG. 9 shows an example, similar to the one shown above in FIG. 8, of an oil terminal tank containing diesel from two different owners (Exxon and Shell). Also here, the diesel stock is kept in liters and liters at 12° C., respectively. The hierarchy tree ( 900 ) in the left hand side of FIG. 9 shows the real-world view, and the hierarchy tree ( 905 ) in the right hand side of FIG. 9 shows the internal representation in the LIME. The example in FIG. 9 is different from example in FIG. 8 because of the addition of node X 4  to the hierarchy tree ( 905 ) in the LIME. The addition of node X 4  allows inventory difference handling in tank management, as will now be explained.  
         [0091]    Whenever a goods movement occurs for a specific owner, one or both of nodes X 2  (Diesel Exxon) and X 3  (Diesel Shell) is/are updated, depending on for which owner the goods movement took place. The total tank stock is regularly measured and an inventory report (in absolute quantities) is posted to node X 4  (that is, the total amount of diesel in the tank, which is a non owner-specific measurement).  
         [0092]    The virtual stock indicator (VSI) indicates that the same physical quantity is stored twice in LIME. Stock item quantities with a VSI value should not be considered when calculating the total physical stock represented in LIME. Differences between the owner-specific stock (X 2  and X 3 ) and the total stock can now be analyzed by comparing the goods movement postings to X 2 -X 3  and the inventory reports to X 4 .  
         [0093]    A number of embodiments of the invention have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. For example, the stock quantity data in the database can be distributed among one or more databases. Accordingly, other embodiments are within the scope of the following claims.