cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid key name in key predicate

ratna_rajeshp
Active Participant
0 Kudos

Hi Experts,

I get this error when trying to read the data via the key. ( Invalid key name in key predicate. Expected name is 'Partner, KzAnsprechpartner' )

I have seen that with one Key it works fine

When working with multiple keys it does not work.

The names of the KEYS are fine.

More details below.

Here is the URL that  I am trying to use.

/sap/opu/odata/SAP/ZCR_CUST_FACT_PRINT_URL_SRV/PRintSet(Partner ='10001',  KzAnsprechpartner =  ' a' )/$value

and here is the Meta data.

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

-<Schema xml:lang="en" xmlns="http://schemas.microsoft.com/ado/2008/09/edm" sap:schema-version="1" Namespace="ZCR_CUST_FACT_PRINT_URL_SRV">

-<EntityType sap:content-version="1" m:HasStream="true" Name="PRint">

-<Key>

<PropertyRef Name="Partner"/>

<PropertyRef Name="KzAnsprechpartner"/>

</Key>

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

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

------

Thanks!

Rajesh

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member185414
Active Contributor

If you trigger this /sap/opu/odata/SAP/ZCR_CUST_FACT_PRINT_URL_SRV/PRintSet the you will get a list of PrintSets. What happens if you choose one and open in separate tab ?

Does it open ? If yes, pick the same URL.

JyotiD
Active Participant

Hi Rajesh,

It seems your URI contains undesirable spaces.

Try this URI.

/sap/opu/odata/sap/ZCR_CUST_FACT_PRINT_URL_SRV/PRintSet(Partner='10001',KzAnsprechpartner='a')/$value

Regards,

Tarun

0 Kudos

Thanks Tarun. I could resolve my problem with your suggestion.

I had a similar issue with this error in the FIORI App for Purchase Orders Approval. There was a space into the parameter.

Error:

Resolution:

Tx SWFVISU.

1. Select the corresponding task (for example, TS20000166 for purchase order).
2. Double click "Visualization parameter".
3. Make sure that the visualization parameters are displayed as follows:

entity=/C_PurchaseOrderFs('{&_WI_Object_ID.MS_PURCHASE_ORDER.PURCHASEORDER&}')
annotations=/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='C_PURCHASEORDER_FS_ANNO_MDL', Version='0001')/$value/

I had an space after the TechnicalName parameter: