Ansicht
Dokumentation

ABENCDS_WHERE_CLAUSE_V1 - CDS WHERE CLAUSE V1

ABENCDS_WHERE_CLAUSE_V1 - CDS WHERE CLAUSE V1

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

- DDIC-Based View, SELECT, WHERE

... WHERE cds_cond ...

Effect

Defines a WHERE condition for the result set of a . When the CDS view is accessed, the result set contains only the data from the data source data_source that meets the condition cds_cond specified after WHERE.

The fields evaluated in the condition do not need to be defined as elements of the CDS view in the SELECT list. For the operands, general and special rules apply when specifying the condition.

Note

Unlike in the HAVING condition, aggregate expressions cannot be specified in the WHERE condition.

Example

When the CDS view sales_order is accessed, the result set contains only orders where the company name of the business partner starts with "S" and that were created between January and March 2013.

@AbapCatalog.sqlViewName: 'SALES_ORDER_VW'
define view sales_order as
  select from snwd_so
         association to snwd_bpa as _partner
                     on snwd_so.buyer_guid = _partner.node_key
         { key   so_id,
                 snwd_so.buyer_guid,
                 _partner.company_name,
                 snwd_so.created_at,
               @Semantics.currencyCode
                 currency_code,
               @Semantics.amount.currencyCode: 'currency_code'
                 gross_amount
         }
         where _partner.company_name like 'S%' and
                       created_at between 2013010100000.0
                                     and 20130401000000.0; //Jan-March






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 4314 Date: 20240425 Time: 070051     sap01-206 ( 24 ms )