## 4.2.15.12.2.1  Creating a Unit of Measurement
Use method CREATE to create a unit of measurement.
##  Caution
Changing the initial set of configurations has implications. Before proceeding with any change, familiarize yourself with the warnings in Units of Measurement [page 1517].
## Import Parameters
| Parameter Name   | Field Name   | Value Help                                                                                                          |
|------------------|--------------|---------------------------------------------------------------------------------------------------------------------|
| UNIT_DIMID       |              | Dimension key                                                                                                       |
| UNIT_INT         |              | Internal unit of measurement                                                                                        |
| UNIT_CRE_TS      |              | Structure for creating a unit of meas- urement                                                                      |
|                  | COMMERCIAL   | Commercial/external measurement unit format                                                                         |
|                  | TECHNICAL    | Technical measurement unit format                                                                                   |
|                  | DEC_ROUND    | Number of decimal places to which this measurement unit should be rounded for conversion                            |
|                  | NUMERATOR    | Numerator for conversion to SI unit                                                                                 |
|                  | DENOMINATOR  | Denominator for conversion into SI unit                                                                             |
|                  | EXPONENT     | Base ten exponent for conversion to SI unit                                                                         |
|                  | CONSTANT     | Additive constant for conversion to SI unit                                                                         |
|                  | DEC_DISP     | Number of decimal places with which this measurement unit is displayed                                              |
|                  | ISOCODE      | ISO code for measurement units. An ISO code can be assigned to several internal measurement units of a dimen- sion. |
|                  | PRIMARY      | Unit of measure flagged as a primary unit for an ISO code Space : Not primary 'X' : Set as primary                  |
|                  | TEXT         | Description of a unit of measurement                                                                                |
|                  | LONG_TEXT    | Long description of a unit of measure- ment                                                                         |
|                  | ISCOMMERCIAL | Flag for commercial measurement units                                                                               |
| Parameter Name   | Field Name      | Value Help                          |
|------------------|-----------------|-------------------------------------|
|                  | ISVALUEBASE     | Value-based commitment indicator    |
|                  | ISGRPBYFAM      | Measurement units grouped by family |
|                  | TEMPERATURE     | Temperature value                   |
|                  | TEMPERATUREUNIT | Temperature unit                    |
|                  | PRESSURE        | Pressure value                      |
|                  | PRESSUREUNIT    | Pressure unit                       |
## Export Parameters
Parameter Name
Value Help
ERROR
Space
: No error
'X'
: Save error
##  Note
Class exception CX\_UOM\_ERROR is raised to check the integrity of the data import parameters.
##  Sample Code
```
CLASS zcl_uom_unit_create_test DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES if_oo_adt_classrun. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zcl_uom_unit_create_test IMPLEMENTATION. METHOD if_oo_adt_classrun~main. DATA(lo_uom) = cl_uom_maintenance=>get_instance( ). DATA(ls_unit) = VALUE cl_uom_maintenance=>ty_uom_cre_ts( commercial  = 'ZYX' technical   = 'ZYX' denominator = '1' numerator   = '1' dec_disp    = '3' long_text   = 'Create Unit' ).
```
```
TRY. lo_uom->create( EXPORTING unit_dimid  = 'AAAADL' unit_int    = 'ZYX' unit_cre_ts = ls_unit IMPORTING error       = DATA(lv_error) ). CATCH cx_uom_error INTO DATA(lo_error). out->write( | Exception raised | ). out->write( lo_error->get_text( ) ). ENDTRY. IF lv_error = abap_true. out->write( |Error occurred while saving the data in the database| ). ENDIF. ENDMETHOD. ENDCLASS.
```