cancel
Showing results for 
Search instead for 
Did you mean: 

Requested record not found error

Former Member
0 Kudos

Hi all,

I am getting the following error while trying to modify a record via MDM 7.1 Java API.

modifyRecord:Failed record while modifying:com.sap.mdm.internal.protocol.manual.ServerException: The requested record was not found

com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: The requested record was not found

at com.sap.mdm.data.commands.ModifyRecordCommand.execute(ModifyRecordCommand.java:210)

at com.alu.mdm.products.ProductsUpload.modifyRecord(ProductsUpload.java:1720)

at com.alu.mdm.products.ProductsUpload.readExcelandCreateRecords(ProductsUpload.java:533)

at com.alu.mdm.products.TestProductsUpload.main(TestProductsUpload.java:147)

Caused by: com.sap.mdm.internal.protocol.manual.ServerException: The requested record was not found

at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:126)

at com.sap.mdm.data.commands.ModifyRecordCommand.execute(ModifyRecordCommand.java:170)

Can someone give a clue on what could be the possible causes?

Below is the code:

modifyRecordCommand = new ModifyRecordCommand(userctx);

modifyRecordCommand.setSession( usrSessionIdAdm );

modifyRecordCommand.setRecord(recModify);

modifyRecordCommand.setModifyAnyway(true);

modifyRecordCommand.setCommitOnWarning(true);

modifyRecordCommand.execute();

I have checked the data in the record and it looks fine.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI,

Can you share a solution of the same.

Regards,

Sunil

Former Member
0 Kudos

Hi Sunil,

I don´t know if you solved this issue, but I´ll share you my soultion:

I was getting the Exception because I was using a MdmValue extracted from the record (It was a MultiTupleValue). So for the solution, I recreate the MultiTupleValue, (yeah: ... new MultiTupleValue() ) and loop the original MultiTupleValue and setting the new.

Regards!

Former Member
0 Kudos

Hi,

I am using ModifyRecordCommand for modyfing record.After executing command no exception is thrown,but record is not getting modifyied.

I can use ModifyRecordsCommand,but it does not have setModifyAnyway() option.But I need setModifyAnyway(true) option.

Please help on this issue.

Thanks,

Anuja

Former Member
0 Kudos

Hi,

I am not gettimg exceptions (CommandException) while  running ModifyRecordsCommand,but when I check MultipleRecordResult as follows,

MultipleRecordsResult multipleRecordsResult=commandd.getResult();

multipleRecordsResult.getFailedRecordMessage();

I will get message "Could not modify record".

There is no other exception  thrown.What could be the reason for failing this modification operation?Is it related to ChangeStamp?

Please help on this issue.

Thanks,

Anuja



Former Member
0 Kudos

Dear bipsrane,

I hope you are using same session context (i.e. session context for same user) for both fetching and then modifying.

Please confirm.

-- Shaailesh.

Greg_Austin
Active Participant
0 Kudos

Where does recModify come from? Can you show that code?

Former Member
0 Kudos

Greg,

The recModify is an existing Products table record. It is obtained by querying the products table for an existing record. Do i need to create a new empty record, fill values and then submit the record for modifying instead of using the existing record id?

Thanks.

Greg_Austin
Active Participant
0 Kudos

No you don't want a new record. I would check the Record is not null.

Former Member
0 Kudos

Greg,

Before i submit the record for modification, i can see the values populated for the various fields I am populating. Are you suggesting to check if the any of the field values are null?

Thanks.

Greg_Austin
Active Participant
0 Kudos

Well that tells us the Record as a whole isn't null. Can you print out the RecordId?

Former Member
0 Kudos

Greg,

Yes. When i do a record.toString(), it shows the ID value as populated and not null.

Thanks.

Greg_Austin
Active Participant
0 Kudos

Are you changing the Record before saving it? If so change as little as possible until we see it working. Maybe set a Text field to a hard coded value or something like that. Other than that I'm running out of ideas.

0 Kudos

Hi,

I am also facing the same problem. While trying to modify a record after changing values, I am getting the error "Requested Record was not found". I tried printing the record id of the record and is fine. Please let me know if you were able to solve the issue.

Thanks n Regards

Renu

Former Member
0 Kudos

Check the user permission in MDM Repository.

Thanks,

Shambhu.