cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Value Lookup Save Problem

DeeptiChavare
Active Participant
0 Kudos

Hi,

I am trying to save records in Multi value look up table. The problem is that only the last record is getting saved.

Can anyone please help?

Regards,

Sruti

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Deepti,

Qualified Lookups are always Multivalued and no specific property has to be enabled atleast within MDM to make it Multivalued.

By selecting The Qualified Lookup table Multivalued,It should allow you to save Multiple NQ values for a given record.

You can have a look at the below link to know about the Java methods provided to work with MDM:

http://help.sap.com/javadocs/MDM/SP05/(Java api programs)

https://help.sap.com/javadocs/MDM/current/index.html (java api codes)

Hope It Helped

Thanks & Regards

Simona Pinto

Former Member
0 Kudos

Have you made the field value of multi-valued = yes?

DeeptiChavare
Active Participant
0 Kudos

Hi,

In MDM, this is multivalued qualified lookup table.

Please let me know if I have to set Multivalued property = yes at some point in JAVA code.

If you could give code snippet, it will be really helpful.

Thanks

Former Member
0 Kudos

Hi Deepti,

Please find the sample code for updating the multiple value lookup field through Java API.

MdmValue multiValue = new MultiValue();// Represents the Multivalued lookup field

MdmValue lookupValue = new NullValue();// Represents each lookupvalue in multivalued lookup field

{

lookupValue = new LookupValue(recid);// recid --> Recordid of the lookup value

((MultiValue)multiValue).addValue(lookupValue);

}

Loop the code in braces to add each lookup value to the multivalued field.

Now pass the the multivalued field (multiValue) to the create / update Record command.

Hope it helps.

Regards,

Neeharika