Understanding How Proportional Units of Measure Are Stored in Tables
SAP provides the capacity to use various Units of Measure in pre-defined ratios in batches where the proportion of one component cannot be fixed, but will be different in every batch. Industry sectors like pharmaceutical, chemical, steel and paper utilize these Proportional Units of Measure throughout the logistics chain when creating product in Batches.
This whitepaper explains how to find and use these data stored in tables for the purpose of extracting them from SAP systems, validation of load files and for post-load validation and reporting. The esoteric way that this data is stored is a bit complicated, but not much more complicated than the way that SAP stores Batch Classifications.
The data starts with the 023 Batch Classification to which the Material Master is extended, but the data is stored in the AUSP and MARM tables in a way that can be explained with these diagrams. The fist diagram demonstrates how the proportions are stored as floating point values in ATFLV of the AUSP table, but only after being picked up in the INOB table as an CUOBJ value from the concatenation of MARA-MATNR and MARA-KZWSM.
The above diagram explains how the proportion value is linked to the Characteristic, but not how the Alternative Unit of Measure is linked to the Characteristic. While it was hard to find, the solution that SAP used to store this Unit of Measure value here is very simple.
In the MARM table, there is an ATINN field that is populated with the CABN-ATINN value of the characteristic linked exclusively to that Unit of Measure in the record of that Alternative Unit of Measure for that Material Master. The diagram below shows how the second half of this data is stored in tables by SAP.
In the same MARM data is stored the proportions that are auto-populated when loading Proportional Units of Measure. SAP simply takes the numerator and denominator values and applies them accordingly to the Proportional Units of Measure (see the blue box and arrow above).
A short snippet of recyclable SQL code calls up the data knit together in an easy-to-read format that can be used to see the values in an SAP system without the MM03 transaction. In this case, the requirement to manually populate the Proportional Units of Measure in a production system with the data from a legacy system to which there was no direct access necessitated the extraction of the data from a snapshot of the legacy tables..
Recyclable Code
If SLT is available (or SAP Replicator) then the snippet of code below will produce some useful results. Add any additional filters desired to the bottom of the code.
select mara.MATNR,cabn.ATNAM, marm.MEINH, ausp.ATINN, ausp.KLART, ausp.ATFLV from SAP_SERVER.dbo.inob join SAP_SERVER.dbo.mara on (concat(mara.matnr,mara.kzwsm) =inob.objek) join SAP_SERVER.dbo.ausp on (inob.cuobj=ausp.objek) left outer join SAP_SERVER.dbo.cabn on (cabn.atinn = ausp.atinn ) left outer join SAP_SERVER.dbo.marm on (marm.atinn = ausp.atinn and marm.matnr=mara.matnr) where mara.mstae = '4' -- plus whatever other filters you want here.