on 05-31-2008 2:15 AM
Hi, im trying to add values to a new record in a mdm qualified table, but im getting this error on the last line:
com.sap.mdm.internal.protocol.manual.ServerException: SQL error on UPDATE
on the last line.. could someone tell me whats wrong and how should be done please?
TableId requestLogTableId = repositorySchema.getTableId(Constants.TABLE_REQUEST_LOG_QUALIFIED);
FieldId dummyFieldId = repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_DUMMY);
FieldId stepFieldId = repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_STEP);
FieldId actorFieldId = repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_ACTOR);
FieldId rollFieldId = repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_ROLL);
FieldId actionFieldId= repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_ACTION);
FieldId commentFieldId= repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_COMMENT);
FieldId dateFieldId = repositorySchema.getTableSchema(Constants.TABLE_REQUEST_LOG_QUALIFIED).getFieldId(Constants.FIELD_REQUEST_LOG_DATE);
//Create new record
RecordId recordIdRL = MdmCommandRecordDelegate.createRecord(conn, requestLogTableId);
//Manipulate record
Record recordRL = MdmCommandRecordDelegate.retrieveRecordById(
conn, requestLogTableId, recordIdRL,
new FieldId[]{dummyFieldId, stepFieldId, actorFieldId,
rollFieldId, actionFieldId, commentFieldId, dateFieldId }, null);
//Set some dummy values
//recordRL.setFieldValue(dummyFieldId, new StringValue("Dummy 1"));
recordRL.setFieldValue(stepFieldId, new IntegerValue(1));
recordRL.setFieldValue(actorFieldId, new LookupValue(recordId)); // Previously created
recordRL.setFieldValue(rollFieldId, new QualifiedLookupValue()); //dummy
recordRL.setFieldValue(actionFieldId, new QualifiedLookupValue()); //dummy
recordRL.setFieldValue(commentFieldId, new StringValue("Test Comment")); //dummy
recordRL.setFieldValue(dateFieldId, new NullValue()); //How should a GMTime value be assigned??
//update values on record
MdmCommandRecordDelegate.modifyRecord(conn, recordRL);
I'll appreciate any help.
Regards
Julio Herrera
Solved it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.