SAP CDS PV NO CONTRACT



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS_DDL - CDS Projection View, No Contract
It is possible, but not recommended, to define a CDS projection view without a provider contract. The default provider contract, if no provider contract is set explicitly , is TRANSACTIONAL_QUERY. The same features are available as for transactional queries and a projection view without provider contract can be used in the same scenarios. However, there are some minor differences in the syntax checks applied:
In a transactional projection view with provider contract TRANSACTIONAL_QUERY, path fields path_expr.element can be used in an association ON condition via $projection . In a projection view without provider contract, this is not allowed. Example:
Field in the projection list:
_assoc.fieldName
This path field can be used in an association ON condition in a transactional query, but not in a projection view without provider contract:
... on $projection.fieldName = 'A' ...



Latest notes:

Specifying a provider contract is strongly recommended, but not enforced , in most cases. However, there is one exception: if the projected entity is a CDS transactional interface, then the provider contract TRANSACTIONAL_QUERY is mandatory. When no provider contract is specified, a syntax check error occurs.
NON_V5_HINTS
ABAP_HINT_END