Using in-app extensibility features, create a custom CDS View.
For the execution of this exercise, you need to access SAP S/4HANA Cloud by means of a user with administrator rights.
Information for execution
In this exercise, replace ### with your user number. This number was introduce to allow multiple users to execute the same exercise in a shared system. It can be any number between 000 and 999.
After every step description, you can choose the [play] link to open a recorded simulation of the described actions.
Log on to your SAP S/4HANA Cloud tenant.
Assign your user with the following roles: [play]
Business Role Business Role ID Administrator BR_ADMINISTRATOR Configuration Expert BR_BPC_EXPERT Project Manager - Commercial Services BR_PROJ_MANAGE_COMM Sales Manager BR_SALES_MANAGER Internal Sales Representative BR_INTERNAL_SALES_REP
Open the Maintain Business Users app.
Search and choose your user.
In the Maintain Business User window, look foe the Assigned Business Roles section, choose Add.
Search and apply the required business roles.
Back to the main window, save the user information.
Back to the home view, refresh the browser page choosing F5.
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: [play]
Field Value Label Quotation Period ### Name YY1_QuotationPeriod### Scenario Standard CDS View
Open the Custom CDS Views app in the Extensibility catalog. All the available data sources are listed on the initial screen.
On the Custom CDS Views screen, choose Create.
On the Create Custom CDS View pop-up window, enter the values from the table.
In the Select: Primary Data Source window, search and select I_SalesQuotation. The data source is added.
Add the following columns to the view: [play]
Item CreationDate SalesOrganization SoldToParty
Switch to the Elements tab.
Choose Add → Elements.
Search and select the Item fields listed in the table.
Add a calculated column, named QuotationPeriod, based on the following formula: [play]Code snippetCopy code
Use the following data:
Field Value Name QuotationPeriod Label Quotation Period Formula (under the previous fields) concat(substring(I_SalesQuotation.BindingPeriodValidityStartDate,1,6),concat('/',substring(I_SalesQuotation.BindingPeriodValidityEndDate,1,6)))
In the Elements tab, choose Add → Calculation.
In the Add Calculation dialog window, enter the values from the table.
Publish and preview the view. [play]
- NoteIn case a window with a warning message appears, just close the window.