Ansicht
Dokumentation

ABENCDS_F1_WHERE_CLAUSE - CDS F1 WHERE CLAUSE

ABENCDS_F1_WHERE_CLAUSE - CDS F1 WHERE CLAUSE

Vendor Master (General Section)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

- SELECT, WHERE

... WHERE cond_expr ...

Effect

Defines a WHERE condition for the result set of a CDS view. When the CDS view is accessed, the result set contains only the data from the data source data_source that meets the condition cond_expr 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. 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





CL_GUI_FRONTEND_SERVICES - Frontend Services   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 4079 Date: 20240426 Time: 162545     sap01-206 ( 36 ms )