Exercise: Creating Custom CDS Views

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Create custom CDS views

Create Custom CDS Views

Overall execution summary

Using in-app extensibility features, create a custom CDS View.

Prerequisites

For the execution of this exercise, you need to logon to your SAP S/4HANA Cloud tenant by means of a user with administrator rights.

Information for execution

In this exercise, replace ### with your user number. This number was introduced to allow multiple users to execute the same exercise in a shared system. It can be any number between 000 and 999.

Steps

  1. Assign your user with the following roles:

    Business RoleBusiness Role ID
    AdministratorBR_ADMINISTRATOR
    Configuration ExpertBR_BPC_EXPERT
    Project Manager - Commercial ServicesBR_PROJ_MANAGE_COMM
    Sales ManagerBR_SALES_MANAGER
    Internal Sales RepresentativeBR_INTERNAL_SALES_REP
  2. Create a custom CDS view using the Quotation Period ### name (replace ### with your user number), based on the I_SalesQuotation data source, related to sales quotations. Use the following data:

    FieldValue
    LabelQuotation Period ###
    NameYY1_QuotationPeriod###
    ScenarioStandard CDS View
  3. Add the following columns to the view:

    Item
    CreationDate
    SalesOrganization
    SoldToParty
  4. Add a calculated column, named QuotationPeriod, based on the following information:

    FieldValue
    NameQuotationPeriod
    LabelQuotation Period
    Formula

    concat(substring(I_SalesQuotation.BindingPeriodValidityStartDate,1,6),concat('/',substring(I_SalesQuotation.BindingPeriodValidityEndDate,1,6)))

    formula.txt

  5. Publish and preview the view.

Result

The following simulation reproduces the full exercise execution:

Log in to track your progress & complete quizzes