Update content

This commit is contained in:
danrega
2023-04-03 15:23:57 +02:00
parent 9da93a4dd4
commit 2ef22258d2
8 changed files with 18 additions and 24 deletions

View File

@@ -6,7 +6,7 @@
* - Example to demonstrate CDS view entities. See the CDS view entities
* that are used in the example for more details.
* - Topics covered: Operands, expressions, and built-in functions in the
* SELECT list of CDS view entities, input parameters, joins,
* element list of CDS view entities, input parameters, joins,
* associations
* - Note: In ADT, check out the CDS view entities used in this example
* by holding down CTRL and clicking on the CDS view entity. This will

View File

@@ -22,14 +22,14 @@ define view entity zdemo_abap_cds_ve_agg_exp
{
// The SELECT list intentionally includes few fields only to focus on the effect of aggregate expressions.
// The element list intentionally includes few fields only to focus on the effect of aggregate expressions.
key carrid,
currency,
// -------- Aggregate expressions --------
// - Aggregate expressions can be used as elements of a SELECT list. Other positions are possible.
// - Aggregate expressions can be used as elements of an element list. Other positions are possible.
// - An alias name must be specified.
// - A GROUP BY clause is required. It must list all non-aggregated fields from the SELECT list.
// - A GROUP BY clause is required. It must list all non-aggregated fields from the element list.
// - Additions: If ALL is used, all rows in the result set are respected. This the default setting.
// If DISTINCT is used, only distinct values of an argument are respected.
@@ -55,7 +55,7 @@ define view entity zdemo_abap_cds_ve_agg_exp
//e.g. if 3 is returned, it means there are 3 different plane types among the result set
}
//GROUP BY clause that lists all non-aggregated fields from the SELECT list
//GROUP BY clause that lists all non-aggregated fields from the element list
group by
carrid,
currency

View File

@@ -62,7 +62,7 @@ define view entity zdemo_abap_cds_ve_joins
// - The join selects all entries on the left side. Entries that match the ON condition have the same content as in the inner join.
// In entries that do not match the ON condition, the elements on the right side have the null value.
// - To demonstrate the effect, the table zdemo_abap_carr contains entries for carrid that are not present in zdemo_abap_flsch.
// - Example in the SELECT list:
// - Example in the element list:
// - The coalesce function can be used to prevent null values in the result set.
// - In the example, the function is used for an element to prevent null values.
@@ -75,7 +75,7 @@ define view entity zdemo_abap_cds_ve_joins
// - The join selects all entries on the right side. Entries that match the ON condition have the same content as in the inner join.
// In entries that do not match the ON condition, the elements on the left side have the null value.
// - To demonstrate the effect, the table zdemo_abap_carr contains entries for carrid that are not present in zdemo_abap_flsch.
// - Example in the SELECT list:
// - Example in the element list:
// - Instead of the coalesce function, you can also use a CASE expression using a logical expression with IS [NOT] NULL
// to prevent null values in the result set.
// - In the example, a CASE expression is used for an element to prevent null values.

View File

@@ -38,7 +38,7 @@ define view entity zdemo_abap_cds_ve_sel
as select from zdemo_abap_fli //Selection from a demo database table;
//an alias name can be also specified ... as _fli, for example
// The following SELECT list demonstrates possible elements, operands and expressions.
// The following element list demonstrates possible elements, operands and expressions.
// Note: Many of the operands and expressions demonstrated below can occur in multiple positions.
// Refer to the ABAP Keyword Documentation for the details.
{
@@ -105,7 +105,7 @@ define view entity zdemo_abap_cds_ve_sel
cast( price as abap.dec(15,2) ) as cast_curr2dec,
// The following example uses the prefix $projection. which defines reuse expressions.
// That is, you can refer to an element defined previously in the SELECT list of the same CDS view entity.
// That is, you can refer to an element defined previously in the element list of the same CDS view entity.
// Note that this is only possible in dedicated positions. One of them is a cast expression.
cast( $projection.date_lit as abap.char(8) ) as cast_dats2c,