on 02-24-2016 9:24 AM
Hello,
I created an OData service using SEGW and CDS view thanks to this excellent blog :
Everything works fine and I really apreciate building OData service with all the sorting and filtering options automatically generated.
Although I face a problem when I am using CDS and associations. It doesn't work and I get this error :
CX_SADL_CONTRACT_VIOLATION
Entity ' BSA_CARACTERISTICSSET_MATERIALSSet ' was not found
I created a MATERIALS entity, with entityset MATERIALSSet and mapped to a CDS view ZV_MATERIALS_ASSO which have an association to CDS view ZV_MAT_CARAC.
I created a CARACTERISTICS entity, with entityset CARACTERISTICSSet and mapped to CDS view ZV_MAT_CARAC.
I created an association in segw from materials to caracteristics.
Everything works fine until I mapped the segw association to CDS association like explain in this thread . Then I get this error CX_SADL_CONTRACT_VIOLATION when I request MATERIALSet or CARACTERISTICSSet.
I have the feeling that it is a bug from standard SAP, but maybe there is a special way to build these associations using SEGW and CDS ? Why is it looking for BSA_CARACTERISTICSSet_MATERIALSSet ? What is this entityset ?
If there is no solution, I am open for another way to build oData service easily because coding all filters and sorting properties are very time consuming...
Thank you
Hi
The cx_sadl_contract_violation normally occurs when your CDS views has some parameters and you are not setting the parameters in SET_QUERY_OPTIONS method of SADL interface.
But can you elaborate on the query that you are firing ..?
Moreoover you can put a break point in CL_SADL_SQL_STATEMENT=>EXECUTE_CLIENT_SPECIFIED method which actually runs the native SQL query and see where its getting wrong
BR
Arshad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.