Today I was asked how to retrieve the name or the names of CDS views being used by OData Services that have been published either using autoexposure leveraging the annoation OData.publish:true or using the Referenced Data Source approach.
If the service has been published using OData.publish: true the answer is quite simple because the technical Service name is derived by the SADL Framework from the name of the underlying CDS view by adding the Suffix _CDS.
An OData service with the name: ZS4H_C_SLSORDER_TP_CDS is thus based on the CDS view ZS4H_C_SLSORDER_TP.
Referenced Data Source:
In this case the service name is derived from the SEGW project name and typically ends with _SRV.
Though the project name in SEGW and hence the service name can be chosen freely, the names of the entity sets are equivalent to the names of the underlying CDS views.
(This is also true for OData services being created using Autoexposure => OData.publish: true)
A service called ZDX271_20_SRV having entity sets called
would be based on CDS views having those four aforementioned names.
To get the names of the Entity sets there are two options:
You can search for the service name using the catalogue Service