cancel
Showing results for 
Search instead for 
Did you mean: 

Error while invoking Create Operation

mahesh_z
Participant
0 Kudos

Hello All,

I am trying to develop an RBS application using SUP 2.1.2.119 , SAP as backend EIS and Windows Laptop as client device. We have created a CREATE operation on one of the MBO and mapped it to one of the RFC which creates the corresponding record at backend. We have also mapped a resultchecker with the operation in which we have customized the message coming from SAP. When we invoke the operation , its successful at backend and in resultchecker , we get the expected response however in SCC , along with successful message we are getting one more message as follows :

java.lang.RuntimeException:Unable to insert cache row which contains neither a primary key nor a surrogate primary key:

On our create operation, we are having a warning which says :

The output record of 'CREATE' Operation 'MBOName->Operation()' with 'Apply Results to Cache' option set does not contain the primary key columns

Is there any relation between this warning and the error that we are getting ?

Please let us know if there is any solution to remove this error.

Thanks,

Mahesh.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mahesh,

I was able to rectify the issue.

In my scenario i'm using Soap webservice. And the update operation after execution returns me a two return tables. I have mapped the Output parameter of table 1 of the operation  with the MBO.  So after the execution the operation returns multiple rows in the output table, In this case the SUP tried to insert as many rows as it receives in the output to the MBO table in CDB, Since there will be no surrogate key associated with the second row or so on(of the output). You will get this error in resultChecker "java.lang.RuntimeException:Unable to insert cache row which contains neither a primary key nor a surrogate primary key" at the CDB and in the device UDB the object state remains pending after the execution of the operation.

So we will have to design the interface between SUP and backend associated with the update/create operation to return only one row in the output. Since i was using Soap WS I didnt included the another XSLT while creating the operation which returned multiple rows in the output and the issue was fixed.

Thanks for your quick reply,

Rakshit

Former Member
0 Kudos

Hi Mahesh, I'm facing a similar kind of a issue. But Create is working fine but the Update has the same problem but it gets updated ti EIS successfully.

Can you please explain the workaround you did to fix the issue..

Regards,

Rakshit

mahesh_z
Participant
0 Kudos

Hi Rakshit,

We didn't got any workaround for this however this has not stopped our execution. Updates were still happening properly at backend along with create operations.

Thanks,

Mahesh.

mahesh_z
Participant
0 Kudos

Hi Rakshit,

We didn't got any workaround for this however this has not stopped our execution. Updates were still happening properly at backend along with create operations.

Thanks,

Mahesh.