.NET Framework, ASP.NET
ASP.NET, Windows Forms, Controls, .NET Framework and Visual Studio Articles
Visual Studio Forums
.NET Development Blog
Certification Exams Blog
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.
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)
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.