cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Single Persistent Table for Two Different Entities in SAP RAP

Swetha1
Explorer
0 Kudos
764

Hi All,


I need an expert advice on a Data Modeling that I am working for a RAP-based Fiori Application. Let me explain the scenario. I have a parent database table ZDEMO_PARENT and a child database table ZDEMO_CHILD. I have to handle data stored in child table in two different ways. So I am creating two entities for the child table. But in my behavior definition, if I give same persistent table (ZDEMO_CHILD) for both entities, it will result in runtime error trying to insert duplicate key entry into the child database table as both the entities will have same keys obviously.

How do we efficiently handle this to prevent the runtime error? Managed Implementation with Unmanaged Save is one way to avoid it but do we have any other way to do it with managed save as well? 

@SAPSupport 

@Andre_Fischer

 Thanks

Swetha

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
SAP Champion
SAP Champion
0 Kudos

I don't see any problem from the framework,

it's your problem to insert the same key to the table. you have to fix your coding.