SAP / python-pyodata

Enterprise-ready Python OData client
Apache License 2.0
218 stars 93 forks source link

AttributeError in PyOData v1.11.0 When Executing CustomerCollection Query #262

Closed anthonyng288 closed 9 months ago

anthonyng288 commented 10 months ago

After updating to PyOData version 1.11.0, I encountered a significant issue with a previously functional query. The purpose of the query is to retrieve a list of customers using the CustomerCollection.get_entities() method, with additional parameters for counting, filtering, ordering, and limiting the number of results.

Issue Details: The following Python code, which worked flawlessly in version 1.10.1, started throwing an AttributeError in version 1.11.0: customers = accountService.entity_sets.CustomerCollection.get_entities().count(inline=True).filter("LifeCycleStatusCode eq '2'").custom("$orderby", "LastChangeDateTime desc").custom("$top", "8").execute() Error Message: The error message received is as follows: [ERROR] AttributeError: 'str' object has no attribute 'get' Traceback (most recent call last): File "/var/task/GETAccountandContact.py", line 86, in lambda_handler customers = accountService.entity_sets.CustomerCollection.get_entities().count(inline=True).filter("LifeCycleStatusCode eq '2'").custom("$orderby", "LastChangeDateTime desc").custom("$top", "8").execute() File "/tmp/pyodata/v2/service.py", line 349, in execute return self._call_handler(response) File "/tmp/pyodata/v2/service.py", line 362, in _call_handler return self._handler(response) File "/tmp/pyodata/v2/service.py", line 1549, in get_entities_handler entity = EntityProxy(self._service, self._entity_set, self._entity_set.entity_type, props) File "/tmp/pyodata/v2/service.py", line 881, in __init__ self._cache[prop.name].append(EntityProxy(service, None, prop_etype, entity)) File "/tmp/pyodata/v2/service.py", line 825, in __init__ etag_body = proprties.get('__metadata', dict()).get('etag', None)

Temporary Solution: As a temporary workaround, I had to downgrade to version 1.10.1, after which the query started working again without any errors.

Request: I believe this is a bug introduced in version 1.11.0. It would be greatly appreciated if the team could investigate this issue and provide a fix or guidance on how to resolve it in the newer version of PyOData.

Thank you for your attention to this matter.

phanak-sap commented 10 months ago

Hi @anthonyng288

thanks for the bug report. Clearly the existing test suite did not catch this problem. Yes, breaking change has the utmost priority.

Could you please provide me the $metatada for the service, or just snippet relevant to CustomerCollection? Or ideally, failing unit test (PR here) or a bug reproducer script - e.g PR for https://github.com/phanak-sap/pyodata-issue-files

The provided code customers = accountService.entity_sets.CustomerCollection.get_entities().count(inline=True).filter("LifeCycleStatusCode eq '2'").custom("$orderby", "LastChangeDateTime desc").custom("$top", "8").execute()

is only half of the root cause, I am only guessing what is on the other side this code is going trough. I can guess, but then - how can I be sure it is really the problem you are seeing.

phanak-sap commented 9 months ago

Hi @anthonyng288, I have tried to reproduce this on my own - basically modify existing test test_custom_with_get_entity to contain similar sequence of function calls, but I cannot raise the error.

I really need the service metadata or the bug reproducer script/failing unit test to proceed further.

anthonyng288 commented 9 months ago

