cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to save multi-lingual value for qualifier field

Former Member
0 Kudos

Hi guys,

I have a qualified lookup field in main table, and one qualifier field has multi-lingual set to true. Now i'm able to save normal string value to qualifier field, but when I tried to save multi-lingual value I got below error:

java.lang.IllegalArgumentException: Field with ID 'F199_823' either is not qualifier field or belongs to another table

at com.sap.mdm.internal.valuetypes.QualifiedLinkValueImpl.getQualifierValue(QualifiedLinkValueImpl.java:170)

at com.sap.mdm.valuetypes.QualifiedLookupValue.getMultiregionQualifierFieldValue(QualifiedLookupValue.java:147)

The code I used:

QualifiedLookupValue qualifiedLookupValue = new QualifiedLookupValue();

int index = qualifiedLookupValue.createQualifiedLink(recordLookup); // recordLookup is the record in qualifier lookup table

MultiregionValue multiRegionValue = qualifiedLookupValue.getMultiregionQualifierFieldValue(index, fldQualifier); // fldQualifier is the qualifier field in qualified lookup table

multiRegionCharValue.setValue("engUSA", new StringValue("qualifier value - EN"));

qualifiedLookupValue.setQualifierFieldValue(index, fldQualifier, multiRegionValue);

recordMain.setFieldValue(fldQFT, qualifiedLookupValue); // recordMain is the record in main table that I want to set multi-lingual qualifier value; fldQFT it the qualifier lookup field in main table

Anyone knows if the getMultiregionQualifierFieldValue() API should be used like this?

Thanks,

James

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi James,

The Error clearly states that FieldId(fldQualifier) that you are using is in correct i.e. that Field is not a qualifier or it does not exists in the table.

There is nothing wrong in the way you are using the API.

Regards,

Sruti

Former Member
0 Kudos

Hi Sruti,

This field is configured as qualifier field in qualified lookup table. So I'm thinking this error message was populating incorrectly.

Thanks,

James

Former Member
0 Kudos

Hi James,

Also check if Multi lingual property of the field is also set.

There is one thing which I do not understand i.e. when you are setting a qualifier record in the main record, at that time why are you using the below API to get the multi region value as there would be no value in that field at this time.

MultiregionValue multiRegionValue = qualifiedLookupValue.getMultiregionQualifierFieldValue(index, fldQualifier);

Also can you check the line no./line in the code where you are getting this error.

Regards,

Sruti

Former Member
0 Kudos

Hi Sruti,

I'm using this line to get the MultiregionQualifierFieldValue instance first, yes at this time there is no value. Then I want to set values using the line after it "multiRegionCharValue.setValue("engUSA", new StringValue("qualifier value - EN"));".

The error happens exactly at the line you're asking. You can see the error trace I posted at the beginning of this thread.

Thanks,

James

Former Member
0 Kudos

This is solved.

Just need to change

MultiregionValue multiRegionValue = qualifiedLookupValue.getMultiregionQualifierFieldValue(index, fldQualifier);

to

MultiregionValue multiRegionValue = new MultiregionValue();

Former Member
0 Kudos

Hi James

To the best of my knowledge MDM doesnot support multiple languages for Qualifiers.

Multi lingual support is only for text/large text fields at main table level or for Non Qualifiers.

best regards

Ravi

Former Member
0 Kudos

Hi Ravi,

Thanks for the reply. Though I also doubt that MDM doesnot support multiple languages for Qualifiers. But as it didn't stop me from setting the multi-lingual property of qualifier field to true, and the getMultiregionQualifierFieldValue() API looks designed exactly for this purpose. So it is posslbie multi-lingual is supported. Do you have any other information indicating that multi-lingual is not supported for multi-lingual fields?

Thanks,

James