Skip to main content

Celonis Product Documentation

Local job: inventory management - full transformations

Extractions

Please see 8.2 Appendix 2: Table Requirements for the list of table requirements for the extractions. Note, for the P2P, O2C, and PP tables, those extractions should have already been performed in the respective data pools. Although the inventory management team tries very hard to keep this information up to date, it is possible that the list of table requirements is slightly out of sync with the requirements of the extraction tables.

Create Tables: Currency Conversion

This transformation is used to transform the TCURR and TCURF tables into an appropriate format such that they can be used for currency conversion throughout the other transformations.

Create Tables

Qty Unit ConversionThis transformation is used to create a reduced version of the table MARA to create conversions from any unit to a base SI or non-SI unit. Conversion rates are computed using T006 and MARM.The desired base unit for non-SI units can be defined using data pool parameter targetQtyUnit. It is currently not a part of the standard to convert into multiple different units. If this is a core requirement, please create a support ticket to discuss options.

Create Table

IM_MARC [Case Table]This transformation is used to transform the standard MARC Table into that of the Case Table of the MM data model. The unique identifier of this table is the Material || Plant combination, so the specific material in a specific plant. The table is extended by adding fields from T001W, MAKT, T001K and T001.

Create Table: _CEL_IM_ACTIVITIES [Activity Table]

This transformation is used to transform the MSEG table into the _CEL_IM_Activites table. The table is extended by the MKPF (Material Movement Head Table) to include the exact eventtime of the material movement activity, as well as the username of the document’s creator.  

The activities of this activity table are unique compared to the other standard processes because they are activities on the Material || Plant object. This means that not a single document is followed as the case (like in the P2P process for example), but rather all the activities pertaining to the stock keeping unit (SKU) are tracked. 

The T156T table and the T003T table are used to obtain readable names for the movement types and movement descriptions respectively.

T156

The T156 table is used to determine whether a material movement should be considered a consumption or a replenishment, or not considered at all. 

The T156.KZVBU field is used to determine whether a material movement signifies a change in inventory (ie. replenishment or consumption). The options for this field are:

  • NULL: No consumption update

  • G: Planned withdrawal (total consumption)

  • R: Planned, if ref. to reservation, otherwise unplanned

  • U: Unplanned withdrawal (unplanned consumption)

When NULL, the join condition is not met, and therefore those movements are not considered in the consumptions/replenishment columns.

example_jobs_1.png

The MSEG.SHKZG fields (credit or debit indicator) combined with the T156.XSTBW field (whether the movement type is a cancellation / reversal or not)  are leveraged to distinguish between replenishment and consumption. 

So for the CONS_QTY field, the logic highlighted in blue checks whether the consumption is a credit (credit = H = stock being reduced), and then checks if the cancellation / reversal field is null (indicating that the movement is in fact an actual consumption, not a reversal of a consumption). Movement 261 (goods issue for an order) would fall into this category as an example. 

The logic highlighted in yellow indicates that the movement was for a consumption that was reversed. Movement 262 would be an example of a reversal, as it is defined as a goods issue reversal / cancellation. In this case, the reversal is considered as a negative consumption, as stock comes back into the company, but not as a traditional replenishment.

example_jobs_2.png

The same logic applies for the REPL_QTY fields, however with the opposite approach for the CONS_QTY. Namely, the order of the S and H in the case when.

example_jobs_3.png

QTY_UNIT_CONVERSION

There is a join to QTY_UNIT_CONVERSION present in the IM_Activities table which is used to convert the consumptions into SI units. For example, if one company uses LBs, and another company KGs, this cannot be compared 1:1 inside of the application. This is resolved by converting the units to the SI units based on the quantity dimension (eg. mass, volume, length, etc.). In the event that the dimensions are null, which is the case for ST (Stueck / pieces), then the quantity conversion remains unchanged.

example_jobs_4.png

Create Table: IM_MARA

The IM_MARA table is used to provide standard MARA fields, as well as additional name mappings to the Materials present within the data pool. The additional tables T023T and T134T are required for those mappings. 

Create Table: IM_RESB

This transformation is used to create the IM_RESB table, which is used to import all Reservation Orders into the Inventory Management data model. There is a join made on QTY_UNIT_CONVERSION in order to convert the reservation quantities into SI units. The important data from this table is ultimately the reservations that are still open, what materials and plants these are for and what quantities and due dates are required. This information is primarily used in determining the Stock Requirements projected into the future. In the transformation there is a where exists statement that ensures only materials present in the MARC table are considered in the RESB table. 

Create Table: IM_PBED

This transformation is used to create the IM_PBED table, which is used to import all Independent Requirements into the Inventory Management data model. All PBED fields are selected in this transformation, and some additional fields from PBIM are added (Material Number and Plant Number), allowing for the join to MARC to be made in the data model. There is a join made on QTY_UNIT_CONVERSION as well in order to convert the required quantities into SI units. The important data from this table is ultimately the requirements that are still open, what materials and plants these are for and what quantities and due dates are required. This information is primarily used in determining the Stock Requirements projected into the future. In the transformation there is a where exists statement that ensures only materials present in the MARC table are considered in this table. 

Create Table: IM_PLAFT

