on 09-25-2010 11:33 AM
Hi support,
I checkouted a record with the user Admin through API and when I modified it with the user Admin it threw the exception message below.
Caused by: com.sap.mdm.internal.protocol.manual.ServerException:
at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:119)
at com.sap.mdm.data.commands.ModifyRecordCommand.executeImpl(ModifyRecordCommand.java:153)
I used the Admin role but the message told me I didn't have enough right to modify the record. Then I tried to modify it by MDM DataManager and I modified the record successfully. Here is the piece of the code:
RecordId[] rIds = new RecordId[1];
rIds[0] = record<i>.getId();
CheckoutRecordsCommand corc = new CheckoutRecordsCommand(rep.connPool);
corc.setSession(rep.getUserSession());
corc.setRecordIds(rIds);
corc.setTableId(mainTableId);
corc.execute();
try{
ModifyRecordCommand mrc = new ModifyRecordCommand(rep.connPool);
record<i>.setFieldValue(fieldIds[5], qDataValueV);
mrc.setSession(corc.getSession());
mrc.setRecord(record<i>);
mrc.execute();
}catch(Exception e){
e.printStackTrace();
}
Could you kindly give me a solution?
Thanks&Regards,
Song
after checkout, you will get a new record id.
I think your modification should base on the new record id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.