In my earlier article “Inner workings of currency conversion functionality in Spend Performance Management 2.1” I talked about the currency conversion functionality. In this article I will explain the Unit of Measure conversion functionality. This functionality was also introduced starting 2.1 version of the application.
UOM conversion is item dependent unlike currency which is not, hence the design for UOM conversion is quite different in comparison to currency conversion. This is also based on standard BW functionality. In the application UOM conversion is done in 2 locations:
- At load time
- During report execution
As part of the standard data model DSO object “0ASA_DS26” is provided, this stores the conversion factor from transaction unit to reporting unit for each item in the system. This data is loaded into the generated DSO object “0UOMLOCPR” which is used during any conversion call. This generated DSO is based on the base info-object “0XALOCPROD”. This is all based on standard BW unit of measure conversion functionality which is well explained on help.sap.com – Quantity Conversion
UOM conversion at load time
When data gets loaded into inbound layer of the data model the API’s converts the transaction (document) unit to global (reporting) unit, provided the conversion factor for each item is loaded. If this conversion factor is not loaded the system does not load the reporting unit. Also the conversion factor is looked up from the DSO object “0ASA_DS26”. Also reporting UOM is available in the inbound layer only and reporting UOM is moved up to ‘Detail’ and ‘Reporting’ layer of the data mode.
UOM conversion during report execution time
In this case users can choose to display quantity measures in a specific unit of measure (local unit); the system will convert quantities from reporting units to this local unit provided conversion factors have been loaded for each item. Cases where the conversion in not available the system will display the reporting unit of measure.
As an example let’s say the transaction unit for item 1025 is ‘KG’ and the reporting unit for this item is ‘LB’. Now if the user wants to display this item in ‘Carat’. If the conversion factor has been loaded the system will perform the conversion if not the system will display the value in ‘LB’.
Below is the sequence of event that takes place for Unit of Measure conversion.
1. The user executes a report with at least one measure of type quantity and specifies a target unit of measure.
2. The application passes this target UOM using the variable “SSA_TARGET_UOM”; this can be changed in the application properties (Administration -> Analysis Administration -> Application properties -> Data sources tab -> Data source details -> Currency/Unit tab).
3. The system calls the BW query and for UOM conversion the measure marked ‘Local’ is used.
5. Looking at the details of this conversion type (using transaction RSUOM) the system will translate it to the target UOM the user selected using the conversion specified. The conversion factor itself is stored in DSO “0UOMLOCPR”, this in turn gets loaded from DSO “0ASA_DS26”.
Configuring UOM conversion in UI
Using the conversion functionality provided the system allows users to display items in different units, how is this achieved? Here are the details of how to configure this. Let’s say you are trying to introduce a new measure ‘Spend Quantity’ which has three units Global, Local, Document. You can expose the Global and Local unit key-figures to the BW query. Then in the application properties set the property of the Local child as show below
With this setting the local unit is not visible when building a report but available only the request for as show in the next step.
Now when the user selects the units during report execution the corresponding measures will be added to the report.