The Most Frequently Asked In-Depth Questions About SAP CDS Views

CDS Views
Wooden letters F, A, and Q in a wooden box.

The list contains the most frequently asked in-depth questions about SAP CDS Views. The list grows continual. The answers are to the point. As a result, as short as possible without missing the important information.

Please leave a comment if the list does not contain your question. I will try to answer it and maybe add it to this list.

How to Consume an OData Service of a CDS View with Parameters Including a Date Value?

ABAP CDS View with parameters bp_id, p_date and p_language:

@AbapCatalog.sqlViewName: 'ZC_CDSView'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'My Consumption CDS View'
@OData.publish: true
define view ZC_CDS_View_Consumption
    with parameters bp_id: bu_partner,
        @Environment.systemField: #SYSTEM_DATE
        p_date: dats,
        @Environment.systemField: #SYSTEM_LANGUAGE
        p_langu: spras
as select from ZI_CDS_View_Composite {    
    key partner1, 
} where partner1 = :bp_id
    and date_to >= :p_date
    and date_from <= :p_date
    and spras = :p_langu

OData Service consumption of the from the ABAP CDS View generated OData Service with parameters:

No Comments

Most Recent Articles

Will SAP UI5 replace the SAP Web UI?

SAP Full Forms

More Similar Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.