Skip to Content
Jun 30, 2015 at 07:04 AM

Duplicate id error in sap.m.table


Hi Experts,

I am having a sap.m.table. Here I binds an json model. Also I am having option to delete and insert rows.

While deleting I can able to delete the selected item successfully with below code.

var oTable = this.getView().byId("XXX");

var selItem = oTable.getSelectedItem();


Again If I insert any data to the table I am getting error as "2015-06-30 12:23:39 adding element with duplicate id '__text9-__xmlview2--XXX-2'" -

My insert code as

var bindingContext = this.getView().getBindingContext().getPath();

var oModel = this.getView().getModel();

var laborObject = oModel.getProperty(bindingContext+"/labourActivity");

laborObject.push(entry); //entry is the object of exact values




This code is not working in combination of delete and insert. Its working fine only for the insert. If i delete and insert again. its dumps again.

My table code as

<Table id="XXX" inset="true" showOverlay="false" class="swoPadding" mode="SingleSelectMaster" items="{labourActivity}">



<Text text="FSE Name"/>


<Column minScreenWidth="Tablet" demandPopin="true">

<Text text="Activity"/>


<Column minScreenWidth="Tablet" demandPopin="true">

<Text text="Date"/>


<Column minScreenWidth="Tablet" demandPopin="true">

<Text text="Start"/>


<Column minScreenWidth="Tablet" demandPopin="true">

<Text text="End"/>



<Text text="Duration"/>



<Text text="Operation"/>






<Text text="{fscName}"/>

<Text text="{activity}"/>

<Text text="{date}"/>

<Text text="{start}"/>

<Text text="{end}"/>

<Text text="{duration}"/>

<Text text="{operation}"/>





Thanks & Regards

Rabin D