on 09-10-2007 2:40 PM
Hi
since I updated to the latest Patch SP5 Patch 2 of the MDM Java API, I cannot update any qualifier field values.
This is what I do:
QualifiedLookupValue qlv = (QualifiedLookupValue) record.getFieldValue(FIELD_ID_CATALOG);
qlv.setQualifierFieldValue(index, someFieldId, new IntegerField(someInt));
record.setFieldValue(FIELD_ID_CATALOG, qlv);
The ModifyRecordCommand then shows up with an exception: "com.sap.mdm.internal.protocol.manual.ServerException: Das Feld kann nicht bearbeitet werden" (The field cannot be modified, ErrorCode: -5631993, RC_CM_FIELDNOTEDITABLE).
Before I made the update, the update worked as expected. Has there been a conceptual change of how this must be done? Or is this just a bug?
Please help! Thank you
Hello Roger,
We had same issue, as a work around this is how we updated qualifier fields.
QualifiedLookupValue qlv = (QualifiedLookupValue) record.getFieldValue(FIELD_ID_CATALOG);
LinkedHashMap map = new LinkedHashMap();
map.put(FIELD_ID_CATALOG, new IntegerValue(someInt));
QualifiedLinkValue[] qualifiedLinkValues = qlv.getQualifiedLinks();
QualifiedLinkValue qLink = qualifiedLinkValues[0];
QualifiedLinkValue qNlink = new QualifiedLinkValue(qLink.getLookupId(), map);
QualifiedLookupValue qualifiedLookupValue = new QualifiedLookupValue();
qualifiedLookupValue.addValue(1, qNLink);
qualifiedLookupValue.setCompleteSet(false);
Then use
ModifyRecordCommand
record.setFieldValue(FIELD_ID_CATALOG, qlv);
Anu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anu
thanks for your reply.
The workaround you showed will create a <i><b>new QualifiedLink-Record</b></i> and will not update an existing.
So I tried to use the other constructor of QualifiedLink, which should keep the existing Link (as stated in the JavaDocs):
new QualifiedLinkValue(qLink.getLinkId(), qLink.getLookupId(), map);
But it still won't work. Now I get an exception with ErrorCode -2080243705 "Error while executing the SQL statement".
In the Logs I can see, that it was trying to INSERT another Qualified Link with the same Ids, which results in a Unique Key Constraint violation.
Why is it not perfoming an UPDATE-statement?
No it didn't create new qualifier link in my case, as I am passing the id of the old qualifier link it does update the existing link not add new one. That is good to hear from SAP that we don't have to go round about to update qualifiers table with SP06. There are so many bugs SAP says that will be fixed in SP06.
Anu
Still the same after applying HotFix 4 from 11.09.2007 (v5.5.42.65)!
Can someone please try this?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.