his transformation is used to create the IM_PLAF table, which is used to import all Planned Orders into the Inventory Management data model. There is a join made on QTY_UNIT_CONVERSION in order to convert the reservation quantities into SI units. The important data from this table is ultimately the future planned orders, what materials and plants these are for and what quantities and due dates are required.

example_jobs_5.png

Entries already connected to purchase orders, production orders, or reservations are not imported. This information is primarily used in determining the Stock Requirements projected into the future. In the transformation there is a where exists statement that ensures only materials present in the MARC table are considered in the RESB table. 

Start of Stock History Table Creation

This transformation is empty, and is simply used to mark the start of the stock history table transformations. The Stock history table compiles information from the Valuated Inventory, Sales Order Inventory, Unrestricted Use Stock, Inventory in Transit and Material Movements. The next sections will detail the specifics of each transformation.

Create Temp Table: VALUATED_STOCK_HISTORY_TMP

The Valuated Stock History table is based on the MBEW and MBEWH tables, which evidently store information about the current valuated inventory on hand and the historic valuated inventory on hand respectively. 

Due to the way SAP stores valuated inventory (current and historic), a series of transformations are required to construct a time series representation of this. There is step by step information on this table’s creation inside of the transformation. 

The final result of the table is a month by month history of valuated inventory for each unique Material || Plant combination in the data pool, dating back 24 full months plus the current month.

Create Temp Table: SALES_ORDER_STOCK_HISTORY_TMP

The Sales Order Stock History is used to display the current and historical inventory that was reserved for sales orders. The tables involved are EBEW and EBEWH. It is quite common that these tables are not populated. So if that is the case, simply disable the extraction. A very similar transformation approach to the Valuated Stock History is used for creating this table. The main difference between the two is that the EBEW and EBEWH tables also store VBELN information, hence one aggregation level lower than the MBEW/MBEWH tables. As commented in the transformations, this requires us to carry the Sales Order case key through the first couple of transformations, before aggregating up to the material || plant later on. 

The final result of the table is a month by month history of sales order stock for each unique Material || Plant combination in the data pool, dating back 24 full months plus the current month.

Create Temp Table: UNRESTRICTED_USE_STOCK_HISTORY_TMP

The Unrestricted Use Stock is based on MARD and MARDH tables, and is used to create the current and historical inventory that is unrestricted for use. A very similar approach to the Sales Order Stock table creation is used for this table, as the aggregation level is also one level below Material || Plant, in this case also considering the storage location (LGORT). The final result of the table is a month by month history of unrestricted use stock for each unique Material || Plant combination in the data pool, dating back 24 full months plus the current month.

Create Temp Table: STOCK_IN_TRANSIT_STOCK_HISTORY_TMP

This table is used for storing the current and historical stock in transit information, aggregated to the Material || Plant level for each month. A very similar approach is used to the unrestricted and sales order stock. 

Create Temp Table: MATERIAL_AVAILABILITY

The main objective of this transformation is to create a table that stores the number of days material was available per SKU per month. Availability is defined as inventory qty on hand being greater than zero. This can be adjusted in Step 10 of the transformation if desired. Additionally, the table also stores both the minimum and maximum inventory quantities per SKU per month. See inside of the transformation for a more detailed step by step breakdown of the transformation. 

Create Table: IM_STOCK_HISTORY

This data job is where the final Stock History table is created. This involves two prior steps which are also explained in the data job comments. This table forms the core of the IM data model. 

The first is to create a temporary consumptions and replenishments table that aggregates that data to the material || plant || month level. 

Secondly, a temporary table is created to union the 4 prior temporary tables together. If you do not require one or more of those input tables, simply comment them out of the union function. 

Thirdly, the temporary unioned table is transformed, aggregating over SKUs per month.

Fourthly, the aggregated unioned table, the consumption and replenishment table and the material availability table are joined together, allowing the consumption and replenishment, and material availability history to be present alongside the various inventory fields. This table’s final primary keys are the Client Number, Plant Number, Material Number, and Eventtime. 

The final step is to update the eventtime of the table to the date the transformation is run on for the current month. This ensures that all historical months show the eventtime as the last day of the month, whereas the current month shows the date of the transformation. 

Create Temp Table: M_BOM

The objective of this transformation is to create a graph that stores information about Stock Keeping Units (SKUs) and their relation to other SKUs within the Bill of Materials (BOM). The table is structured in a graph format, whereby there is a node (case key), an output column and an input column, as well as additional metadata valuable for later analysis. For a full overview of this transformation, please refer to the presentation “Inventory Management Connector - Bill of Material Technical Overview” within the help space.

Create Temp: Table M_BOD

The objective of this transformation is to create a graph that stores information about SKUs and their relation to other SKUs within the Bill of Distribution (BOD). This allows for analysis into how material ‘could’ flow between plants, based on the special procurement types set up inside the SAP system. For a full overview of this transformation, and a detailed description of the graph logic, please refer to the presentation “Inventory Management Connector - Bill of Distribution Technical Overview” within the help space.

Create Table: IM_MDSC

The MDSC table is created by unioning (combining) the M_BOM table and the M_BOD table. The only addition to the union is the addition of an extra column ‘Source_Column’. This enables the user to filter the network inside the app based on the source column, for example to just display SKUs that are present in the BOM network. Clean UpWhere activities are removed from the IM_ACTIVTIES table that contain null activity names.