cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Insert using MDM java API

Former Member
0 Kudos

Hi,

I am using MDM java API to insert record into MDM repository. I want to insert fields of type real and measurement.

What types i can use in webdynpro to insert values into these fields.

Kindly suggest.

Accepted Solutions (1)

Accepted Solutions (1)

NarendraChandel
Contributor
0 Kudos

Hi prashanthi,

please use the below code to get the unit ID.

UnitId unitId = new UnitId(1);//u need to check by putting values like 1,2,3,4,5 etc.

and see what value got inerted by using these digits.

hope this will help.

Regards

Narendra

Greg_Austin
Active Participant
0 Kudos

Better than guessing values is to use the DimensionManager class. Use the GetRepositoryDimensionCommand to get an instance of DimensionManager. Then use DimensionManager to get DimensionIds and UnitIds for each Dimension type. See the javadocs for more details.

-Greg

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Inserting real type field is solved with using float.

For below constructor how will i get the Unit ID.

MeasurementValue(double value, UnitId unitId)

Thanks,

Prasanthi.

Greg_Austin
Active Participant
0 Kudos

The MeasurementValue constructor takes a double, for real type fields you will use a FloatValue object which takes a float in the constructor. You can also make context attributes of type MeasurementValue and FloatValue if that makes sense for your application.

-Greg