Here is the service metadata, I think this is what you are looking for

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="2.0">
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" xmlns:sap="http://www.sap.com/Protocols/SAPData" xmlns:c4c="http://www.sap.com/Protocols/C4CData" Namespace="cust">
<EntityType Name="Customer">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessPartnerName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ContactAllowedCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerContactAllowedCodeCollection" sap:text="ContactAllowedCodeText"/>
<Property Name="ContactAllowedCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessPartnerFormattedName" Type="Edm.String" Nullable="true" MaxLength="80" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LegalCompetenceIndicator" Type="Edm.Boolean" Nullable="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="InternalID" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="CreatedFromOrganisationalCentreIndicator" Type="Edm.Boolean" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CategoryCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCategoryCodeCollection" sap:text="CategoryCodeText"/>
<Property Name="CategoryCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ActsAsOrganisationalCentreIndicator" Type="Edm.Boolean" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LifeCycleStatusCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerLifeCycleStatusCodeCollection" sap:text="LifeCycleStatusCodeText"/>
<Property Name="LifeCycleStatusCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LastChangeDateTime" Type="Edm.DateTimeOffset" Nullable="true" Precision="7" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LastChangeIdentityUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CreationIdentityUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CreationDateTime" Type="Edm.DateTimeOffset" Nullable="true" Precision="7" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CustomerABCClassificationCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCustomerABCClassificationCodeCollection" sap:text="CustomerABCClassificationCodeText"/>
<Property Name="CustomerABCClassificationCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="CustomerAddressInformation1" Relationship="cust.Customer_CustomerAddressInformation1" FromRole="Customer" ToRole="CustomerAddressInformation1"/>
<NavigationProperty Name="CustomerCurrentEmployeeResponsible1" Relationship="cust.Customer_CustomerCurrentEmployeeResponsible1" FromRole="Customer" ToRole="CustomerCurrentEmployeeResponsible1"/>
<NavigationProperty Name="CustomerAddressInformation" Relationship="cust.Customer_CustomerAddressInformation" FromRole="Customer" ToRole="CustomerAddressInformation"/>
<NavigationProperty Name="CustomerTaxNumber" Relationship="cust.Customer_CustomerTaxNumber" FromRole="Customer" ToRole="CustomerTaxNumber"/>
<NavigationProperty Name="SalesArrangementSalesOrganisationIndependentSalesArrangement" Relationship="cust.Customer_SalesArrangementSalesOrganisationIndependentSalesArrangement" FromRole="Customer" ToRole="SalesArrangementSalesOrganisationIndependentSalesArrangement"/>
<NavigationProperty Name="SalesArrangementSalesArrangement" Relationship="cust.Customer_SalesArrangementSalesArrangement" FromRole="Customer" ToRole="SalesArrangementSalesArrangement"/>
<NavigationProperty Name="CustomerRole" Relationship="cust.Customer_CustomerRole" FromRole="Customer" ToRole="CustomerRole"/>
<NavigationProperty Name="SalesArrangement" Relationship="cust.Customer_SalesArrangement" FromRole="Customer" ToRole="SalesArrangement"/>
<NavigationProperty Name="CustomerCurrentEmployeeResponsible" Relationship="cust.Customer_CustomerCurrentEmployeeResponsible" FromRole="Customer" ToRole="CustomerCurrentEmployeeResponsible"/>
<NavigationProperty Name="CustomerCommon" Relationship="cust.Customer_CustomerCommon" FromRole="Customer" ToRole="CustomerCommon"/>
</EntityType>
<EntityType Name="CustomerAddressInformation">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CorrespondenceLanguageCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationCorrespondenceLanguageCodeCollection" sap:text="CorrespondenceLanguageCodeText"/>
<Property Name="CorrespondenceLanguageCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="PreferredCommunicationMediumTypeCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationPreferredCommunicationMediumTypeCodeCollection" sap:text="PreferredCommunicationMediumTypeCodeText"/>
<Property Name="PreferredCommunicationMediumTypeCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="FormattedNumberDescription" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="NormalisedNumberDescription" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="NormalisedURI" Type="Edm.String" Nullable="true" MaxLength="255" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="URI" Type="Edm.String" Nullable="true" MaxLength="255" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UsageDeniedIndicator" Type="Edm.Boolean" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="FormattedNumberDescription1" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="NormalisedNumberDescription1" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="FormattedNumberDescription2" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="NormalisedNumberDescription2" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="AdditionalCityName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="AdditionalStreetPrefixName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="AddressRepresentationCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationAddressRepresentationCodeCollection" sap:text="AddressRepresentationCodeText"/>
<Property Name="AddressRepresentationCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="AdditionalStreetSuffixName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BuildingID" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CityName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CompanyPostalCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CareOfName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CountryCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationCountryCodeCollection" sap:text="CountryCodeText"/>
<Property Name="CountryCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CountyName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="DistrictName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="FloorID" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="POBoxDeviatingCityName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="HouseID" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="POBoxDeviatingCountryCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationPOBoxDeviatingCountryCodeCollection" sap:text="POBoxDeviatingCountryCodeText"/>
<Property Name="POBoxDeviatingCountryCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="POBoxDeviatingRegionCode" Type="Edm.String" Nullable="true" MaxLength="6" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationPOBoxDeviatingRegionCodeCollection" sap:text="POBoxDeviatingRegionCodeText" c4c:context-property="POBoxDeviatingCountryCode"/>
<Property Name="POBoxDeviatingRegionCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="POBoxID" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="POBoxPostalCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="RegionCode" Type="Edm.String" Nullable="true" MaxLength="6" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationRegionCodeCollection" sap:text="RegionCodeText" c4c:context-property="CountryCode"/>
<Property Name="RegionCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="RoomID" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="StreetName" Type="Edm.String" Nullable="true" MaxLength="60" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="StreetPostalCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="StreetSuffixName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="StreetPrefixName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="TaxJurisdictionCode" Type="Edm.String" Nullable="true" MaxLength="25" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationTaxJurisdictionCodeCollection" sap:text="TaxJurisdictionCodeText"/>
<Property Name="TaxJurisdictionCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="TimeZoneCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerAddressInformationTimeZoneCodeCollection" sap:text="TimeZoneCodeText"/>
<Property Name="TimeZoneCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="URI1" Type="Edm.String" Nullable="true" MaxLength="1280" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="CustomerFormattedAddressV1" Relationship="cust.CustomerAddressInformation_CustomerFormattedAddressV1" FromRole="CustomerAddressInformation" ToRole="CustomerFormattedAddressV1"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerAddressInformation" FromRole="CustomerAddressInformation" ToRole="Customer"/>
<NavigationProperty Name="CustomerAddressUsage" Relationship="cust.CustomerAddressInformation_CustomerAddressUsage" FromRole="CustomerAddressInformation" ToRole="CustomerAddressUsage"/>
</EntityType>
<EntityType Name="CustomerAddressUsage">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="AddressUsageCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerAddressUsageAddressUsageCodeCollection" sap:text="AddressUsageCodeText"/>
<Property Name="AddressUsageCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="DefaultIndicator" Type="Edm.Boolean" Nullable="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="EndDate" Type="Edm.DateTime" Nullable="true" Precision="0" sap:creatable="true" sap:updatable="true" sap:filterable="true" sap:display-format="Date"/>
<Property Name="StartDate" Type="Edm.DateTime" Nullable="true" Precision="0" sap:creatable="true" sap:updatable="true" sap:filterable="true" sap:display-format="Date"/>
<NavigationProperty Name="CustomerAddressInformation" Relationship="cust.CustomerAddressInformation_CustomerAddressUsage" FromRole="CustomerAddressUsage" ToRole="CustomerAddressInformation"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerAddressUsage" FromRole="CustomerAddressUsage" ToRole="Customer"/>
</EntityType>
<EntityType Name="CustomerTaxNumber">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="CountryCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerTaxNumberCountryCodeCollection" sap:text="CountryCodeText"/>
<Property Name="CountryCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="PartyTaxID" Type="Edm.String" Nullable="true" MaxLength="20" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="TaxIdentificationNumberTypeCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerTaxNumberTaxIdentificationNumberTypeCodeCollection" sap:text="TaxIdentificationNumberTypeCodeText" c4c:context-property="CountryCode"/>
<Property Name="TaxIdentificationNumberTypeCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerTaxNumber" FromRole="CustomerTaxNumber" ToRole="Customer"/>
</EntityType>
<EntityType Name="SalesArrangementSalesOrganisationIndependentSalesArrangement">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CurrencyCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesOrganisationIndependentSalesArrangementCurrencyCodeCollection" sap:text="CurrencyCodeText"/>
<Property Name="CurrencyCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CustomerGroupCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesOrganisationIndependentSalesArrangementCustomerGroupCodeCollection" sap:text="CustomerGroupCodeText"/>
<Property Name="CustomerGroupCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CustomerUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="true" sap:filterable="true"/>
<Property Name="DistributionChannelCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesOrganisationIndependentSalesArrangementDistributionChannelCodeCollection" sap:text="DistributionChannelCodeText"/>
<Property Name="DistributionChannelCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="DivisionCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="SalesArrangementSalesOrganisationIndependentSalesArrangementDivisionCodeCollection" sap:text="DivisionCodeText"/>
<Property Name="DivisionCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="SalesOrganisationUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="true" sap:filterable="true"/>
<Property Name="LifeCycleStatusCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesOrganisationIndependentSalesArrangementLifeCycleStatusCodeCollection" sap:text="LifeCycleStatusCodeText"/>
<Property Name="LifeCycleStatusCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CreationDateTime" Type="Edm.DateTimeOffset" Nullable="true" Precision="7" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CreationIdentityUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LastChangeDateTime" Type="Edm.DateTimeOffset" Nullable="true" Precision="7" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LastChangeIdentityUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessPartnerUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ID" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID1" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
</EntityType>
<EntityType Name="SalesArrangementSalesArrangement">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CurrencyCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesArrangementCurrencyCodeCollection" sap:text="CurrencyCodeText"/>
<Property Name="CurrencyCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CustomerGroupCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesArrangementCustomerGroupCodeCollection" sap:text="CustomerGroupCodeText"/>
<Property Name="CustomerGroupCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CashDiscountTermsCode" Type="Edm.String" Nullable="true" MaxLength="4" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesArrangementCashDiscountTermsCodeCollection" sap:text="CashDiscountTermsCodeText"/>
<Property Name="CashDiscountTermsCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CustomerUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="true" sap:filterable="true"/>
<Property Name="DistributionChannelCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementSalesArrangementDistributionChannelCodeCollection" sap:text="DistributionChannelCodeText"/>
<Property Name="DistributionChannelCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="DivisionCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="SalesArrangementSalesArrangementDivisionCodeCollection" sap:text="DivisionCodeText"/>
<Property Name="DivisionCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="SalesOrganisationUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="true" sap:filterable="true"/>
</EntityType>
<EntityType Name="CustomerRole">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessCharacterCode" Type="Edm.String" Nullable="true" MaxLength="6" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerRoleBusinessCharacterCodeCollection" sap:text="BusinessCharacterCodeText"/>
<Property Name="BusinessCharacterCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessObjectTypeCode" Type="Edm.String" Nullable="true" MaxLength="15" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerRoleBusinessObjectTypeCodeCollection" sap:text="BusinessObjectTypeCodeText"/>
<Property Name="BusinessObjectTypeCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="RoleCode" Type="Edm.String" Nullable="true" MaxLength="6" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerRoleRoleCodeCollection" sap:text="RoleCodeText"/>
<Property Name="RoleCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerRole" FromRole="CustomerRole" ToRole="Customer"/>
</EntityType>
<EntityType Name="SalesArrangement">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CurrencyCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementCurrencyCodeCollection" sap:text="CurrencyCodeText"/>
<Property Name="CurrencyCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CustomerUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="true" sap:filterable="true"/>
<Property Name="DistributionChannelCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementDistributionChannelCodeCollection" sap:text="DistributionChannelCodeText"/>
<Property Name="DistributionChannelCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="DivisionCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="SalesArrangementDivisionCodeCollection" sap:text="DivisionCodeText"/>
<Property Name="DivisionCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="SalesOrganisationUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="true" sap:filterable="true"/>
<Property Name="LifeCycleStatusCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="SalesArrangementLifeCycleStatusCodeCollection" sap:text="LifeCycleStatusCodeText"/>
<Property Name="LifeCycleStatusCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CreationDateTime" Type="Edm.DateTimeOffset" Nullable="true" Precision="7" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="CreationIdentityUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LastChangeDateTime" Type="Edm.DateTimeOffset" Nullable="true" Precision="7" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LastChangeIdentityUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessPartnerUUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ID" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID2" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
</EntityType>
<EntityType Name="CustomerCurrentEmployeeResponsible">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="EmployeeUUID" Type="Edm.Guid" Nullable="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="PartyRoleCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCurrentEmployeeResponsiblePartyRoleCodeCollection" sap:text="PartyRoleCodeText"/>
<Property Name="PartyRoleCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BirthName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="FamilyName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="GivenName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="MiddleName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BirthDate" Type="Edm.DateTime" Nullable="true" Precision="0" sap:creatable="false" sap:updatable="false" sap:filterable="true" sap:display-format="Date"/>
<Property Name="BirthPlaceName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="GenderCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerCurrentEmployeeResponsibleGenderCodeCollection" sap:text="GenderCodeText"/>
<Property Name="GenderCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="MaritalStatusCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerCurrentEmployeeResponsibleMaritalStatusCodeCollection" sap:text="MaritalStatusCodeText"/>
<Property Name="MaritalStatusCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerCurrentEmployeeResponsible" FromRole="CustomerCurrentEmployeeResponsible" ToRole="Customer"/>
</EntityType>
<EntityType Name="CustomerCommon">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessPartnerName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ContactAllowedCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonContactAllowedCodeCollection" sap:text="ContactAllowedCodeText"/>
<Property Name="ContactAllowedCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BusinessPartnerFormattedName" Type="Edm.String" Nullable="true" MaxLength="80" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="LegalCompetenceIndicator" Type="Edm.Boolean" Nullable="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="CompanyLegalFormCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonCompanyLegalFormCodeCollection" sap:text="CompanyLegalFormCodeText"/>
<Property Name="CompanyLegalFormCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="FirstLineName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="SecondLineName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="BirthDate" Type="Edm.DateTime" Nullable="true" Precision="0" sap:creatable="true" sap:updatable="true" sap:filterable="true" sap:display-format="Date"/>
<Property Name="GenderCode" Type="Edm.String" Nullable="true" MaxLength="1" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonGenderCodeCollection" sap:text="GenderCodeText"/>
<Property Name="GenderCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="AcademicTitleCode" Type="Edm.String" Nullable="true" MaxLength="4" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonAcademicTitleCodeCollection" sap:text="AcademicTitleCodeText"/>
<Property Name="AcademicTitleCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="BirthName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="FamilyName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="FormOfAddressCode" Type="Edm.String" Nullable="true" MaxLength="4" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonFormOfAddressCodeCollection" sap:text="FormOfAddressCodeText"/>
<Property Name="FormOfAddressCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="GivenName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="MiddleName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="NameFormatCountryCode" Type="Edm.String" Nullable="true" MaxLength="3" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerCommonNameFormatCountryCodeCollection" sap:text="NameFormatCountryCodeText"/>
<Property Name="NameFormatCountryCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="NonVerbalCommunicationLanguageCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonNonVerbalCommunicationLanguageCodeCollection" sap:text="NonVerbalCommunicationLanguageCodeText"/>
<Property Name="NonVerbalCommunicationLanguageCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="NickName" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="SortingFormattedName" Type="Edm.String" Nullable="true" MaxLength="80" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="OccupationCode" Type="Edm.String" Nullable="true" MaxLength="4" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCommonOccupationCodeCollection" sap:text="OccupationCodeText"/>
<Property Name="OccupationCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="VerbalCommunicationLanguageCode" Type="Edm.String" Nullable="true" MaxLength="2" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true" c4c:value-help="CustomerCommonVerbalCommunicationLanguageCodeCollection" sap:text="VerbalCommunicationLanguageCodeText"/>
<Property Name="VerbalCommunicationLanguageCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerCommon" FromRole="CustomerCommon" ToRole="Customer"/>
</EntityType>
<EntityType Name="CustomerAddressInformation1">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="UUID" Type="Edm.Guid" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerAddressInformation1" FromRole="CustomerAddressInformation1" ToRole="Customer"/>
<NavigationProperty Name="CustomerFormattedAddressV11" Relationship="cust.CustomerAddressInformation1_CustomerFormattedAddressV11" FromRole="CustomerAddressInformation1" ToRole="CustomerFormattedAddressV11"/>
<NavigationProperty Name="AddressSnapshotAddressSnapshot" Relationship="cust.CustomerAddressInformation1_AddressSnapshotAddressSnapshot" FromRole="CustomerAddressInformation1" ToRole="AddressSnapshotAddressSnapshot"/>
</EntityType>
<EntityType Name="CustomerFormattedAddressV1">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="FormattedPostalAddressDescription" Type="Edm.String" Nullable="true" MaxLength="80" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="CustomerAddressInformation" Relationship="cust.CustomerAddressInformation_CustomerFormattedAddressV1" FromRole="CustomerFormattedAddressV1" ToRole="CustomerAddressInformation"/>
</EntityType>
<EntityType Name="CustomerFormattedAddressV11">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="CustomerAddressInformation1" Relationship="cust.CustomerAddressInformation1_CustomerFormattedAddressV11" FromRole="CustomerFormattedAddressV11" ToRole="CustomerAddressInformation1"/>
</EntityType>
<EntityType Name="AddressSnapshotAddressSnapshot">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
</EntityType>
<EntityType Name="CustomerCurrentEmployeeResponsible1">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="EmployeeUUID" Type="Edm.Guid" Nullable="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
<Property Name="PartyRoleCode" Type="Edm.String" Nullable="true" MaxLength="10" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true" c4c:value-help="CustomerCurrentEmployeeResponsible1PartyRoleCodeCollection" sap:text="PartyRoleCodeText"/>
<Property Name="PartyRoleCodeText" Type="Edm.String" Nullable="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="Customer" Relationship="cust.Customer_CustomerCurrentEmployeeResponsible1" FromRole="CustomerCurrentEmployeeResponsible1" ToRole="Customer"/>
</EntityType>
<EntityType Name="CodeList">
<Key>
<PropertyRef Name="Code"/>
</Key>
<Property Name="Code" Type="Edm.String" Nullable="false" FixedLength="false" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="Description" Type="Edm.String" Nullable="false" FixedLength="false" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
</EntityType>
<EntityType Name="ContextualCodeList">
<Key>
<PropertyRef Name="Context"/>
<PropertyRef Name="Code"/>
</Key>
<Property Name="Code" Type="Edm.String" Nullable="false" FixedLength="false" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="Context" Type="Edm.String" Nullable="false" FixedLength="false" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="Description" Type="Edm.String" Nullable="false" FixedLength="false" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
</EntityType>
<Association Name="CustomerAddressInformation1_AddressSnapshotAddressSnapshot">
<End Type="cust.CustomerAddressInformation1" Multiplicity="1" Role="CustomerAddressInformation1"/>
<End Type="cust.AddressSnapshotAddressSnapshot" Multiplicity="1" Role="AddressSnapshotAddressSnapshot"/>
</Association>
<Association Name="CustomerAddressInformation1_CustomerFormattedAddressV11">
<End Type="cust.CustomerAddressInformation1" Multiplicity="1" Role="CustomerAddressInformation1"/>
<End Type="cust.CustomerFormattedAddressV11" Multiplicity="*" Role="CustomerFormattedAddressV11"/>
</Association>
<Association Name="CustomerAddressInformation_CustomerAddressUsage">
<End Type="cust.CustomerAddressInformation" Multiplicity="1" Role="CustomerAddressInformation"/>
<End Type="cust.CustomerAddressUsage" Multiplicity="*" Role="CustomerAddressUsage"/>
</Association>
<Association Name="CustomerAddressInformation_CustomerFormattedAddressV1">
<End Type="cust.CustomerFormattedAddressV1" Multiplicity="*" Role="CustomerFormattedAddressV1"/>
<End Type="cust.CustomerAddressInformation" Multiplicity="1" Role="CustomerAddressInformation"/>
</Association>
<Association Name="Customer_CustomerAddressInformation">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.CustomerAddressInformation" Multiplicity="*" Role="CustomerAddressInformation"/>
</Association>
<Association Name="Customer_CustomerAddressInformation1">
<End Type="cust.CustomerAddressInformation1" Multiplicity="*" Role="CustomerAddressInformation1"/>
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
</Association>
<Association Name="Customer_CustomerAddressUsage">
<End Type="cust.CustomerAddressUsage" Multiplicity="1" Role="CustomerAddressUsage"/>
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
</Association>
<Association Name="Customer_CustomerCommon">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.CustomerCommon" Multiplicity="*" Role="CustomerCommon"/>
</Association>
<Association Name="Customer_CustomerCurrentEmployeeResponsible">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.CustomerCurrentEmployeeResponsible" Multiplicity="*" Role="CustomerCurrentEmployeeResponsible"/>
</Association>
<Association Name="Customer_CustomerCurrentEmployeeResponsible1">
<End Type="cust.CustomerCurrentEmployeeResponsible1" Multiplicity="*" Role="CustomerCurrentEmployeeResponsible1"/>
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
</Association>
<Association Name="Customer_CustomerRole">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.CustomerRole" Multiplicity="*" Role="CustomerRole"/>
</Association>
<Association Name="Customer_CustomerTaxNumber">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.CustomerTaxNumber" Multiplicity="*" Role="CustomerTaxNumber"/>
</Association>
<Association Name="Customer_SalesArrangement">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.SalesArrangement" Multiplicity="*" Role="SalesArrangement"/>
</Association>
<Association Name="Customer_SalesArrangementSalesArrangement">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.SalesArrangementSalesArrangement" Multiplicity="*" Role="SalesArrangementSalesArrangement"/>
</Association>
<Association Name="Customer_SalesArrangementSalesOrganisationIndependentSalesArrangement">
<End Type="cust.Customer" Multiplicity="1" Role="Customer"/>
<End Type="cust.SalesArrangementSalesOrganisationIndependentSalesArrangement" Multiplicity="1" Role="SalesArrangementSalesOrganisationIndependentSalesArrangement"/>
</Association>
<EntityContainer Name="accounttesttwo" m:IsDefaultEntityContainer="true">
<EntitySet Name="AddressSnapshotAddressSnapshotCollection" EntityType="cust.AddressSnapshotAddressSnapshot" sap:creatable="false" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerAddressInformation1Collection" EntityType="cust.CustomerAddressInformation1" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerAddressInformationAddressRepresentationCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationCollection" EntityType="cust.CustomerAddressInformation" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerAddressInformationCorrespondenceLanguageCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationCountryCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationPOBoxDeviatingCountryCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationPOBoxDeviatingRegionCodeCollection" EntityType="cust.ContextualCodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationPreferredCommunicationMediumTypeCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationRegionCodeCollection" EntityType="cust.ContextualCodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationTaxJurisdictionCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressInformationTimeZoneCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressUsageAddressUsageCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerAddressUsageCollection" EntityType="cust.CustomerAddressUsage" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerCategoryCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCollection" EntityType="cust.Customer" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerCommonAcademicTitleCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonCollection" EntityType="cust.CustomerCommon" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerCommonCompanyLegalFormCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonContactAllowedCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonFormOfAddressCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonGenderCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonNameFormatCountryCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonNonVerbalCommunicationLanguageCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonOccupationCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCommonVerbalCommunicationLanguageCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerContactAllowedCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCurrentEmployeeResponsible1Collection" EntityType="cust.CustomerCurrentEmployeeResponsible1" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerCurrentEmployeeResponsible1PartyRoleCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCurrentEmployeeResponsibleCollection" EntityType="cust.CustomerCurrentEmployeeResponsible" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerCurrentEmployeeResponsibleGenderCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCurrentEmployeeResponsibleMaritalStatusCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCurrentEmployeeResponsiblePartyRoleCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerCustomerABCClassificationCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerFormattedAddressV11Collection" EntityType="cust.CustomerFormattedAddressV11" sap:creatable="false" sap:updatable="false" sap:deletable="false"/>
<EntitySet Name="CustomerFormattedAddressV1Collection" EntityType="cust.CustomerFormattedAddressV1" sap:creatable="false" sap:updatable="false" sap:deletable="false"/>
<EntitySet Name="CustomerLifeCycleStatusCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerRoleBusinessCharacterCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerRoleBusinessObjectTypeCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerRoleCollection" EntityType="cust.CustomerRole" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerRoleRoleCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerTaxNumberCollection" EntityType="cust.CustomerTaxNumber" sap:creatable="true" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="CustomerTaxNumberCountryCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="CustomerTaxNumberTaxIdentificationNumberTypeCodeCollection" EntityType="cust.ContextualCodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementCollection" EntityType="cust.SalesArrangement" sap:creatable="false" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="SalesArrangementCurrencyCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementDistributionChannelCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementDivisionCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementLifeCycleStatusCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesArrangementCashDiscountTermsCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesArrangementCollection" EntityType="cust.SalesArrangementSalesArrangement" sap:creatable="false" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="SalesArrangementSalesArrangementCurrencyCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesArrangementCustomerGroupCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesArrangementDistributionChannelCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesArrangementDivisionCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesOrganisationIndependentSalesArrangementCollection" EntityType="cust.SalesArrangementSalesOrganisationIndependentSalesArrangement" sap:creatable="false" sap:updatable="true" sap:deletable="true"/>
<EntitySet Name="SalesArrangementSalesOrganisationIndependentSalesArrangementCurrencyCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesOrganisationIndependentSalesArrangementCustomerGroupCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesOrganisationIndependentSalesArrangementDistributionChannelCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesOrganisationIndependentSalesArrangementDivisionCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<EntitySet Name="SalesArrangementSalesOrganisationIndependentSalesArrangementLifeCycleStatusCodeCollection" EntityType="cust.CodeList" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:semantics="fixed-values"/>
<AssociationSet Name="CustomerAddressInformation1Collection_AddressSnapshotAddressSnapshotCollection" Association="cust.CustomerAddressInformation1_AddressSnapshotAddressSnapshot" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerAddressInformation1Collection" Role="CustomerAddressInformation1"/>
<End EntitySet="AddressSnapshotAddressSnapshotCollection" Role="AddressSnapshotAddressSnapshot"/>
</AssociationSet>
<AssociationSet Name="CustomerAddressInformation1Collection_CustomerCollection" Association="cust.Customer_CustomerAddressInformation1" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerAddressInformation1Collection" Role="CustomerAddressInformation1"/>
<End EntitySet="CustomerCollection" Role="Customer"/>
</AssociationSet>
<AssociationSet Name="CustomerAddressInformation1Collection_CustomerFormattedAddressV11Collection" Association="cust.CustomerAddressInformation1_CustomerFormattedAddressV11" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerAddressInformation1Collection" Role="CustomerAddressInformation1"/>
<End EntitySet="CustomerFormattedAddressV11Collection" Role="CustomerFormattedAddressV11"/>
</AssociationSet>
<AssociationSet Name="CustomerAddressInformationCollection_CustomerAddressUsageCollection" Association="cust.CustomerAddressInformation_CustomerAddressUsage" sap:creatable="true" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerAddressInformationCollection" Role="CustomerAddressInformation"/>
<End EntitySet="CustomerAddressUsageCollection" Role="CustomerAddressUsage"/>
</AssociationSet>
<AssociationSet Name="CustomerAddressUsageCollection_CustomerCollection" Association="cust.Customer_CustomerAddressUsage" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerAddressUsageCollection" Role="CustomerAddressUsage"/>
<End EntitySet="CustomerCollection" Role="Customer"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_CustomerAddressInformationCollection" Association="cust.Customer_CustomerAddressInformation" sap:creatable="true" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="CustomerAddressInformationCollection" Role="CustomerAddressInformation"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_CustomerCommonCollection" Association="cust.Customer_CustomerCommon" sap:creatable="true" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="CustomerCommonCollection" Role="CustomerCommon"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_CustomerCurrentEmployeeResponsibleCollection" Association="cust.Customer_CustomerCurrentEmployeeResponsible" sap:creatable="true" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="CustomerCurrentEmployeeResponsibleCollection" Role="CustomerCurrentEmployeeResponsible"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_CustomerRoleCollection" Association="cust.Customer_CustomerRole" sap:creatable="true" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="CustomerRoleCollection" Role="CustomerRole"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_CustomerTaxNumberCollection" Association="cust.Customer_CustomerTaxNumber" sap:creatable="true" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="CustomerTaxNumberCollection" Role="CustomerTaxNumber"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_SalesArrangementCollection" Association="cust.Customer_SalesArrangement" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="SalesArrangementCollection" Role="SalesArrangement"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_SalesArrangementSalesArrangementCollection" Association="cust.Customer_SalesArrangementSalesArrangement" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="SalesArrangementSalesArrangementCollection" Role="SalesArrangementSalesArrangement"/>
</AssociationSet>
<AssociationSet Name="CustomerCollection_SalesArrangementSalesOrganisationIndependentSalesArrangementCollection" Association="cust.Customer_SalesArrangementSalesOrganisationIndependentSalesArrangement" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCollection" Role="Customer"/>
<End EntitySet="SalesArrangementSalesOrganisationIndependentSalesArrangementCollection" Role="SalesArrangementSalesOrganisationIndependentSalesArrangement"/>
</AssociationSet>
<AssociationSet Name="CustomerCurrentEmployeeResponsible1Collection_CustomerCollection" Association="cust.Customer_CustomerCurrentEmployeeResponsible1" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerCurrentEmployeeResponsible1Collection" Role="CustomerCurrentEmployeeResponsible1"/>
<End EntitySet="CustomerCollection" Role="Customer"/>
</AssociationSet>
<AssociationSet Name="CustomerFormattedAddressV1Collection_CustomerAddressInformationCollection" Association="cust.CustomerAddressInformation_CustomerFormattedAddressV1" sap:creatable="false" sap:updatable="false" sap:deletable="false">
<End EntitySet="CustomerFormattedAddressV1Collection" Role="CustomerFormattedAddressV1"/>
<End EntitySet="CustomerAddressInformationCollection" Role="CustomerAddressInformation"/>
</AssociationSet>
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
phanak-sap commented 9 months ago

