Skip to Content

fields not showing in detail view of Master-Detail UI5 app

I am currently creating a Master-Detail UI5 app. I started my design process in Build, then generated a UI5 prototype. Once the prototype was agreed, I actually went back to the drawing board (from a coding perspective) and used one of the master-detail templates to generate a 'leaner' version than the generated one I got out of Build.

I am now in the process of connecting this 'leaner UI5 app with my real-world backend Gateway services.

I basically have a GW service to display open service orders (Order No, Order Description and Order creation date) in the master view list. This part works fine now. Upon selecting a item in this list, I am expecting Order Number and Text to be populated in the detail view. This is the step that's currently not working and I think there is something wrong in my routing/navigation and/or my OData model.

The error message I am getting is: error-chrome.jpeg

Below are my routing and target definitions from manifest.json. I have excluded any of the Error and NotFound views, by the way:

"routing": {
	"config": {
		"routerClass": "sap.m.routing.Router",
		"viewType": "XML",
		"viewPath": "sap.ui.demo.masterdetail.view",
		"controlId": "idAppControl",
		"controlAggregation": "detailPages",
		"bypassed": {
			"target": [
		"async": true
	"routes": [
			"pattern": "",
			"name": "master",
			"target": [
			"pattern": "ServiceOrderSet/{Aufnr}",
			"name": "detail",
			"target": [
	"targets": {
		"master": {
			"viewName": "Master",
			"viewLevel": 1,
			"viewId": "master",
			"controlAggregation": "masterPages"

Service metadata. As you can see, I did not create any navigation, as I am not selecting any additional data, like service order operation data, for example:

<EntityType Name="ServiceOrders" sap:content-version="1">
      <PropertyRef Name="Aufnr"/>

<Property Name="Aufnr" Type="Edm.String" Nullable="false" MaxLength="12" sap:unicode="false" sap:label="Order" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Ernam" Type="Edm.String" Nullable="false" MaxLength="12" sap:unicode="false" sap:label="Entered by" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Auart" Type="Edm.String" Nullable="false" MaxLength="4" sap:unicode="false" sap:label="Order Type" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Erdat" Type="Edm.DateTime" Nullable="false" Precision="7" sap:unicode="false" sap:label="Created on" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Ktext" Type="Edm.String" Nullable="false" MaxLength="20" sap:unicode="false" sap:label="Name" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<EntityContainer Name="ZGW_SERVICEORDER_SRV_03_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx">

<EntitySet Name="ServiceOrders" EntityType="ZGW_SERVICEORDER_SRV_03.ServiceOrders" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1"/>

In my Master.controller.js, I am getting the listItem parameter. I've checked this in debug and it appears to work.

onSelectionChange: function(oEvent) {
	this._showDetail(oEvent.getParameter("listItem") || oEvent.getSource());

and finally the XML coding from my Master view. Also note the Aufnr and Ktext fields, which I would like to display here, but which are currently not showing:

<List id="list" items="{ path: '/ServiceOrderSet', sorter: { path: 'Aufnr', descending: false }, groupHeaderFactory: '.createGroupHeader' }"
busyIndicatorDelay="{masterView>/delay}" noDataText="{masterView>/noDataText}"
mode="{= ${device>/system/phone} ? 'None' : 'SingleSelectMaster'}" growing="true" growingScrollToLoad="true"
updateFinished="onUpdateFinished" selectionChange="onSelectionChange">
<Toolbar active="true" id="filterBar" visible="{masterView>/isFilterBarVisible}" press="onOpenViewSettings">
<Title id="filterBarLabel" text="{masterView>/filterBarLabel}"/>
<ObjectListItem type="{= ${device>/system/phone} ? 'Active' : 'Inactive'}" press="onSelectionChange" title="{Ktext}"
number="{path: 'Aufnr'}">
text="{path: 'Erdat', type: 'sap.ui.model.odata.type.DateTime', formatOptions: { style: 'short' }, constraints: { isDateOnly: true, displayFormat: 'Date' } }"/>

Update: below is the code of my _showDetail method:

_showDetail: function(oItem) {
	var bReplace = !;
	this.getRouter().navTo("detail", {
	objectId: oItem.getBindingContext().getProperty("Aufnr")
	}, bReplace);

Update: below is the relevant part of my Deatil.xml view

     <ObjectHeader id="objectHeader" title="{Ktext}" number="{Aufnr}"></ObjectHeader>

Does anybody have any pointers where I am going wrong here?

Thanks in advance,


error-chrome.jpeg (48.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • There is none with hashpath as far as I can see.

    Also, in the UI5 Diagnostics I can see that the bindings in my Detail view are shown as "invalid" ("Ktext invalid").

    I've also added the relevant part of my XML view above.

  • Can you also please share what the URL looks like (especially the hashpath part) when you get this error?

  • Get RSS Feed

1 Answer

  • Mar 12, 2018 at 10:43 PM

    Hi Michael,

    Could you please post the code of function _showDetail?

    It seems you have not passed Aufnr as parameter when navigating to detail page.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Michael,

      Please try this:

      Replace this line in _showDetail

      objectId: oItem.getBindingContext().getProperty("Aufnr")


      Aufnr: oItem.getBindingContext().getProperty("Aufnr")

      since the pattern in manifest is using Aufnr

      {"pattern": "ServiceOrderSet/{Aufnr}","name": "detail","target": ["master","detail"]}
      Also, how do you implement onRouteMatch or bindView in Detail controller?