Get Example source ABAP code based on a different SAP table
• PROVIDER CONTRACTS ABAP_SDL_DEFINE_SERV • INA ABAP_SDL_DEFINE_SERV • SQL ABAP_SDL_DEFINE_SERV
ABAP_CDS_SDL - PROVIDER CONTRACTS>
ABAP_SYNTAX ... PROVIDER CONTRACTS INA $| SQL ...>
What does it do? A provider contract can optionally be specified in a CDS service definition>. It defines the scenario for which the service definition in question is intended. The effect is that stricter syntax checks are applied. Currently, the following provider contracts are available:
INA> Switches on syntax checks that are needed if the service definition is published with the Information Access (InA) protocol>. When this provider contract is specified, the following additional rules apply:
The CDS entities exposed must be analytical queries. Two kinds of analytical query are acceptable:
Analytical queries with the annotation @Analytics.query> set to true>
CDS projection views with the provider contract analytical_query >>.
If the exposed CDS entity is an analytical query with the annotation @Analytics.query: true> , exactly one entity must be exposed. Otherwise, a syntax check error occurs.
If the exposed CDS entity is a CDS projection view with the provider contract analytical_query>, then multiple entities can be exposed.
SQL> Switches on syntax checks that are needed if the service definition is published with the service binding type SQL. The same checks are performed as for service bindings of type SQL. The checks are documented on SAP Help Portal in the Developer Extensibility Guide, topic Constraints>. Exactly one provider contract can be specified in a CDS service definition. Changing the value defined after PROVIDER CONTRACTS> is possible, even after activation and transport of the respective service definition, as long as the corresponding service binding is not affected.
ABAP_USE_CASE A provider contract is a prerequisite for releasing a CDS service definition under the C0 contract, extend>. It enforces strict rules that match the rules of a type of service binding>. This ensures stability of business services> and prevents service definition extensions from causing errors in the associated service bindings.
Related Information
C0 Contract Rules for CDS Service Definitions>
Latest notes: The provider contract specified in a CDS service definition and the service binding which is defined for the CDS service definition in question must match. Otherwise, an error occurs. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The following service definition specifies the provider contract INA > and meets all corresponding requirements. SRVD DEMO_CDS_SD_PROVIDER_CONTRACT ABAP_EXAMPLE_END