Hi @anthonyng288, thx for the metadata. URL Query generation part seems to be the same for both version, it is not from the encoder PR #243.

This seems to be bug introduced by the PR #258. And my current working hypothesis is that root cause is relevant to this, unchanged part of the service module - https://github.com/SAP/python-pyodata/blame/0d5c9dabfc7e5b99837eaf7fdccc592bc344d623/pyodata/v2/service.py#L1543

Since this is the part that is relevant to networking and actual service responses - and I do not have service at hand that returns that kind of data - to confirm my suspicions could you for sure post the returned json response for the customers = accountService.entity_sets.CustomerCollection.get_entities().count(inline=True).filter("LifeCycleStatusCode eq '2'").custom("$orderby", "LastChangeDateTime desc").custom("$top", "8").execute()

E.g. similarly to this comment https://github.com/SAP/python-pyodata/issues/202#issuecomment-1140086019 - the data can be obfuscated to just "VALUE" strings, I am interested just in the JSON structure only - and actually custom("$top", "2") would be enough.

Based on the metadata namespace I am guessing it is relevant to this API - https://blogs.sap.com/2021/04/05/how-to-connect-sap-cloud-for-customer-c4c-and-sap-analytics-cloud-sac/.

manuelseeger commented 9 months ago

@anthonyng288 SAP C4C initially implemented collections off OData V2 spec. Try sending this header along with your requests:

