Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error in using key predicates

Hi all,

When executing the service URL with key predicates i am getting an error raised by exception /IWBEP/CX_MGW_TECH_EXCEPTION (message Internal error occurred, contact your system.).

The Associations, Referential constraints and Navigation properties have been maintained correctly.

The key predicates being passed are:

Airlineid='AA',Connectid='0017',Flightdate=datetime'2013-09-04T00:00:00'

The complete URL looks like:

http://<host>:<port>/sap/opu/odata/SAP/FLIGHTLISTDCR/FlightLists(Airlineid='AA',Connectid='0017',Flightdate=datetime'2013-09-04T00:00:00')/FlightDetail where FlightLists is the name of the Entity set and FlightDetail is the name of the Navigation property. Without the key predicates the entity set  returns the desired result.

Metadata

<?xml version="1.0" encoding="utf-8" ?>

- <edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"

- <edmx:DataServices m:DataServiceVersion="2.0">

- <Schema Namespace="FLIGHTLISTDCR" xml:lang="en" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">

- <EntityType Name="FlightDetail" sap:content-version="1">

- <Key>

<PropertyRef Name="Airlineid" />

<PropertyRef Name="Connectid" />

<PropertyRef Name="Flightdate" />

</Key>

<Property Name="Flighttime" Type="Edm.Int32" Nullable="false" sap:label="Flight time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Distance" Type="Edm.Decimal" Nullable="false" Precision="9" Scale="4" sap:label="Distance"
sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="CurrIso" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="ISO code" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Econofree" Type="Edm.Int32" Nullable="false" sap:label="Free seats" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Businfree" Type="Edm.Int32" Nullable="false" sap:label="Free seats" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Firstfree" Type="Edm.Int32" Nullable="false" sap:label="Free seats" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Curr" Type="Edm.String" Nullable="false" MaxLength="5" sap:label="Airline local currency" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Airlineid" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Airline" sap:sortable="false"
sap:filterable="false" />

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

<Property Name="Connectid" Type="Edm.String" Nullable="false" MaxLength="4" sap:label="Connection Number" sap:sortable="false" sap:filterable="false" />

<Property Name="Price" Type="Edm.Decimal" Nullable="false" Precision="23" Scale="4" sap:label="Airfare" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Flightdate" Type="Edm.DateTime" Nullable="false" sap:label="Flight Date" sap:sortable="false" sap:filterable="false" />

<Property Name="Airportfr" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Departure airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

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

<Property Name="Arrdate" Type="Edm.DateTime" Nullable="false" sap:label="Arrival date" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Airportto" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Destination airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

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

<Property Name="Deptime" Type="Edm.Time" Nullable="false" sap:label="Departure time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Arrtime" Type="Edm.Time" Nullable="false" sap:label="Arrival Time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

</EntityType>

- <EntityType Name="FlightList" sap:content-version="1">

- <Key>

<PropertyRef Name="Flightdate" />

<PropertyRef Name="Connectid" />

<PropertyRef Name="Airlineid" />

</Key>

<Property Name="Airportto" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Destination airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

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

<Property Name="Airportfr" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Departure airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Flightdate" Type="Edm.DateTime" Nullable="false" sap:label="Flight Date" sap:sortable="false" sap:filterable="false" />

<Property Name="Connectid" Type="Edm.String" Nullable="false" MaxLength="4" sap:label="Connection Number" sap:sortable="false" sap:filterable="false" />

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

<Property Name="Airlineid" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Airline" sap:sortable="false"
    sap:filterable="false" />

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

<Property Name="Deptime" Type="Edm.Time" Nullable="false" sap:label="Departure time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Arrtime" Type="Edm.Time" Nullable="false" sap:label="Arrival Time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Arrdate" Type="Edm.DateTime" Nullable="false" sap:label="Arrival date" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Price" Type="Edm.Decimal" Nullable="false" Precision="23" Scale="4" sap:label="Airfare"
    sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="Curr" Type="Edm.String" Nullable="false" MaxLength="5" sap:label="Airline local currency" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<Property Name="CurrIso" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="ISO code" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<NavigationProperty Name="FlightDetail" Relationship="FLIGHTLISTDCR.FlightListFlightDetail"
FromRole="FromRole_FlightListFlightDetail" ToRole="ToRole_FlightListFlightDetail" />

</EntityType>

- <Association Name="FlightListFlightDetail" sap:content-version="1">

<End Type="FLIGHTLISTDCR.FlightList" Multiplicity="1" Role="FromRole_FlightListFlightDetail" />

<End Type="FLIGHTLISTDCR.FlightDetail" Multiplicity="1" Role="ToRole_FlightListFlightDetail" />

- <ReferentialConstraint>

- <Principal Role="FromRole_FlightListFlightDetail">

<PropertyRef Name="Flightdate" />

<PropertyRef Name="Connectid" />

<PropertyRef Name="Airlineid" />

</Principal>

- <Dependent Role="ToRole_FlightListFlightDetail">

<PropertyRef Name="Flightdate" />

<PropertyRef Name="Connectid" />

<PropertyRef Name="Airline" />

</Dependent>

</ReferentialConstraint>

</Association>

- <EntityContainer Name="FLIGHTLISTDCR" m:IsDefaultEntityContainer="true">

<EntitySet Name="FlightDetails" EntityType="FLIGHTLISTDCR.FlightDetail" sap:pageable="false" sap:addressable="false"
sap:content-version="1" />

<EntitySet Name="FlightLists" EntityType="FLIGHTLISTDCR.FlightList" sap:requires-filter="true" sap:content-version="1" />

- <AssociationSet Name="AssocSet_FlightListFlightDetail" Association="FLIGHTLISTDCR.FlightListFlightDetail"
sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:content-version="1">

<End EntitySet="FlightLists" Role="FromRole_FlightListFlightDetail" />

<End EntitySet="FlightDetails" Role="ToRole_FlightListFlightDetail" />

</AssociationSet>

</EntityContainer>

<atom:link rel="self" href="http://<host>:8000/sap/opu/odata/sap/FLIGHTLISTDCR/$metadata"
    xmlns:atom="http://www.w3.org/2005/Atom" />

<atom:link rel="latest-version" href="http://<host>:8000/sap/opu/odata/sap/FLIGHTLISTDCR/$metadata"
    xmlns:atom="http://www.w3.org/2005/Atom" />

</Schema>

</edmx:DataServices>

</edmx:Edmx>

The Error log message is vague and is as follows:

Internal error occurred, contact your system administrator.

Shall be grateful for any hints which could help me resolve this issue.

regards

Nitesh

Former Member
Not what you were looking for? View more on this topic or Ask a question