SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
ASP.NET, VB.NET, Microsoft .NET Framework, Microsoft Visual Studio, Windows Forms, Controls and more Tutorials and Articles for Programmers


Consume OData from SAP InvalidMultiplicityOfPrincipalEnd Error in Visual Studio 2013

InvalidMultiplicityOfPrincipalEnd error prevented LightSwitch application built by Visual Studio 2013 to consume oData service built by ABAP developer in SAP system. Although the OData service is successfully called and executed from SAP NetWeaver system without any error, Visual Studio attach OData service wizard failed to add SAP OData service as a data source for the LightSwitch project.

InvalidMultiplicityOfPrincipalEnd Error

While defining OData source for consuming OData service published by a SAP system using Visual Studio 2013 LightSwitch project, I got the following error message.

InvalidMultiplicityOfPrincipalEnd : The multiplicity of the principal end is not valid. Because all dependent properties of the end 'FromRole_OrderDetail' are non-nullable, the multiplicity of the principal end must be '1'. : (0, 0)

InvalidMultiplicityOfPrincipalEnd error during OData consume in Visual Studio 2013

This error "The multiplicity of the principal end is not valid" actually refers to the Association definition in ABAP SEGW transaction for the related SAP NetWeaver Gateway Service.
A proper creation of the association between the parent Sales Order header data and child Sales Order items data will prevent this error and enable the Visual Studio attach data source wizard successfully add the OData service as a new datasource for the project.

For a parent-child relation like a sales order header data and its item data, if the ABAP developer defines the association between parent and child as follows the cause of the error will be cleared.
Within SEGW transaction in SAP system,open the OData service project and modify the related association as follows.

create OData entity association in ABAP using SAP SEGW transaction



Visual Studio


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.