Skip to Content

odata service in SEGW with CDS service

Jul 28, 2017 at 04:44 PM


avatar image

I am trying to create simple odata service which contains two entities:

1) MAIN - CDS from table CRMD_ORDERADM_H

@AbapCatalog.sqlViewName: 'Z_MAIN'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Z_MAIN'
define view Z_MAIN_CDS as select from crmd_orderadm_h as MAIN
association [0..1] to z_link as LINK on MAIN.guid = LINK.guid_hi {
    key MAIN.guid,
    @ObjectModel.association.type: #TO_COMPOSITION_CHILD LINK[inner]

2) LINK - CDS from table CRMD_LINK

define view Z_LINK_CDS as select from crmd_link {
    key crmd_link.guid_set,

Than I go to SEGW transaction and create simple service, import this two this CDS services and map all fields of them. I register this service and test it. This worls perfectly.

But whe I add association and map it in the MAINSet and try to create runtime object, i get this error. please help me deal with it!

Mismatch of target 'LINKSet' and binding of association 'MAINSet1', since the target and binding does not result in same core-BO node (fragment 'Z_MAIN_LINK')

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sean Zhang
Aug 02, 2017 at 10:41 AM


If you want to create OData based one well defined CDS, you could use another way by reference CDS.

once you create your OData model, you could use the reference data source of the model, then you could select the CDS you created.

follow the screenshot.

you could just import the root CDS, then the association could also be imported.

Best Regards,


cds-reference.jpg (33.5 kB)
10 |10000 characters needed characters left characters exceeded