odata-v2-strict-json-format : true

ksaito1125 commented 9 months ago

Code that was working with pyodata 1.10.1 stopped working after upgrading to 1.11.0. I get a similar error.

image

@manuelseeger I tried adding the header as follows, but there was no change in the result.

(sapapi-py3.11) vscode@cf75c16e12d6:/workspaces/sapapi$ git diff --staged
diff --git a/sapapi/s4hanaapi.py b/sapapi/s4hanaapi.py
index db01f6b..99fac47 100644
--- a/sapapi/s4hanaapi.py
+++ b/sapapi/s4hanaapi.py
@@ -29,6 +29,8 @@ class S4Hana:
         param = {}
         param["sap-client"] = sap_client
         self.session.params = param
+        headers = {"odata-v2-strict-json-format": "true"}
+        self.session.headers.update(headers)
         self.client = pyodata.Client(self.endpoint, self.session)

     def get_transport(self, txid):
phanak-sap commented 9 months ago

Hi @ksaito1125 It is almost guarantied it is the same problem. The odata-v2-strict-json-format : true IMHO will perhaps work with "SAP C4C API" only. the get_entities needs to be fixed, with workaround to stay on 1.10.1.

One side-note - it seems to me that you are doing (list of transports, "s4hanaapi") basically same thing as what CLI tool sapcli does. Which has many others already implemented features which may be of interest to you.

Recommending checking out https://github.com/jfilak/sapcli/blob/master/doc/commands.md and https://github.com/jfilak/sapcli/blob/master/doc/commands/cts.md

manuelseeger commented 9 months ago

Problem was caused by my PR #258 . If there are deferred subcollections in the result they are included in the entity proxy. I'll submit a patch.

phanak-sap commented 9 months ago

@manuelseeger Thanks a lot taking this on yourself.

phanak-sap commented 9 months ago

Hi @anthonyng288 and @ksaito1125

I will create soon 1.11.1 release containing just this fix.

If you want, you can test this locally even before that as bug reporters, using (preferably in virtualenv or similar kind of isolation):

pip install git+https://github.com/SAP/python-pyodata.git@dc649f4