diff --git a/01_Internal_Tables.md b/01_Internal_Tables.md
index ab9e564..69dfb2b 100644
--- a/01_Internal_Tables.md
+++ b/01_Internal_Tables.md
@@ -159,7 +159,7 @@ Internal Tables ...
- The primary table key has the predefined name `primary_key`, by which it can also be addressed explicitly. However, its use is optional, and it is usually not necessary to specify it explicitly. You can also specify an alias name for the primary key.
- When accessing internal tables using the table key, the primary key is always used implicitly in processing statements if no secondary key is specified. Note that the primary table key must be specified in table expressions if the primary key is to be used explicitly.
-> **π‘ Note**
+> [!NOTE]
> The key can consist of individual key fields or the entire line of the internal table. In this case, the pseudo component `table_line` can be used to denote the primary table key. For non-structured line types, this is the only way to define the key.
**Standard key**
@@ -218,7 +218,7 @@ Internal Tables ...
- For more details, see the programming guidelines for secondary keys: [Secondary
Key (F1 docu for standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensecondary_key_guidl.htm "Guideline").
-> **π‘ Note**
+> [!NOTE]
> - See examples of internal table declarations using the table keys mentioned above in the following section.
> - See more information and examples that focus on table access using keys and index below.
@@ -243,7 +243,7 @@ DATA itab3 TYPE itab_type1 ... "Based on an existing in
DATA itab4 LIKE itab1 ... "Based on an existing internal table
```
-> **π‘ Note**
+> [!NOTE]
> - If the table category is not specified (`... TYPE TABLE OF ...`), it is automatically `... TYPE STANDARD TABLE OF ...`.
> - Using [Runtime Type Creation (RTTC)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrun_time_type_creation_glosry.htm "Glossary Entry"), you can define and create new internal tables and table types as [type description objects](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentype_object_glosry.htm) at runtime. For more information, see the [Dynamic Programming](06_Dynamic_Programming.md) ABAP cheat sheet. Also find a snippet on creating internal tables dynamically by specifying the type dynamically [below](#creating-internal-tables-dynamically).
@@ -467,7 +467,7 @@ This section explores various line and table type options when declaring interna
- Table types based on both locally declared and globally available table types
- References
-> **π‘ Note**
+> [!NOTE]
> Types declared in the public visibility section of classes/interfaces are also globally visible and can be used for the creation.
@@ -708,7 +708,7 @@ SELECT * FROM zdemo_abap_fli INTO TABLE @FINAL(it_l).
## Populating Internal Tables
-> **π‘ Note**
+> [!NOTE]
> Various ABAP statements populate internal tables. The following sections cover a selection. ABAP SQL `SELECT` statements are covered further down and in the [ABAP SQL](03_ABAP_SQL.md) cheat sheet.
### Copying Internal Tables
@@ -722,7 +722,7 @@ DATA(itab3) = itab.
FINAL(itab4) = itab.
```
-> **π‘ Note**
+> [!NOTE]
> - Internal tables can only be assigned to internal tables.
> - Internal tables can be assigned to each other if their line types are [compatible](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencompatible_glosry.htm) or [convertible](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconvertible_glosry.htm).
> - An assignment can trigger an uncatchable exception if, for example, the target table is assigned a duplicate of a unique primary table key or secondary table.
@@ -894,7 +894,7 @@ INSERT LINES OF itab2 INTO itab INDEX i.
### Creating and Populating Internal Tables Using Constructor Expressions
The constructor expressions can be specified in/with various positions/statements in ABAP. In most of the following snippets, simple assignments are demonstrated.
-> **π‘ Note**
+> [!NOTE]
> The following sections cover a selection. There are more constructor expressions used in the context of internal tables (e.g. for creating internal tables). Find more details in the [Constructor Expressions](05_Constructor_Expressions.md) cheat sheet.
#### VALUE Operator
@@ -919,7 +919,7 @@ operator. The inline constructed table has two lines. `line`
represents an existing structure with a compatible line type. The
other line is constructed inline.
-> **π‘ Note**
+> [!NOTE]
> - The extra pair of parentheses represents a table line. The `#` character indicates that the line type can be derived from the context. The assignment deletes the existing content of the internal table on the left side.
> - The existing content of the internal table is deleted, and the new content, which is created in place, is added.
@@ -1161,7 +1161,7 @@ MOVE-CORRESPONDING itab_nested1 TO itab_nested2 EXPANDING NESTED TABLES KEEPING
-> **π‘ Note**
+> [!NOTE]
> The `CL_ABAP_CORRESPONDING` class can be used for assignments. Find an example in the [Released ABAP Classes](22_Released_ABAP_Classes.md) cheat sheet.
@@ -1237,7 +1237,7 @@ DATA(f10) = FILTER #( itab2 IN filter_tab2 USING KEY line WHERE num = table_line
DATA(f11) = FILTER #( itab2 USING KEY sec_key EXCEPT IN filter_tab2 WHERE num = table_line ).
```
-> **π‘ Note**
+> [!NOTE]
> More constructor expressions are available to deal with internal tables, for example the `REDUCE` operator. Find more information and examples in the [Constructor Expression cheat sheet](05_Constructor_Expressions.md).
@@ -1670,7 +1670,7 @@ READ TABLE itab REFERENCE INTO DATA(dref_inl) ...
-> **βοΈ Hint**
+> [!TIP]
> Which to use then? Since all syntax options basically provide similar
functionality, your use case, the
performance or readability of the code may play a role. For more information, see
@@ -4233,7 +4233,7 @@ MODIFY it FROM line USING KEY sec_key INDEX 1 TRANSPORTING c d.
MODIFY it FROM line TRANSPORTING b c WHERE a < 5.
```
-> **π‘ Note**
+> [!NOTE]
> - The system field `sy-subrc` is set to `0` if at least one line was changed. It is set to `4` if no lines were changed.
> - `MODIFY`, `DELETE`, and `INSERT` statements can be specified with and without the `TABLE` addition. With `TABLE` means an index access. Without `TABLE` means an access via the table key.
@@ -4376,7 +4376,7 @@ DELETE ADJACENT DUPLICATES FROM it USING KEY primary_key.
DELETE ADJACENT DUPLICATES FROM it USING KEY sec_key.
```
-> **π‘ Note**
+> [!NOTE]
> The system field `sy-subrc` is set to `0` if at least one line has been deleted. It is set to `4` if no lines were deleted.
### Deleting the Entire Internal Table Content
@@ -5090,7 +5090,7 @@ SELECT comp1, comp2, ...
Populating an internal table from a table based on the existence of data in
another table using the [`FOR ALL ENTRIES`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenwhere_all_entries.htm) addition.
-> **π‘ Note**
+> [!NOTE]
> Make sure that the internal table you are reading from is not initial. Therefore, it is recommended that you use a subquery as shown above: `... ( SELECT ... FROM ... WHERE ... ) ...`.
``` abap
@@ -5542,7 +5542,7 @@ DATA(itab10) = REDUCE tt_type3( INIT tab = VALUE #( )
Consider a scenario where you have a standard internal table, and you frequently access its content using a free key. The table is declared without a secondary table key. You can add a secondary table key to improve read performance.
The following example creates two demo internal tables. One without a secondary table key and the other with a secondary table key. The tables are populated with a lot of data. Then, in a `DO` loop, many reads are performed on the internal tables. One example uses a free key for the read, the other uses a secondary table key that includes the components used for the free key search. Before and after the reads, the current timestamp is stored in variables, from which the elapsed time is calculated. There should be a significant delta of the elapsed time.
-> **π‘ Note**
+> [!NOTE]
> This example is for [exploration, experimentation, and demonstration](./README.md#%EF%B8%8F-disclaimer). It is not intended for accurate runtime or performance testing and is not a suitable method for such purposes. Due to its simplified nature, results may vary and not be entirely accurate, even across multiple runs.
```abap
@@ -5646,7 +5646,7 @@ ENDCLASS.
- Key (primary table key, secondary table key, free key)
- To try this, create a demo class named `zcl_demo_abap` and insert the provided code. After activation, choose *F9* in ADT to execute the class. It may take some time to finish and display the output. The example is set up to display the results of the read performance test in the console.
-> **π‘ Note**
+> [!NOTE]
> - This example is for [exploration, experimentation, and demonstration](./README.md#%EF%B8%8F-disclaimer). It is not intended for accurate runtime or performance testing and is not a suitable method for such purposes. Due to its simplified nature, results may vary and not be entirely accurate, even across multiple runs.
> - The example concentrates on a few demo internal tables, constructed using various declaration options.
> - The purpose of this example is to underscore the significance of choosing the right table categories for your internal tables, tailored to your specific use case and the frequency of table access.
@@ -6388,7 +6388,7 @@ Topic [Internal Tables](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-
## Executable Example
[zcl_demo_abap_internal_tables](./src/zcl_demo_abap_internal_tables.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example covers the following topics, among others: Creating, populating, reading from, sorting, modifying internal tables
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
\ No newline at end of file
diff --git a/02_Structures.md b/02_Structures.md
index 0db9831..318e252 100644
--- a/02_Structures.md
+++ b/02_Structures.md
@@ -71,14 +71,18 @@ TYPES ty_struc_from_dbtab TYPE zdemo_abap_fli.
TYPES ty_struc_from_cds_ve TYPE zdemo_abap_fli.
```
-> **π‘ Note**
+> [!NOTE]
> - This cheat sheet focuses on locally defined structures and structured types.
> - Classic [DDIC views](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddic_view_glosry.htm) are not available in [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm). They can only be used as structured types in [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm).
+
+
## Creating Structures and Structured Types Locally
The typical language elements for creating structures and structured types locally in an ABAP program are [`BEGIN OF ... END OF ...`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaptypes_struc.htm). They are used in combination with the [`TYPES`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaptypes.htm) keyword to create a structured type and the [`DATA`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapdata.htm) keyword to create a structure.
+
+
### Creating Structured Types
@@ -131,10 +135,12 @@ TYPES: BEGIN OF struc_type,
```
-> **π‘ Note**
+> [!NOTE]
> Outside of classes, you can also refer to DDIC types using `LIKE` (`... comp11 LIKE ddic_type, ...`). If you actually want to refer to an existing data object, but due to typing errors you inadvertently specify a name that exists as DDIC type, errors may be unavoidable.
+
+
### Creating Structures
- To create a structure (i.e. a structured data object) in an ABAP program, you can use the `DATA` keyword.
@@ -163,10 +169,12 @@ DATA BEGIN OF struc.
DATA END OF struc.
```
-> **π‘ Note**
+> [!NOTE]
>- The keywords [`CLASS-DATA`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapclass-data.htm) and [`CONSTANTS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapconstants.htm) can also be used to create structures. In principle, they represent special cases of the general statement shown above. See the ABAP Keyword Documentation for more information.
>- Structures can also be created [inline](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeninline_declaration_glosry.htm) using [`DATA(...)`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_inline.htm) or [`FINAL(...)`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfinal_inline.htm), as shown below.
+
+
### Creating Structures Using Existing Structured Types
``` abap
@@ -195,6 +203,7 @@ DATA: struc_6 LIKE struc_1,
struc_8 TYPE LINE OF some_itab_type.
```
+
### Creating Structures by Inline Declaration
@@ -401,7 +410,7 @@ that is, it refers to another structure. The following example has multiple subs
END OF address.
```
-> **π‘ Note**
+> [!NOTE]
>- The data types of DDIC types are all flat (not nested) structures. Exception: Components of type `string` can be contained.
>- [Work areas](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenwork_area_glosry.htm) of ABAP SQL statements cannot contain any deep components other than strings among others.
>- Especially for assignments and comparisons of deep structures, the compatibility of the source and target structure must be taken into account.
@@ -458,7 +467,7 @@ Nested components can be addressed using chaining:
... address_n-name-title ...
```
-> **π‘ Note**
+> [!NOTE]
> There are syntax options for dynamically accessing structure components. See the [Dynamic Porgramming](06_Dynamic_Programming.md) cheat sheet.
@@ -687,7 +696,7 @@ and the [`CORRESPONDING`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/e
- The syntax also works for structures of the same type.
- Also note the special [conversion](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_struc.htm) and [comparison](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenlogexp_rules_operands_struc.htm) rules for structures in this context.
-> **π‘ Note**
+> [!NOTE]
>- The [`CL_ABAP_CORRESPONDING`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencl_abap_corresponding.htm) system class is available for making assignments. See the ABAP Keyword Documentation for the details.
>- The `INTO` clause of ABAP SQL statements has the `CORRESPONDING` addition. There, the following basic rule applies, which affects the value assignment: Without the `CORRESPONDING ...` addition, column names do not matter, only the position. With the `CORRESPONDING ...` addition, the position of the columns does not matter, only the name. See examples in the ABAP SQL cheat sheet.
@@ -1079,7 +1088,7 @@ are used in the context of local structures.
- `INCLUDE TYPE` can be used to include a structured type.
- You can use `INCLUDE STRUCTURE` to include a structure.
-> **π‘ Note**
+> [!NOTE]
> - They are not additions of `... BEGIN OF ... END OF ...` but individual ABAP statements.
> - If you use a chained statement with a colon to declare the structure, the inclusion of other structures with these statements interrupts the chained statement, that is, the components of the included structures are included as direct components of the [superstructure](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensuperstructure_glosry.htm "Glossary Entry").
>- By using the optional `AS` addition and specifying a name, the included components can be addressed by this common name as if they were actually components of a substructure.
@@ -1666,7 +1675,7 @@ ENDCLASS.
## Executable Example
[zcl_demo_abap_structures](./src/zcl_demo_abap_structures.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example covers the following topics, among others:
> - Creating structures and structured types
> - Variants of structures
diff --git a/03_ABAP_SQL.md b/03_ABAP_SQL.md
index 8a0f99a..cdc6395 100644
--- a/03_ABAP_SQL.md
+++ b/03_ABAP_SQL.md
@@ -70,7 +70,7 @@
ABAP SQL. The considerations there are not relevant for this cheat sheet since
the focus is on syntax options.
-> **π‘ Note**
+> [!NOTE]
> - The syntax options for the `SELECT` statement are extensive. Make sure that you consult the ABAP Keyword Documentation for all available options. The cheat sheet and snippets demonstrate a selection.
> - The code examples in the cheat sheet primarily use DDIC database tables for [CRUD operations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencrud_glosry.htm). Note that there are also CDS artifacts that allow not only reading but also creating, updating, and deleting. See [this section](#crud-operations-using-cds-artifacts).
@@ -215,7 +215,7 @@ SELECT FROM source "What data source to read from
| `SELECT data_source~* ...`
`SELECT ... FIELDS data_source~* ...` | In this case, the name of the data source is followed by a tilde and the `*` character to specify all columns. Note that there are [special conditions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_list.htm#!ABAP_VARIANT_1@1@) when using this variant. |
| `SELECT col1 AS al1, col2 AS al2, col3 AS al3 ...`
`SELECT ... FIELDS col1 AS al1, col2 AS al2, col3 AS al3 ...` | Defining alias names for individual columns of the result set with [`AS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_list.htm); make sure that you use an alias name only once here. In the statement, the alias name can only be used after an `ORDER BY` clause; as shown further down, in some cases (e. g. when using SQL expressions) the specification of an alias name is required; setting an alias name for the data source is also possible (`SELECT FROM dbtab AS alias_name ...`). See the section on joins further down. |
-> **π‘ Note**
+> [!NOTE]
> - You have plenty of options regarding the specification of the columns in the `SELECT` list, among them, the outlined direct specification of the column name. SQL expressions can be specified, too. See more details [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_clause_col_spec.htm) and in the sections on SQL expressions further down.
@@ -917,7 +917,7 @@ The following example shows the ordering of the result set based on the
content of the primary key of the [data source](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_source_glosry.htm "Glossary Entry").
You can also order by any columns and by explicitly specifying the sort order. There are more ordering options, for example, by using SQL expressions. Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaporderby_clause.htm).
-> **π‘ Note**
+> [!NOTE]
>- Not specifying `ORDER BY` means that the order of entries in the result set is undefined.
>- If `ORDER BY` and `GROUP BY` clauses are used, all columns specified after `ORDER BY` must also be specified after `GROUP BY`.
>- If aggregate functions are specified after `SELECT`, all columns that are specified after `ORDER BY` and that do not have an alias name for an aggregate function must also be specified after `SELECT` and after the `GROUP BY` clause which is required in this case, too.
@@ -1151,7 +1151,7 @@ SELECT carrid
-> **π‘ Note**
+> [!NOTE]
> - There are more join variants and syntax options available. See the ABAP Keyword Documentation on [joins](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_join.htm)
for more information.
> - There a more syntax options and contexts for `UNION`, `INTERSECT`, and `EXCEPT`. Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapunion.htm).
@@ -1198,7 +1198,7 @@ Setup of a statement with CTE:
`ENDWITH.` (which fulfills the same task as
`ENDSELECT.`).
-> **π‘ Note**
+> [!NOTE]
>- Each CTE must be used at least once, either in another CTE or in the
main query. The main query must access at least one CTE.
>- The result set of a CTE never has a [client
@@ -1296,7 +1296,7 @@ operands](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?f
[here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensql_operands.htm).
-> **π‘ Note**
+> [!NOTE]
> Questions about when to use what, what is possible in which contexts and positions, is beyond the scope of this cheat sheet. Check the details in the
respective topics in the ABAP Keyword Documentation. Find a general overview of important operand positions in ABAP SQL [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensql_operand_positions_oview.htm). Due to the rich variety of options, the cheat sheet covers a selection.
@@ -1351,7 +1351,7 @@ SELECT FROM zdemo_abap_flsch
[here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapsql_expr.htm)
and the subtopics there.
-> **π‘ Note**
+> [!NOTE]
> You can [enclose SQL expressions in parentheses](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensql_exp_parentheses.htm).
> ```abap
> SELECT SINGLE
@@ -2326,7 +2326,7 @@ INTO @DATA(tab_w_uuid).
## Create, Update, and Delete Operations
-> **π‘ Note**
+> [!NOTE]
> - The following sections include code patterns. To explore various syntax options with an executable example, see section [Example: Exploring ABAP SQL Statements Changing Data in Database Tables](#example-exploring-abap-sql-statements-changing-data-in-database-tables) below.
> - There are also CDS artifacts that allow not only reading but also creating, updating, and deleting. See [this section](#crud-operations-using-cds-artifacts).
@@ -3353,7 +3353,7 @@ SELECT SINGLE
### ABAP SQL and Client Handling
-> **π° In brief**
+> [!IMPORTANT]
> - ABAP SQL features implicit [client handling](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclient_handling_glosry.htm).
> - While you can disable this in classic ABAP, it is not an option in ABAP Cloud, where you are limited to accessing your own client.
> - Unlike ABAP SQL, there is no implicit client handling in Native SQL. AMDP, which uses Native SQL, is usable in ABAP Cloud, but it is crucial to ensure that AMDP only accesses client-safe repository objects, meaning it only accesses data from your own client. For this purpose, dedicated additions are provided.
@@ -3447,7 +3447,7 @@ There are [RAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index
## Executable Example
[zcl_demo_abap_sql](./src/zcl_demo_abap_sql.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example covers the following topics, among others:
> - Reading from database tables using `SELECT`
> - Various additions to `SELECT` statements
diff --git a/04_ABAP_Object_Orientation.md b/04_ABAP_Object_Orientation.md
index 2833879..4debd94 100644
--- a/04_ABAP_Object_Orientation.md
+++ b/04_ABAP_Object_Orientation.md
@@ -59,7 +59,7 @@
This ABAP cheat sheet provides an overview on selected syntax options and concepts related to ABAP object orientation.
-> **π‘ Note**
+> [!NOTE]
> - The cheat sheet is supported by code snippets and an executable example. They are **not** suitable as role models for object-oriented design. Their primary focus is on the syntax and functionality.
> - For more details, refer to the respective topics in the ABAP Keyword Documentation. Find an overview in the topic [ABAP Objects - Overview](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_objects_oview.htm).
> - The [executable examples](#executable-examples) reflect several points and code snippets covered in the cheat sheet.
@@ -125,7 +125,7 @@ classes
-> **π‘ Note**
+> [!NOTE]
> - If a class is only used in one ABAP program, creating a local class is enough. However, if you choose to create a global class, you must bear in mind that such a class can be used everywhere. Consider the impact on the users of the global class when you change, for example, the visibility section of a component or you delete it.
> - Apart from ADT, global classes can also be created in the ABAP Workbench (`SE80`) or with transaction `SE24` in [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm).
@@ -622,7 +622,7 @@ kinds of components are to be distinguished when, for example, looking at declar
static attributes can be accessed by both using an object reference variable and using the class name without a prior creation of an instance.
-> **π‘ Note**
+> [!NOTE]
> - You can declare constant data objects that should not be
changed using
[`CONSTANTS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapconstants.htm)
@@ -784,7 +784,7 @@ In the simplest form, methods can have no parameter at all. Apart from that, met
|`RAISING` | Used to declare the [class-based exceptions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclass_based_exception_glosry.htm "Glossary Entry") that can be propagated from the method to the caller. It can also be specified with the addition `RESUMABLE` for [resumable exceptions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenresumable_exception_glosry.htm). Find more information in the [Exceptions and Runtime Errors](27_Exceptions.md) cheat sheet. |
-> **π‘ Note**
+> [!NOTE]
> - It is advisable to avoid specifying multiple different output parameters (exporting, returning, changing) in a signature to reduce complexity.
> - Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmethods_general.htm).
> - You may find the addition `EXCEPTIONS` especially in definitions of older classes. They are for non-class-based exceptions. This addition should not be used in ABAP for Cloud Development. See the section [Class-Based Exceptions](#class-based-exceptions), and the section [Classic Exceptions](27_Exceptions.md#classic-exceptions) in the [Exceptions and Runtime Errors](27_Exceptions.md) cheat sheet.
@@ -871,7 +871,7 @@ Syntax for [completely](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-
- `LIKE LINE OF dobj`
- `LIKE REF TO dobj`
-> **π‘ Note**
+> [!NOTE]
> - `complete_type`: Stands for a non-generic built-in ABAP, ABAP DDIC, ABAP CDS, a public data type from a global class or interface, or a local type declared with `TYPES`
> - `REF TO` types as a reference variable. A generic type cannot be specified after `REF TO`. A typing with `TYPE REF TO data` and `TYPE REF TO object` is considered as completely typing a formal parameter.
> - Enumerated types can also be used to type the formal parameter.
@@ -1602,7 +1602,7 @@ statements to explicitly clear a reference variable.
CLEAR ref.
```
-> **π‘ Note**
+> [!NOTE]
> Objects use up space in the memory and should therefore be
cleared if they are no longer needed. However, the [garbage collector](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abengarbage_collector_glosry.htm "Glossary Entry") is called periodically and automatically by the [ABAP runtime framework](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_runtime_frmwk_glosry.htm "Glossary Entry") and clears all objects without any reference.
@@ -3785,7 +3785,7 @@ Notes on the output:
The table below includes selected syntax related to inheritance in class and method declarations. It also includes additions related to instantiation.
-> **π‘ Note**
+> [!NOTE]
> - Some of the syntax options have already been mentioned previously. This is to summarize.
> - The code examples show local classes and interfaces declared, for example, in the [CCIMP include](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenccimp_glosry.htm) of a class pool.
> - The snippets provided do not represent all possible syntax combinations. For the complete picture, refer to the ABAP Keyword Documentation. Additional syntax options are available in the context of friendship (`GLOBAL FRIENDS/FRIENDS`), testing (`FOR TESTING`), [RAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenarap_glosry.htm) (`FOR BEHAVIOR OF`; to declare [ABAP behavior pools](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbehavior_pool_glosry.htm)), and more.
@@ -4658,7 +4658,7 @@ ENDCLASS.
### Excursion: Inheritance Example
-> **π‘ Note**
+> [!NOTE]
> This example is also included in the ABAP cheat sheet repository: [zcl_demo_abap_oo_inheritance_1](./src/zcl_demo_abap_oo_inheritance_1.clas.abap)
Expand the following collapsible section for example classes. The example classes explore inheritance and demonstrate a selection of the inheritance-related syntax described above. The inheritance tree consists of four example classes. The base class includes the implementation of the classrun interface. The example is designed to output information to the console. So, you can execute this class using F9 in ADT.
@@ -5326,7 +5326,7 @@ Note the concept of static and dynamic type in this context:
- Similarly, the dynamic type also defines the class of an object which the reference variable points to. However, the dynamic type is determined at runtime, i. e. the class of an object which the reference variable points to can change.
- Relevant for? This differentiation enters the picture in polymorphism when a reference variable typed with reference to a subclass can always be assigned to reference variables typed with reference to one of its superclasses or their interfaces. That's what is called [upcast](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenup_cast_glosry.htm "Glossary Entry") (or widening cast). Or the assignment is done the other way round. That's what is called [downcast](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendown_cast_glosry.htm "Glossary Entry") (or narrowing cast).
-> **βοΈ Hints**
+> [!TIP]
> - The following basic rule applies: The static type is always more general than or the same as the dynamic type. The other way round: The dynamic type is always more special than or equal to the static type.
>- That means:
> - If the static type is a class, the dynamic type must be the same class or one of its subclasses.
@@ -6293,7 +6293,7 @@ ENDCLASS.
### Additions Related to Interface Implementations
-> **π‘ Note**
+> [!NOTE]
> The code examples show local classes and interfaces declared, for example, in the [CCIMP include](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenccimp_glosry.htm) of a class pool.
@@ -7439,7 +7439,7 @@ SET HANDLER handler3.
- In object-oriented programming, numerous design patterns enhance modularity, scalability, reusability, and more.
- Here, a selection of design patterns is covered, using simplified, non-semantic examples to reduce complexity and give a rough idea.
-> **π‘ Note**
+> [!NOTE]
> - The examples neither represent best practices nor role models. They only aim to experiment with the patterns in simplified contexts and convey the basic concepts.
> - More design patterns exist beyond those covered here. Different implementations, combinations of patterns and class setup strategies may apply.
> - Most examples are structured for easy exploration using simple, self-contained ABAP classes (i.e. only 1 class pool including local classes instead of multiple global classes) as follows:
@@ -11526,6 +11526,6 @@ in the ABAP Keyword Documentation.
- [zcl_demo_abap_objects_misc](./src/zcl_demo_abap_objects_misc.clas.abap): Additional syntax examples
- [zcl_demo_abap_oo_inheritance_1](./src/zcl_demo_abap_oo_inheritance_1.clas.abap): Focuses on inheritance; the inheritance tree consists of 4 example classes
-> **π‘ Note**
+> [!NOTE]
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
diff --git a/05_Constructor_Expressions.md b/05_Constructor_Expressions.md
index 82c4a97..6904536 100644
--- a/05_Constructor_Expressions.md
+++ b/05_Constructor_Expressions.md
@@ -65,7 +65,7 @@
appropriate type and result of the constructor expression in one
go: ```DATA(strtable) = VALUE string_table( ( `a` ) ( `b` ) ( `c` ) ).``` or ```DATA(dec) = CONV decfloat34( '1.23' ).```.
-> **βοΈ Hint**
+> [!TIP]
>- The construction of a result, i. e. a target [data
object](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_object_glosry.htm "Glossary Entry"),
implies that the data object is initialized. However, for some
@@ -81,7 +81,7 @@ initialization can be avoided.
[`VALUE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_value.htm)
operator construct a result in place based on a data type.
- This result can be structures or internal tables. It can also be initial values for any non-generic data types.
- > **π‘ Note**
+ > [!NOTE]
> Elementary data types and reference types cannot be
explicitly specified for the construction of values here.
- Regarding the type specifications before and parameters within the
@@ -113,7 +113,7 @@ the use of `VALUE` expressions is handy, too, because you can create correspondi
The following table illustrates a variety of syntax options and aspects regarding the `VALUE` operator.
-> **π‘ Note**
+> [!NOTE]
> - The examples represent a selection. Check the documentation for all options.
> - Some of the additions and concepts mentioned here are also valid for other constructor expressions further down but not necessarily mentioned explicitly. See the details on the syntax
options of the constructor operators in the ABAP Keyword Documentation.
@@ -916,7 +916,7 @@ struc2 = CORRESPONDING #(
*1 a hallo 2 d 30
```
-> **βοΈ Hint**
+> [!TIP]
> `CORRESPONDING` operator versus
[`MOVE-CORRESPONDING`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmove-corresponding.htm) in the context of structures:
Although the functionality is the same, note that, as the name implies,
@@ -2095,8 +2095,7 @@ ENDDO.
looping across internal tables. New table lines are created in
the iteration steps and inserted into a target table.
- The operand specified after `FOR` represents an iteration
- variable, i. e. a [work
- area](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenwork_area_glosry.htm "Glossary Entry")
+ variable, i. e. a [work area](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenwork_area_glosry.htm "Glossary Entry")
that contains the data while looping across the table.
- This variable is only visible within the `FOR`
expression, i. e. it cannot be used outside of the expression.
@@ -2109,6 +2108,8 @@ ENDDO.
parenthesis.
- In contrast to `LOOP` statements, the sequential processing
cannot be debugged.
+- Using `INDEX INTO n`, you can store the `sy-tabix` value for each loop iteration. The following variable is implicitly of type `i`.
+- `LET` expressions following `FOR` are evaluated during each iteration of the loop.
Examples:
@@ -2604,6 +2605,6 @@ DATA(it_reduced) = REDUCE string_table(
[zcl_demo_abap_constructor_expr](./src/zcl_demo_abap_constructor_expr.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
diff --git a/06_Dynamic_Programming.md b/06_Dynamic_Programming.md
index 496fa56..6af195c 100644
--- a/06_Dynamic_Programming.md
+++ b/06_Dynamic_Programming.md
@@ -133,7 +133,7 @@ LOOP AT itab ASSIGNING FIELD-SYMBOL().
ENDLOOP.
```
-> **π‘ Note**
+> [!NOTE]
>- After its declaration, a field symbol is initial, i. e. a memory area is not (yet) assigned to it (apart from the inline declaration). If you use an unassigned field symbol, a runtime error occurs.
> ```abap
> FIELD-SYMBOLS TYPE string.
@@ -159,7 +159,7 @@ Once the memory area is assigned, you can work with the content.
The table below includes a selection of `ASSIGN` statements, primarily featuring static assignments. More additions are covered further down. For more information, see the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENSET_FIELD_SYMBOLS.html).
-> **π‘ Note**
+> [!NOTE]
> In the event of an unsuccessful static assignment, `sy-subrc` remains unchanged (with exceptions), and no memory area is allocated to the field symbol. After the statement, the field symbol is unassigned. The addition `ELSE UNASSIGN`, although it cannot be explicitly specified in static assignments, is used implicitly.
@@ -472,7 +472,7 @@ ASSIGN CAST zdemo_abap_objects_interface( oref )->in_str TO FIELD-SYMBOL( **π‘ Note**
+> [!NOTE]
> As covered further down, in dynamic assignments of field symbols, `sy-subrc` is set, unlike in static assignments. You can use the `ELSE UNASSIGN` addition in dynamic assignments. While `ELSE UNASSIGN` can't be explicitly specified in static assignments, it is used implicitly. Note a potential pitfall when checking field symbol assignments with `IS ASSIGNED` in dynamic assignments. An example in the dynamic assignment section illustrates the pitfall.
@@ -707,7 +707,7 @@ s-oref = NEW cl_system_uuid( ).
ASSIGN s-oref TO
-> **π‘ Note**
+> [!NOTE]
> - Find more terms in the [RAP Glossary](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_glossary.htm) of the ABAP Keyword Documentation.
> - There are more artifacts and concepts related to RAP that go way beyond the scope of this cheat sheet. For example, a RAP BO can be exposed as a [business service](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbusiness_service_glosry.htm "Glossary Entry") to be accessed from outside [AS ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenas_abap_sys_environ_glosry.htm "Glossary Entry") and consumed. A [RAP BO
consumer](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_bo_consumer_glosry.htm "Glossary Entry")
@@ -773,7 +773,7 @@ These types are tailor-made for RAP purposes.
As the name implies, the types are derived by the [ABAP runtime framework](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_runtime_frmwk_glosry.htm "Glossary Entry")
from CDS entities and their behavior definition in the BDEF. With these special types, a type-safe access to RAP BOs is guaranteed.
-> **π‘ Note**
+> [!NOTE]
> - To explore BDEF derived types in your RAP BO, you can access the CCIMP include (*Local Types* tab in ADT) of your ABAP behavior pool, position the cursor on the methods, choose F2 and check the parameters typed with BDEF derived types.
> - As mentioned, CRUD operations are implicitly supported in managed scenarios (when specified in the BDEF). So, there will not be method declarations and implementations for CRUD operation methods.
@@ -807,13 +807,13 @@ from CDS entities and their behavior definition in the BDEF. With these special
- Short form: For convenience, you can specify RAP BO entities such as the RAP BO root entity or other CDS entities of a CDS composition tree. Examples: `DATA d1 TYPE TABLE FOR CREATE zdemo_abap_rap_ro_m.` (root entity), `DATA d3 TYPE TABLE FOR UPDATE zdemo_abap_rap_ch_m.` (child entity). Note that most example codes in the cheat sheet and in the executable example use the short form.
- Specifying associations defined in a BDEF preceded by `\`: For example, `DATA d4 TYPE TABLE FOR CREATE zdemo_abap_rap_ro_m\_child.`. The long form with `\\` followed by an entity name, `\`, and an association is also possible.
-> **π‘ Note**
+> [!NOTE]
> Certain types derived from the BDEF can only be specified and used within implementation classes, not beyond. These types include the following: `FOR CHANGE`, `FOR DETERMINATION`, `FOR VALIDATION`, `FOR ... FEATURES`, `FOR ... AUTHORIZATION`.
BDEF derived type examples:
-> **π‘ Note**
+> [!NOTE]
> The demo BDEF `zdemo_abap_rap_ro_m` ...
> - specifies the alias name `root` for the RAP BO root entity `zdemo_abap_rap_ro_m`.
> - specifies the association `_child`.
@@ -1521,7 +1521,7 @@ UPDATE zdemo_abap_rapt1 FROM @cr_der_type
DELETE zdemo_abap_rapt1 FROM @cr_der_type MAPPING FROM ENTITY.
```
-> **π‘ Note**
+> [!NOTE]
> More information and ABAP statements: [Type Mapping for RAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapeml_type_mapping.htm)
@@ -1553,7 +1553,7 @@ and [long
form](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entities_long.htm)
of EML `MODIFY` statements.
-> **π‘ Note**
+> [!NOTE]
> Unlike reading operations, modifying operations are not enabled by default. You must make the respective notations in the BDEF:
> ```
> ...
@@ -1613,7 +1613,7 @@ MODIFY ENTITY root_ent
-> **π‘ Note**
+> [!NOTE]
> - Addition [`FIELDS ( ... ) WITH`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_fields.htm):
This field selection option specifies which fields are to be
respected for the operation. The derived type, i. e. an internal
@@ -1681,7 +1681,7 @@ MODIFY ENTITIES OF root_ent
REPORTED DATA(r2).
```
-> **π‘ Note**
+> [!NOTE]
>- The entity specified after `ENTITY` can be either the root
entity itself or a child entity. If an alias is defined, the alias
should be used.
@@ -2807,7 +2807,7 @@ The default ABAP statements for RAP are `COMMIT ENTITIES` (triggers the RAP save
- `COMMIT ENTITIES` statements implicitly enforce local updates with `COMMIT WORK`, or `COMMIT WORK AND WAIT` if the local update fails. Therefore, the update is either a local update or a synchronous update, but never an asynchronous update. When `COMMIT WORK` is used, the RAP BO consumer can choose between synchronous and asynchronous update for RAP BO entities.
- `ROLLBACK ENTITIES` implicitly triggers `ROLLBACK WORK`. Both have the same effect when used in RAP. Therefore, they are interchangeable.
-> **π‘ Note**
+> [!NOTE]
> Special Case: Failures in the Late Save Phase
> - In exceptional cases, for example, when [BAPIs](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenbapi_glosry.htm) are called to save RAP BO instances in the late save phase, it may happen that the basic rule that failures must not occur in the RAP late save phase and be detected in the RAP early save phase is violated.
> - In such cases, the base class `CL_ABAP_BEHAVIOR_SAVER_FAILED` can be used for the RAP saver class.
@@ -2917,7 +2917,7 @@ This cheat sheet is supported by different executable examples demonstrating var
- Demo RAP scenario ("RAP calculator") with a managed, draft-enabled RAP BO, late numbering [zcl_demo_abap_rap_draft_ln_m](./src/zcl_demo_abap_rap_draft_ln_m.clas.abap)
- Demonstrating the local consumption of [RAP business events](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_entity_event_glosry.htm) in the context of a RAP demo scenario (managed RAP BO with managed [internal numbering](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_int_numbering_glosry.htm) and [additional save](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_add_save_glosry.htm)): [zcl_demo_abap_rap_m_as](./src/zcl_demo_abap_rap_m_as.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - To reduce the complexity, the executable examples only focus on the technical side. ABAP classes play the role of a RAP BO consumer here.
> - The examples do not represent real life scenarios and are not suitable as role models for proper RAP scenarios. They rather focus on the technical side by giving an idea how the communication and data exchange between a RAP BO consumer and RAP BO provider can work. Additionally, the examples show how the methods for non-standard RAP BO operations might be self-implemented in an ABAP behavior pool.
> - Due to the simplification, the examples do not entirely meet all requirements of the [RAP BO contract](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenrap_bo_contract_glosry.htm) and do not represent semantic or best practice examples.
diff --git a/09_Bits_and_Bytes.md b/09_Bits_and_Bytes.md
index 64fbe12..552c058 100644
--- a/09_Bits_and_Bytes.md
+++ b/09_Bits_and_Bytes.md
@@ -1,181 +1,181 @@
-# Excursion Down to Bits and Bytes
-
-This sheet goes a bit into the technical background of data types and
-data objects. It may be helpful for a better understanding of how to
-handle data in ABAP including a glance on casting and conversions.
-
-After its declaration, a [data
-object](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_object_glosry.htm "Glossary Entry")
-is usable in its context (procedure, class, program) according to its
-type. For example, a numeric data object can be assigned the result of a
-calculation:
-
-
-> **π‘ Note**
-> For checking out the code snippets in [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm), you can use the interface `if_oo_adt_classrun` in a class by implementing the method `if_oo_adt_classrun~main`.
-
-``` abap
-DATA num TYPE i.
-
-num = 2 * 3 * 5 * 53 * 2267.
-
-cl_demo_output=>display( num ).
-```
-
-After this assignment, the data object `num` contains the
-calculated value 3604530, which is also displayed accordingly with a
-type-compliant output as, for example,
-`cl_demo_output=>display`. And of course the same can be seen
-in the display of the variable in the ABAP Debugger when setting a
-breakpoint at the last statement.
-
-The ABAP Debugger also shows the hexadecimal value 32003700 of the data
-object. This directly represents the binary value `0011 0010 0000 0000
-0011 0111 0000 0000` stored in the 4 bytes allocated to the 4-byte
-integer number in the memory. This value is platform dependent and for
-numeric types is defined by the [byte
-order](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbyte_order_glosry.htm "Glossary Entry")
-order, where either the most significant (big endian) or least
-significant (little endian) byte is written to the first memory
-location. The decimal value of the hexadecimal value `32003700` shown here
-would be `838874880` and is not the integer value
-`3604530` that ABAP deals with. This shows the meaning of
-data types. A data object is a sequence of bytes stored in memory at its
-address, which is interpreted by the ABAP runtime framework according to
-the data type. The hexadecimal value is in most cases irrelevant to the
-programmer.
-
-Let us now consider a character-like field text with a length of two
-characters:
-
-``` abap
-DATA text TYPE c LENGTH 2.
-
-text = '2' && '7'.
-
-cl_demo_output=>display( text ).
-```
-This field can be assigned the result of a string operation as shown and
-the result shown by `cl_demo_output=>display` as well as in
-the ABAP Debugger is the character string `27`. Again, it is
-the data type, that derives the value `27` from the actual hexadecimal
-content, which is `32003700` as in the previous example! In
-this case, `32003700` is the encoding of the string
-`27` in the Unicode character representation
-[UCS-2](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenucs2_glosry.htm "Glossary Entry"),
-which is supported by ABAP in Unicode systems. The Unicode character
-representation also depends on the platform-dependent byte order.
-
-Only for a byte-type data type does the value as interpreted by ABAP
-directly correspond to the hexadecimal content. The following lines
-modify the bits of a byte string with a bit-operation:
-
-``` abap
-DATA hex TYPE x LENGTH 4 VALUE 'CDFFC8FF'.
-
-hex = BIT-NOT hex.
-
-cl_demo_output=>display( hex ).
-```
-
-Here, the output with `cl_demo_output=>display`, the value
-display of the ABAP Debugger as well as the hexadecimal value are the
-same, namely `32003700`.
-
-In the above examples, we presented three data objects that all occupy 4
-bytes in memory that have the same binary values, but are handled
-differently by ABAP due to their data type. The data type is also
-responsible for the fact, that different kind of operations (numeric
-calculation, string concatenation, bit-operation) can be applied to the
-respective data objects. Using these examples we can have now look at
-the basic concepts of
-[casting](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencast_casting_glosry.htm "Glossary Entry")
-and [type
-conversion](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentype_conversion_glosry.htm "Glossary Entry")
-and their relation to bits and bytes.
-
-In ABAP, the term casting means nothing more than treating a data object
-according to a different data type than the one that is permanently
-assigned to it. This can be done using [field
-symbols](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfield_symbol_glosry.htm "Glossary Entry"),
-with which a new (symbolic) name and a new type can be defined for the
-memory area of a data object. When the memory area is accessed using a
-field symbol, it is handled according to the type of the field symbol.
-The following lines show an example.
-
-``` abap
-DATA hex TYPE x LENGTH 4 VALUE '32003700'.
-FIELD-SYMBOLS: Β Β TYPE i,
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β TYPE c.
-ASSIGN hex TO Β Β CASTING.
-ASSIGN hex TO CASTING.
-
-cl_demo_output=>new(
-Β Β )->write_data( hex
-Β Β )->write_data(
-Β Β )->write_data( )->display( ).
-```
-
-The bit string in `hex` is cast to a numeric field when accessed
-using the name `` and to a text field when accessed using
-the name ``. The outputs are `32003700`,
-`3604530` and `27`, clearly showing the effect of
-the data type on handling one and the same hexadecimal content.
-
-In contrast, in a type conversion (or conversion for short), the actual
-binary content of a data object is converted so that it fits another
-data type. Type conversions usually occur in assignments between data
-objects of different data types. The goal of such a conversion is to
-preserve the type-specific meaning of the content in the source field as
-far as possible for the data type of the target field. For this purpose,
-ABAP contains a large set of [conversion
-rules](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_rules.htm).
-A simple example is shown here:
-
-``` abap
-TYPES hex TYPE x LENGTH 4.
-FIELD-SYMBOLS:
-Β Β TYPE hex,
-Β Β Β Β TYPE hex.
-
-DATA: text TYPE c LENGTH 2 VALUE '27',
-Β Β Β Β Β Β numΒ Β TYPE i.
-
-num = text.
-
-ASSIGN text TO CASTING.
-ASSIGN numΒ Β TO Β Β CASTING.
-
-cl_demo_output=>new(
-Β Β )->write_data( text
-Β Β )->write_data(
-Β Β )->write_data( num
-Β Β )->write_data( )->display( ).
-```
-
-We are assigning the character-like field `text` to the numeric
-field `num` and display the result that can also be checked in
-the ABAP Debugger. The ABAP runtime framework recognizes that the
-character string `27` in text can be interpreted as the
-integer number `27`, generates the hexadecimal value 1B000000
-in which this number is encoded for the numeric type of `num`,
-and assigns it to the memory location of `num`. Thus, the actual
-conversion takes place for the original hexadecimal content
-`32003700` of `text` to the new hexadecimal content
-`1B000000` of `num`. For character strings in text
-fields, for which no such meaningful conversion is possible, an
-exception occurs. The field symbols `` and
-`` are used to show the hexadecimal content of the
-fields `text` and `num` by casting them to a byte-like
-type.
-
-> **βοΈ Hint**
-> For reasons of simplicity this sheet is restricted to named elementary
-variables. Note that in particular the same holds for
-[literals](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_literal_glosry.htm "Glossary Entry")
-that are handled internally in such a way as if they were constants of
-the data type assigned to the literal. In the preceding example,
-`text` can be replaced by a literal `'27'` yielding
-the same results.
-
-
+# Excursion Down to Bits and Bytes
+
+This sheet goes a bit into the technical background of data types and
+data objects. It may be helpful for a better understanding of how to
+handle data in ABAP including a glance on casting and conversions.
+
+After its declaration, a [data
+object](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_object_glosry.htm "Glossary Entry")
+is usable in its context (procedure, class, program) according to its
+type. For example, a numeric data object can be assigned the result of a
+calculation:
+
+
+> [!NOTE]
+> For checking out the code snippets in [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm), you can use the interface `if_oo_adt_classrun` in a class by implementing the method `if_oo_adt_classrun~main`.
+
+``` abap
+DATA num TYPE i.
+
+num = 2 * 3 * 5 * 53 * 2267.
+
+cl_demo_output=>display( num ).
+```
+
+After this assignment, the data object `num` contains the
+calculated value 3604530, which is also displayed accordingly with a
+type-compliant output as, for example,
+`cl_demo_output=>display`. And of course the same can be seen
+in the display of the variable in the ABAP Debugger when setting a
+breakpoint at the last statement.
+
+The ABAP Debugger also shows the hexadecimal value 32003700 of the data
+object. This directly represents the binary value `0011 0010 0000 0000
+0011 0111 0000 0000` stored in the 4 bytes allocated to the 4-byte
+integer number in the memory. This value is platform dependent and for
+numeric types is defined by the [byte
+order](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbyte_order_glosry.htm "Glossary Entry")
+order, where either the most significant (big endian) or least
+significant (little endian) byte is written to the first memory
+location. The decimal value of the hexadecimal value `32003700` shown here
+would be `838874880` and is not the integer value
+`3604530` that ABAP deals with. This shows the meaning of
+data types. A data object is a sequence of bytes stored in memory at its
+address, which is interpreted by the ABAP runtime framework according to
+the data type. The hexadecimal value is in most cases irrelevant to the
+programmer.
+
+Let us now consider a character-like field text with a length of two
+characters:
+
+``` abap
+DATA text TYPE c LENGTH 2.
+
+text = '2' && '7'.
+
+cl_demo_output=>display( text ).
+```
+This field can be assigned the result of a string operation as shown and
+the result shown by `cl_demo_output=>display` as well as in
+the ABAP Debugger is the character string `27`. Again, it is
+the data type, that derives the value `27` from the actual hexadecimal
+content, which is `32003700` as in the previous example! In
+this case, `32003700` is the encoding of the string
+`27` in the Unicode character representation
+[UCS-2](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenucs2_glosry.htm "Glossary Entry"),
+which is supported by ABAP in Unicode systems. The Unicode character
+representation also depends on the platform-dependent byte order.
+
+Only for a byte-type data type does the value as interpreted by ABAP
+directly correspond to the hexadecimal content. The following lines
+modify the bits of a byte string with a bit-operation:
+
+``` abap
+DATA hex TYPE x LENGTH 4 VALUE 'CDFFC8FF'.
+
+hex = BIT-NOT hex.
+
+cl_demo_output=>display( hex ).
+```
+
+Here, the output with `cl_demo_output=>display`, the value
+display of the ABAP Debugger as well as the hexadecimal value are the
+same, namely `32003700`.
+
+In the above examples, we presented three data objects that all occupy 4
+bytes in memory that have the same binary values, but are handled
+differently by ABAP due to their data type. The data type is also
+responsible for the fact, that different kind of operations (numeric
+calculation, string concatenation, bit-operation) can be applied to the
+respective data objects. Using these examples we can have now look at
+the basic concepts of
+[casting](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencast_casting_glosry.htm "Glossary Entry")
+and [type
+conversion](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentype_conversion_glosry.htm "Glossary Entry")
+and their relation to bits and bytes.
+
+In ABAP, the term casting means nothing more than treating a data object
+according to a different data type than the one that is permanently
+assigned to it. This can be done using [field
+symbols](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfield_symbol_glosry.htm "Glossary Entry"),
+with which a new (symbolic) name and a new type can be defined for the
+memory area of a data object. When the memory area is accessed using a
+field symbol, it is handled according to the type of the field symbol.
+The following lines show an example.
+
+``` abap
+DATA hex TYPE x LENGTH 4 VALUE '32003700'.
+FIELD-SYMBOLS: Β Β TYPE i,
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β TYPE c.
+ASSIGN hex TO Β Β CASTING.
+ASSIGN hex TO CASTING.
+
+cl_demo_output=>new(
+Β Β )->write_data( hex
+Β Β )->write_data(
+Β Β )->write_data( )->display( ).
+```
+
+The bit string in `hex` is cast to a numeric field when accessed
+using the name `` and to a text field when accessed using
+the name ``. The outputs are `32003700`,
+`3604530` and `27`, clearly showing the effect of
+the data type on handling one and the same hexadecimal content.
+
+In contrast, in a type conversion (or conversion for short), the actual
+binary content of a data object is converted so that it fits another
+data type. Type conversions usually occur in assignments between data
+objects of different data types. The goal of such a conversion is to
+preserve the type-specific meaning of the content in the source field as
+far as possible for the data type of the target field. For this purpose,
+ABAP contains a large set of [conversion
+rules](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_rules.htm).
+A simple example is shown here:
+
+``` abap
+TYPES hex TYPE x LENGTH 4.
+FIELD-SYMBOLS:
+Β Β TYPE hex,
+Β Β Β Β TYPE hex.
+
+DATA: text TYPE c LENGTH 2 VALUE '27',
+Β Β Β Β Β Β numΒ Β TYPE i.
+
+num = text.
+
+ASSIGN text TO CASTING.
+ASSIGN numΒ Β TO Β Β CASTING.
+
+cl_demo_output=>new(
+Β Β )->write_data( text
+Β Β )->write_data(
+Β Β )->write_data( num
+Β Β )->write_data( )->display( ).
+```
+
+We are assigning the character-like field `text` to the numeric
+field `num` and display the result that can also be checked in
+the ABAP Debugger. The ABAP runtime framework recognizes that the
+character string `27` in text can be interpreted as the
+integer number `27`, generates the hexadecimal value 1B000000
+in which this number is encoded for the numeric type of `num`,
+and assigns it to the memory location of `num`. Thus, the actual
+conversion takes place for the original hexadecimal content
+`32003700` of `text` to the new hexadecimal content
+`1B000000` of `num`. For character strings in text
+fields, for which no such meaningful conversion is possible, an
+exception occurs. The field symbols `` and
+`` are used to show the hexadecimal content of the
+fields `text` and `num` by casting them to a byte-like
+type.
+
+> [!TIP]
+> For reasons of simplicity this sheet is restricted to named elementary
+variables. Note that in particular the same holds for
+[literals](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_literal_glosry.htm "Glossary Entry")
+that are handled internally in such a way as if they were constants of
+the data type assigned to the literal. In the preceding example,
+`text` can be replaced by a literal `'27'` yielding
+the same results.
+
+
diff --git a/10_ABAP_SQL_Hierarchies.md b/10_ABAP_SQL_Hierarchies.md
index 94bded9..c0189af 100644
--- a/10_ABAP_SQL_Hierarchies.md
+++ b/10_ABAP_SQL_Hierarchies.md
@@ -1,724 +1,724 @@
-
-
-# ABAP SQL: Working with Hierarchies
-
-- [ABAP SQL: Working with Hierarchies](#abap-sql-working-with-hierarchies)
- - [Introduction](#introduction)
- - [Overview](#overview)
- - [SQL Hierarchies](#sql-hierarchies)
- - [Creating SQL Hierarchies](#creating-sql-hierarchies)
- - [ABAP CDS Hierarchies](#abap-cds-hierarchies)
- - [ABAP SQL Hierarchy Generator HIERARCHY](#abap-sql-hierarchy-generator-hierarchy)
- - [ABAP CTE Hierarchies](#abap-cte-hierarchies)
- - [Hierarchy Navigators](#hierarchy-navigators)
- - [Hierarchy Node Navigator HIERARCHY\_DESCENDANTS](#hierarchy-node-navigator-hierarchy_descendants)
- - [Hierarchy Node Navigator HIERARCHY\_ANCESTORS](#hierarchy-node-navigator-hierarchy_ancestors)
- - [Hierarchy Node Navigator HIERARCHY\_SIBLINGS](#hierarchy-node-navigator-hierarchy_siblings)
- - [Hierarchy Aggregate Navigators](#hierarchy-aggregate-navigators)
- - [More Information](#more-information)
-
-## Introduction
-
-This cheat sheet summarizes the functions ABAP SQL offers together with
-ABAP CDS for working with [hierarchical
-data](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_glosry.htm "Glossary Entry")
-that is stored in database tables. Hierarchical data in database tables
-means that lines of one or more database tables are connected by
-[parent-child
-relationships](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenpcr_glosry.htm "Glossary Entry").
-There are many use cases where hierarchical data plays a role and where
-accessing information about the hierarchical relationship is important.
-For example, a common task can be to find out the descendants or
-ancestors of a given hierarchy node or to aggregate values of subtrees.
-
-## Overview
-
-In former times you had to load the data from the database into internal
-tables and program it all by yourself (if you did not find an
-appropriate API). In between,
-[meshes](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenmesh_glosry.htm "Glossary Entry")
-offered some features for working with hierarchies, as shown in this
-[example](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenmesh_for_reflex_sngl_abexa.htm),
-but have not found wide distribution.
-
-Meanwhile, the standard AS ABAP database is a SAP HANA database that
-offers a lot of helpful features. Among other things, you will find a
-set of hierarchy functions there that allow you to deal with
-hierarchical data directly on the database and that you can look up in
-the [SAP HANA
-documentation](https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/2969da89b87f4abd85fd0b5f9f5bc395.html?version=2.0.06&locale=en-US).
-Now you might expect that you must use
-[AMDP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenamdp.htm)
-in order to access these functions from your ABAP programs, but no need
-to do so! ABAP SQL and ABAP CDS support hierarchies directly by wrapping
-the HANA built-in functions without any loss of performance. You can
-stay in the comfortable ABAP world and nevertheless have access to most
-modern features. All you have to do, is to understand some concepts and
-learn some additional syntax and then you can start right away.
-
-> **π‘ Note**
-> The examples in this cheat sheet are only relevant for [standard ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_abap_glosry.htm), i. e. the unrestricted ABAP language scope. Find the artifacts used in the code snippets in your on-premise ABAP system.
-
-
-
-## SQL Hierarchies
-
-With [SQL
-hierarchy](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensql_hierarchy_glosry.htm "Glossary Entry")
-we denote a special [hierarchical data
-source](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_data.htm)
-that you can use in the `FROM` clause of ABAP SQL queries. A SQL
-hierarchy is a tabular set of rows which form the hierarchy nodes of a
-hierarchy and which contains additionally [hierarchy
-columns](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_column_glosry.htm "Glossary Entry")
-that contain hierarchy attributes with hierarchy-specific information
-for each row. For creating a SQL hierarchy, you need the following:
-
-- Data Source
-
- This can be any data source you can access normally in an ABAP SQL
- query, as most commonly a database table or a CDS view, but also a
- CTE (common table expression). The structure and content of the data
- source should be able to represent hierarchical data.
-
-- Parent-Child Relation
-
- A parent-child relation must be defined between two or more columns
- of the data source. From the parent-child relation and the actual
- data of the data source, the SQL hierarchy consisting of parent
- nodes and child nodes can be created. The parent-child relation must
- be defined by a self-association which we call hierarchy
- association. This can be achieved with CDS associations or CTE
- associations. A data source exposing a hierarchy association can be
- used as a hierarchy source for creating a SQL hierarchy.
-
-- Hierarchy Creation
-
- From a hierarchy source, that is a data source exposing a hierarchy
- association, a SQL hierarchy can be created. This can be done either
- by defining a CDS hierarchy outside an ABAP program or with the
- hierarchy generator of ABAP SQL directly in the `FROM`
- clause of an ABAP SQL query inside an ABAP program.
-
-The following topics show you step-by-step how SQL hierarchies can be
-created and accessed.
-
-
-
-## Creating SQL Hierarchies
-
-### ABAP CDS Hierarchies
-With [CDS
-hierarchies](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_column_glosry.htm "Glossary Entry"),
-you outsource the hierarchy data source and the creation of the SQL
-hierarchy from your ABAP program to ABAP CDS. Here the hierarchy is a
-fully fledged CDS entity, it is reusable in different programs or in
-other CDS entities (views), and can be part of your data model including
-access control using CDS DCL. For a CDS hierarchy, the hierarchy source
-cannot be anything else but a CDS view that exposes a [hierarchy
-association](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_association_glosry.htm "Glossary Entry").
-Here is a very simple example for that:
-
-```
-@AccessControl.authorizationCheck: #NOT_REQUIRED
-define view entity DEMO_CDS_SIMPLE_TREE_VIEW
-Β Β as select from demo_simple_tree
-Β Β association [1..1] to DEMO_CDS_SIMPLE_TREE_VIEW as _treeΒ Β
-Β Β Β Β on $projection.parent = _tree.id
-{
-Β Β Β Β Β Β _tree,
-Β Β key id,
-Β Β Β Β Β Β parent_id as parent,
-Β Β Β Β Β Β name
-}
-```
-
-This CDS view entity accesses the database table
-`DEMO_SIMPLE_TREE`, where the actual data is
-stored, and exposes a
-[self-association](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenself_association_glosry.htm "Glossary Entry")
-`_tree`. The `ON` condition of the association
-defines a parent-child relation between the elements `id` and
-`parent`. It simply means that a row of the result set where
-column `parent` has the same value as the column
-`id` of another row is a child of the latter row in the
-hierarchy that is constructed from that view. The CDS view exposes also
-another column `name` of the database table that represents
-the remaining data content. Note that you can define such CDS views for
-any available data source and that the `ON` condition can be
-more complex than shown in the simple example here.
-
-Now we can use the above CDS view as the hierarchy source of a CDS
-hierarchy that can be defined as follows:
-
-```
-define hierarchy DEMO_CDS_SIMPLE_TREE
-Β Β with parameters
-Β Β Β Β p_id : abap.int4
-Β Β as parent child hierarchy(
-Β Β Β Β source
-Β Β Β Β Β Β DEMO_CDS_SIMPLE_TREE_SOURCE
-Β Β Β Β Β Β child to parent association _tree
-Β Β Β Β Β Β start where
-Β Β Β Β Β Β Β Β id = :p_id
-Β Β Β Β Β Β siblings order by
-Β Β Β Β Β Β Β Β id ascending
-Β Β Β Β )
-Β Β Β Β {
-Β Β Β Β Β Β id,
-Β Β Β Β Β Β parent,
-Β Β Β Β Β Β name
-Β Β Β Β }
-```
-
-The CDS DDL statement [`DEFINE
-HIERARCHY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_f1_define_hierarchy.htm)
-that can be used in the DDL source code editor of ADT defines a CDS
-hierarchy as a CDS entity that can be accessed in CDS views or ABAP SQL
-as a SQL hierarchy. The most important additions of the statement are:
-
-- `SOURCE` for specifying the hierarchy source, here our
- `DEMO_CDS_SIMPLE_TREE_VIEW`.
-- `CHILD TO PARENT ASSOCIATION` for specifying the
- hierarchy association, here `_tree`.
-- `START WHERE` for defining the root nodes of the SQL
- hierarchy, here represented by an input parameter `p_id`
- that must be passed when accessing the CDS hierarchy.
-- `SIBLINGS ORDER BY` to define also a sort order for
- sibling nodes besides the sort order that comes from the
- parent-child relationship anyhow.
-- An element list `{ ... }` that defines the columns of
- the SQL hierarchy, here simply all elements of the hierarchy source.
-
-For a full description and all other additions see [`DEFINE
-HIERARCHY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_f1_define_hierarchy.htm).
-
-When you access the CDS hierarchy, all lines are selected from the
-original data source, in our case the database table
-`DEMO_SIMPLE_TREE`, that fulfill the `START WHERE` condition. Those make up the root node set of the SQL
-hierarchy. In the simplest case we have exactly one root node, but more
-are possible. Then, for each root node, its descendants are retrieved.
-That means each line from the database table that fulfills the
-`ON`-condition of the hierarchy association is added to the
-SQL hierarchy. And for each descendant this is done again and again
-until all descendants are found. And that is basically all! Further
-additions to `DEFINE HIERARCHY` allow you to control the
-creation of the SQL hierarchy, for example, whether multiple parents are
-allowed or how orphans or cycles should be handled.
-
-Besides the elements of the hierarchy, the element list can also contain
-the hierarchy attributes listed under [Hierarchy
-Attributes](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_hierarchy_attributes.htm).
-Then the SQL hierarchy is enriched with columns containing information
-about the role, the current line plays as a hierarchy node, as, for
-example, the hierarchy rank or the hierarchy level. In our example, we
-did not add such elements, because ABAP SQL does that implicitly for you
-when accessing the CDS hierarchy!
-
-The SQL hierarchy can be used in an ABAP SQL query by using the CDS
-hierarchy directly as a data source of the `FROM` clause:
-
-``` abap
-DATA root_id type demo_cds_simple_tree_view-id.
-
-...
-
-SELECT FROM demo_cds_simple_tree( p_id = @root_id )
- FIELDS id,
-Β Β Β Β Β Β Β Β Β parent,
-Β Β Β Β Β Β Β Β Β name,
-Β Β Β Β Β Β Β Β Β hierarchy_rank,
-Β Β Β Β Β Β Β Β Β hierarchy_tree_size,
-Β Β Β Β Β Β Β Β Β hierarchy_parent_rank,
-Β Β Β Β Β Β Β Β Β hierarchy_level,
-Β Β Β Β Β Β Β Β Β hierarchy_is_cycle,
-Β Β Β Β Β Β Β Β Β hierarchy_is_orphan,
-Β Β Β Β Β Β Β Β Β node_id,
-Β Β Β Β Β Β Β Β Β parent_id
- INTO TABLE @FINAL(cds_result).
-```
-
-And although we did not define any hierarchy attributes in the element
-list of the CDS hierarchy, we can add all the hierarchy columns listed
-under [Hierarchy
-Columns](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddddl_hierarchy.htm)
-to the `SELECT` list of our ABAP SQL statement! This is always
-possible when a SQL hierarchy is accessed in ABAP SQL. We can pass any
-ID to the CDS hierarchy now and see what happens. If such a line is
-found in the database table, the respective hierarchical data will be
-retrieved and delivered. Execute class
-`CL_DEMO_SQL_HIERARCHIES` for filling the
-database table with randomly generated data and inspect the tabular
-result. As expected, all elements of the `SELECT` list appear as
-columns. Note that the content of column `NAME` could be
-anything. It is filled here with a string representation of the path
-from the root node to the current node for demonstration purposes only.
-
-From the ABAP language point of view, CDS hierarchies are the most
-convenient way of using SQL hierarchies. Now let us turn to other ways,
-involving more ABAP, until we do not use any CDS more in the end.
-
-
-
-## Hierarchy Navigators
-
-[Hierarchy
-navigators](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_navigator_glosry.htm "Glossary Entry")
-are an additional set of [hierarchy
-functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_function_glosry.htm "Glossary Entry")
-in ABAP SQL that allow you to work on existing SQL hierarchies instead
-of creating them. Hierarchy navigators can work on SQL hierarchies
-created as shown above, namely on CDS hierarchies, the hierarchy
-generator or a CTE hierarchy. They can be used as data sources in ABAP
-SQL queries. If you need a SQL hierarchy multiple times, from a
-performance point of view it is best to create it once with a given set
-of root nodes and then access it with hierarchy navigators. Furthermore,
-each hierarchy navigator can add further hierarchy columns to the result
-set that offer additional options for the evaluation.
-
-In the following examples, we access our CDS hierarchy with hierarchy
-navigators. But you could also replace it with the hierarchy generator
-or a CTE hierarchy. Check the examples of the
-[documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_navigators.htm),
-where this is also shown.
-
-
-
-### Hierarchy Node Navigator HIERARCHY_DESCENDANTS
-
-As the name says,
-[`HIERARCHY_DESCENDANTS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_node_navis.htm)
-fetches all descendants for any nodes from a SQL hierarchy. It adds
-`HIERARCHY_DISTANCE` as an additional hierarchy column to
-the result set. Let us look at an example. All examples are code
-snippets from `CL_DEMO_SQL_HIERARCHIES` again.
-
-``` abap
-DATA root_id TYPE demo_cds_simple_tree_view-id.
-
-DATA sub_id TYPE demo_cds_simple_tree_view-id.
-
-...
-
-SELECT FROM HIERARCHY_DESCENDANTS(
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @root_id )
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β START WHERE id = @sub_idΒ Β )
- FIELDS id,
-Β Β Β Β Β Β Β Β parent_id,
-Β Β Β Β Β Β Β Β name,
-Β Β Β Β Β Β Β Β hierarchy_distance
- INTO TABLE @FINAL(descendants).
-```
-
-Our CDS hierarchy `DEMO_CDS_SIMPLE_TREE_VIEW` is used to
-create a SQL hierarchy with a start node passed to parameter
-`p_id` and for a node `sub_id` all descendants
-are fetched. Running the program shows the result including the
-additional column `HIERARCHY_DISTANCE` that contains the
-distance to the respective start node. A further parameter
-`DISTANCE` - not shown here - allows you to restrict the
-distance to the respective start node.
-
-
-
-### Hierarchy Node Navigator HIERARCHY_ANCESTORS
-
-Now the other way around: ABAP SQL function
-[`HIERARCHY_ANCESTORS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_node_navis.htm)
-returns the ancestors of any given node of an existing hierarchy:
-
-``` abap
-DATA root_id TYPE demo_cds_simple_tree_view-id.
-
-DATA max_id TYPE demo_cds_simple_tree_view-id.
-
-...
-
-SELECT FROM HIERARCHY_ANCESTORS(
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @root_id )
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β START WHERE id = @max_id )
- FIELDS id,
-Β Β Β Β Β Β Β Β Β Β parent_id,
-Β Β Β Β Β Β Β Β Β Β name,
-Β Β Β Β Β Β Β Β Β Β hierarchy_distance
- INTO TABLE @FINAL(ancestors).
-```
-
-Looking at the result when running
-`CL_DEMO_SQL_HIERARCHIES`, you see that the
-value of column `HIERARCHY_DISTANCE` is negative now. Using
-aggregate functions or evaluating the internal result table, you can now
-easily extract further information like the number of ancestors and so
-on.
-
-
-
-### Hierarchy Node Navigator HIERARCHY_SIBLINGS
-
-Besides descendants and ancestors, hierarchy nodes also can have
-siblings, that is nodes that have the same parent node. You can find
-these by looking for all nodes with the same value in hierarchy column
-`HIERARCHY_PARENT_RANK`. But there is also
-[`HIERARCHY_SIBLINGS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_node_navis.htm)
-as a hierarchy function for that:
-
-``` abap
-DATA root_id TYPE demo_cds_simple_tree_view-id.
-
-DATA sibl_id TYPE demo_cds_simple_tree_view-id.
-
-...
-
-SELECT FROM HIERARCHY_SIBLINGS(
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @root_id )
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β START WHERE id = @sibl_id )
- FIELDS id,
-Β Β Β Β Β Β Β Β Β Β parent_id,
-Β Β Β Β Β Β Β Β Β Β name,
-Β Β Β Β Β Β Β Β Β Β hierarchy_sibling_distance
- INTO TABLE @FINAL(siblings).
-```
-
-You see that this function adds another hierarchy column
-`HIERARCHY_SIBLING_DISTANCE` that contains the distance to
-the respective start node. Running
-`CL_DEMO_SQL_HIERARCHIES`, where we start with
-a node that definitely has some siblings, shows the result.
-
-
-
-### Hierarchy Aggregate Navigators
-
-Finally let us turn to the [hierarchy aggregate
-navigators](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_agg_navi_glosry.htm "Glossary Entry")
-that allow you to apply some aggregate functions to descendants and
-ancestors of any node of a SQL hierarchy:
-
-- [`HIERARCHY_DESCENDANTS_AGGREGATE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_desc_agg.htm)
-- [`HIERARCHY_ANCESTORS_AGGREGATE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_ancs_agg.htm)
-
-We will show an example for the descendants case and refer to the
-[documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_ancs_agg.htm)
-for the ancestors.
-
-Applying aggregate functions to columns normally means that you have
-some data there for which this makes sense. In our simplistic SQL
-hierarchy tree we do not have such meaningful data. On the other hand,
-this can also be a use case: You can have the administrative data for
-the parent-child relation in one database table and the real data in
-another one. And for that use case, the hierarchy aggregate navigator
-`HIERARCHY_DESCENDANTS_AGGREGATE` gives you the option of
-joining such data to your SQL hierarchy:
-
-``` abap
-TYPES:
-Β Β BEGIN OF value,
-Β Β Β Β idΒ Β Β Β TYPE i,
-Β Β Β Β amount TYPE p LENGTH 16 DECIMALS 2,
-Β Β END OF value.
-
-DATA value_tab TYPE SORTED TABLE OF value WITH UNIQUE KEY id.
-
-DATA root_id TYPE demo_cds_simple_tree_view-id.
-
-DATA sub_id TYPE demo_cds_simple_tree_view-id.
-
-...
-
-SELECT FROM HIERARCHY_DESCENDANTS_AGGREGATE(
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @sub_idΒ Β ) AS h
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β JOIN @value_tab AS v
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ONΒ Β v~id = h~id
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β MEASURES SUM( v~amount ) AS amount_sum
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β WHERE hierarchy_rank > 1
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β WITH SUBTOTAL
-Β Β Β Β Β Β Β Β Β Β Β Β Β Β WITH BALANCE )
- FIELDS id,
-Β Β Β Β Β Β Β Β amount_sum,
-Β Β Β Β Β Β Β Β hierarchy_rank,
-Β Β Β Β Β Β Β Β hierarchy_aggregate_type
- INTO TABLE @FINAL(descendants_aggregate).
-```
-
-In our example, we join an internal table `value_tab` of the
-same program to the SQL hierarchy. In a real life example you would join
-another database table, of course. On the other hand the example shows
-ABAP SQL's capability of using internal tables as data sources. You
-even can go so far to evaluate hierarchical data in internal tables with
-ABAP SQL by using an internal table as data source for a CTE hierarchy!
-
-The example does the following:
-
-- We use the hierarchy aggregate navigator
- `HIERARCHY_DESCENDANTS_AGGREGATE` as a data source of a
- `FROM` clause.
-- Our CDS hierarchy `DEMO_CDS_SIMPLE_TREE_VIEW` joined
- with internal table `value_tab` is used as the data source.
-- The ABAP SQL function returns a tabular result of nodes of the data
- source.
-- The aggregate function `SUM` behind `MEASURES` sums
- up the values of the column amounts of the joined internal table for
- all descendants of each node returned by the ABAP SQL function.
-- The `WHERE` condition restricts the result set by a freely
- programmable condition.
-- The `WITH` additions add further rows to the result set that
- can be recognized by values in an additional hierarchy column
- `HIERARCHY_AGGREGATE_TYPE`:
-
- - `WITH SUBTOTAL`
-
- In the row where `HIERARCHY_AGGREGATE_TYPE` has
- value 1, column `AMOUNT_SUM` contains the sum of the
- values of all hierarchy nodes that meet the `WHERE`
- condition.
-
- - `WITH BALANCE`
-
- In the row where `HIERARCHY_AGGREGATE_TYPE` has
- value 2, column `AMOUNT_SUM` contains the sum of the
- values of all hierarchy nodes that do not meet the
- `WHERE` condition.
-
- For more `WITH` additions see the
- [documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_desc_agg.htm).
-
-Running `CL_DEMO_SQL_HIERARCHIES` shows the
-result. It also shows the result of the joined data source, where you
-can check that the calculated values are correct.
-
-
-
-
-## More Information
-For the complete reference documentation about SQL hierarchies, see [`SELECT, FROM hierarchy_data`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_data.htm).
+
+
+# ABAP SQL: Working with Hierarchies
+
+- [ABAP SQL: Working with Hierarchies](#abap-sql-working-with-hierarchies)
+ - [Introduction](#introduction)
+ - [Overview](#overview)
+ - [SQL Hierarchies](#sql-hierarchies)
+ - [Creating SQL Hierarchies](#creating-sql-hierarchies)
+ - [ABAP CDS Hierarchies](#abap-cds-hierarchies)
+ - [ABAP SQL Hierarchy Generator HIERARCHY](#abap-sql-hierarchy-generator-hierarchy)
+ - [ABAP CTE Hierarchies](#abap-cte-hierarchies)
+ - [Hierarchy Navigators](#hierarchy-navigators)
+ - [Hierarchy Node Navigator HIERARCHY\_DESCENDANTS](#hierarchy-node-navigator-hierarchy_descendants)
+ - [Hierarchy Node Navigator HIERARCHY\_ANCESTORS](#hierarchy-node-navigator-hierarchy_ancestors)
+ - [Hierarchy Node Navigator HIERARCHY\_SIBLINGS](#hierarchy-node-navigator-hierarchy_siblings)
+ - [Hierarchy Aggregate Navigators](#hierarchy-aggregate-navigators)
+ - [More Information](#more-information)
+
+## Introduction
+
+This cheat sheet summarizes the functions ABAP SQL offers together with
+ABAP CDS for working with [hierarchical
+data](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_glosry.htm "Glossary Entry")
+that is stored in database tables. Hierarchical data in database tables
+means that lines of one or more database tables are connected by
+[parent-child
+relationships](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenpcr_glosry.htm "Glossary Entry").
+There are many use cases where hierarchical data plays a role and where
+accessing information about the hierarchical relationship is important.
+For example, a common task can be to find out the descendants or
+ancestors of a given hierarchy node or to aggregate values of subtrees.
+
+## Overview
+
+In former times you had to load the data from the database into internal
+tables and program it all by yourself (if you did not find an
+appropriate API). In between,
+[meshes](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenmesh_glosry.htm "Glossary Entry")
+offered some features for working with hierarchies, as shown in this
+[example](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenmesh_for_reflex_sngl_abexa.htm),
+but have not found wide distribution.
+
+Meanwhile, the standard AS ABAP database is a SAP HANA database that
+offers a lot of helpful features. Among other things, you will find a
+set of hierarchy functions there that allow you to deal with
+hierarchical data directly on the database and that you can look up in
+the [SAP HANA
+documentation](https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/2969da89b87f4abd85fd0b5f9f5bc395.html?version=2.0.06&locale=en-US).
+Now you might expect that you must use
+[AMDP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenamdp.htm)
+in order to access these functions from your ABAP programs, but no need
+to do so! ABAP SQL and ABAP CDS support hierarchies directly by wrapping
+the HANA built-in functions without any loss of performance. You can
+stay in the comfortable ABAP world and nevertheless have access to most
+modern features. All you have to do, is to understand some concepts and
+learn some additional syntax and then you can start right away.
+
+> [!NOTE]
+> The examples in this cheat sheet are only relevant for [standard ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_abap_glosry.htm), i. e. the unrestricted ABAP language scope. Find the artifacts used in the code snippets in your on-premise ABAP system.
+
+
+
+## SQL Hierarchies
+
+With [SQL
+hierarchy](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensql_hierarchy_glosry.htm "Glossary Entry")
+we denote a special [hierarchical data
+source](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_data.htm)
+that you can use in the `FROM` clause of ABAP SQL queries. A SQL
+hierarchy is a tabular set of rows which form the hierarchy nodes of a
+hierarchy and which contains additionally [hierarchy
+columns](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_column_glosry.htm "Glossary Entry")
+that contain hierarchy attributes with hierarchy-specific information
+for each row. For creating a SQL hierarchy, you need the following:
+
+- Data Source
+
+ This can be any data source you can access normally in an ABAP SQL
+ query, as most commonly a database table or a CDS view, but also a
+ CTE (common table expression). The structure and content of the data
+ source should be able to represent hierarchical data.
+
+- Parent-Child Relation
+
+ A parent-child relation must be defined between two or more columns
+ of the data source. From the parent-child relation and the actual
+ data of the data source, the SQL hierarchy consisting of parent
+ nodes and child nodes can be created. The parent-child relation must
+ be defined by a self-association which we call hierarchy
+ association. This can be achieved with CDS associations or CTE
+ associations. A data source exposing a hierarchy association can be
+ used as a hierarchy source for creating a SQL hierarchy.
+
+- Hierarchy Creation
+
+ From a hierarchy source, that is a data source exposing a hierarchy
+ association, a SQL hierarchy can be created. This can be done either
+ by defining a CDS hierarchy outside an ABAP program or with the
+ hierarchy generator of ABAP SQL directly in the `FROM`
+ clause of an ABAP SQL query inside an ABAP program.
+
+The following topics show you step-by-step how SQL hierarchies can be
+created and accessed.
+
+
+
+## Creating SQL Hierarchies
+
+### ABAP CDS Hierarchies
+With [CDS
+hierarchies](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_column_glosry.htm "Glossary Entry"),
+you outsource the hierarchy data source and the creation of the SQL
+hierarchy from your ABAP program to ABAP CDS. Here the hierarchy is a
+fully fledged CDS entity, it is reusable in different programs or in
+other CDS entities (views), and can be part of your data model including
+access control using CDS DCL. For a CDS hierarchy, the hierarchy source
+cannot be anything else but a CDS view that exposes a [hierarchy
+association](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_association_glosry.htm "Glossary Entry").
+Here is a very simple example for that:
+
+```
+@AccessControl.authorizationCheck: #NOT_REQUIRED
+define view entity DEMO_CDS_SIMPLE_TREE_VIEW
+Β Β as select from demo_simple_tree
+Β Β association [1..1] to DEMO_CDS_SIMPLE_TREE_VIEW as _treeΒ Β
+Β Β Β Β on $projection.parent = _tree.id
+{
+Β Β Β Β Β Β _tree,
+Β Β key id,
+Β Β Β Β Β Β parent_id as parent,
+Β Β Β Β Β Β name
+}
+```
+
+This CDS view entity accesses the database table
+`DEMO_SIMPLE_TREE`, where the actual data is
+stored, and exposes a
+[self-association](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenself_association_glosry.htm "Glossary Entry")
+`_tree`. The `ON` condition of the association
+defines a parent-child relation between the elements `id` and
+`parent`. It simply means that a row of the result set where
+column `parent` has the same value as the column
+`id` of another row is a child of the latter row in the
+hierarchy that is constructed from that view. The CDS view exposes also
+another column `name` of the database table that represents
+the remaining data content. Note that you can define such CDS views for
+any available data source and that the `ON` condition can be
+more complex than shown in the simple example here.
+
+Now we can use the above CDS view as the hierarchy source of a CDS
+hierarchy that can be defined as follows:
+
+```
+define hierarchy DEMO_CDS_SIMPLE_TREE
+Β Β with parameters
+Β Β Β Β p_id : abap.int4
+Β Β as parent child hierarchy(
+Β Β Β Β source
+Β Β Β Β Β Β DEMO_CDS_SIMPLE_TREE_SOURCE
+Β Β Β Β Β Β child to parent association _tree
+Β Β Β Β Β Β start where
+Β Β Β Β Β Β Β Β id = :p_id
+Β Β Β Β Β Β siblings order by
+Β Β Β Β Β Β Β Β id ascending
+Β Β Β Β )
+Β Β Β Β {
+Β Β Β Β Β Β id,
+Β Β Β Β Β Β parent,
+Β Β Β Β Β Β name
+Β Β Β Β }
+```
+
+The CDS DDL statement [`DEFINE
+HIERARCHY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_f1_define_hierarchy.htm)
+that can be used in the DDL source code editor of ADT defines a CDS
+hierarchy as a CDS entity that can be accessed in CDS views or ABAP SQL
+as a SQL hierarchy. The most important additions of the statement are:
+
+- `SOURCE` for specifying the hierarchy source, here our
+ `DEMO_CDS_SIMPLE_TREE_VIEW`.
+- `CHILD TO PARENT ASSOCIATION` for specifying the
+ hierarchy association, here `_tree`.
+- `START WHERE` for defining the root nodes of the SQL
+ hierarchy, here represented by an input parameter `p_id`
+ that must be passed when accessing the CDS hierarchy.
+- `SIBLINGS ORDER BY` to define also a sort order for
+ sibling nodes besides the sort order that comes from the
+ parent-child relationship anyhow.
+- An element list `{ ... }` that defines the columns of
+ the SQL hierarchy, here simply all elements of the hierarchy source.
+
+For a full description and all other additions see [`DEFINE
+HIERARCHY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_f1_define_hierarchy.htm).
+
+When you access the CDS hierarchy, all lines are selected from the
+original data source, in our case the database table
+`DEMO_SIMPLE_TREE`, that fulfill the `START WHERE` condition. Those make up the root node set of the SQL
+hierarchy. In the simplest case we have exactly one root node, but more
+are possible. Then, for each root node, its descendants are retrieved.
+That means each line from the database table that fulfills the
+`ON`-condition of the hierarchy association is added to the
+SQL hierarchy. And for each descendant this is done again and again
+until all descendants are found. And that is basically all! Further
+additions to `DEFINE HIERARCHY` allow you to control the
+creation of the SQL hierarchy, for example, whether multiple parents are
+allowed or how orphans or cycles should be handled.
+
+Besides the elements of the hierarchy, the element list can also contain
+the hierarchy attributes listed under [Hierarchy
+Attributes](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_hierarchy_attributes.htm).
+Then the SQL hierarchy is enriched with columns containing information
+about the role, the current line plays as a hierarchy node, as, for
+example, the hierarchy rank or the hierarchy level. In our example, we
+did not add such elements, because ABAP SQL does that implicitly for you
+when accessing the CDS hierarchy!
+
+The SQL hierarchy can be used in an ABAP SQL query by using the CDS
+hierarchy directly as a data source of the `FROM` clause:
+
+``` abap
+DATA root_id type demo_cds_simple_tree_view-id.
+
+...
+
+SELECT FROM demo_cds_simple_tree( p_id = @root_id )
+ FIELDS id,
+Β Β Β Β Β Β Β Β Β parent,
+Β Β Β Β Β Β Β Β Β name,
+Β Β Β Β Β Β Β Β Β hierarchy_rank,
+Β Β Β Β Β Β Β Β Β hierarchy_tree_size,
+Β Β Β Β Β Β Β Β Β hierarchy_parent_rank,
+Β Β Β Β Β Β Β Β Β hierarchy_level,
+Β Β Β Β Β Β Β Β Β hierarchy_is_cycle,
+Β Β Β Β Β Β Β Β Β hierarchy_is_orphan,
+Β Β Β Β Β Β Β Β Β node_id,
+Β Β Β Β Β Β Β Β Β parent_id
+ INTO TABLE @FINAL(cds_result).
+```
+
+And although we did not define any hierarchy attributes in the element
+list of the CDS hierarchy, we can add all the hierarchy columns listed
+under [Hierarchy
+Columns](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddddl_hierarchy.htm)
+to the `SELECT` list of our ABAP SQL statement! This is always
+possible when a SQL hierarchy is accessed in ABAP SQL. We can pass any
+ID to the CDS hierarchy now and see what happens. If such a line is
+found in the database table, the respective hierarchical data will be
+retrieved and delivered. Execute class
+`CL_DEMO_SQL_HIERARCHIES` for filling the
+database table with randomly generated data and inspect the tabular
+result. As expected, all elements of the `SELECT` list appear as
+columns. Note that the content of column `NAME` could be
+anything. It is filled here with a string representation of the path
+from the root node to the current node for demonstration purposes only.
+
+From the ABAP language point of view, CDS hierarchies are the most
+convenient way of using SQL hierarchies. Now let us turn to other ways,
+involving more ABAP, until we do not use any CDS more in the end.
+
+
+
+## Hierarchy Navigators
+
+[Hierarchy
+navigators](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_navigator_glosry.htm "Glossary Entry")
+are an additional set of [hierarchy
+functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_function_glosry.htm "Glossary Entry")
+in ABAP SQL that allow you to work on existing SQL hierarchies instead
+of creating them. Hierarchy navigators can work on SQL hierarchies
+created as shown above, namely on CDS hierarchies, the hierarchy
+generator or a CTE hierarchy. They can be used as data sources in ABAP
+SQL queries. If you need a SQL hierarchy multiple times, from a
+performance point of view it is best to create it once with a given set
+of root nodes and then access it with hierarchy navigators. Furthermore,
+each hierarchy navigator can add further hierarchy columns to the result
+set that offer additional options for the evaluation.
+
+In the following examples, we access our CDS hierarchy with hierarchy
+navigators. But you could also replace it with the hierarchy generator
+or a CTE hierarchy. Check the examples of the
+[documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_navigators.htm),
+where this is also shown.
+
+
+
+### Hierarchy Node Navigator HIERARCHY_DESCENDANTS
+
+As the name says,
+[`HIERARCHY_DESCENDANTS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_node_navis.htm)
+fetches all descendants for any nodes from a SQL hierarchy. It adds
+`HIERARCHY_DISTANCE` as an additional hierarchy column to
+the result set. Let us look at an example. All examples are code
+snippets from `CL_DEMO_SQL_HIERARCHIES` again.
+
+``` abap
+DATA root_id TYPE demo_cds_simple_tree_view-id.
+
+DATA sub_id TYPE demo_cds_simple_tree_view-id.
+
+...
+
+SELECT FROM HIERARCHY_DESCENDANTS(
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @root_id )
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β START WHERE id = @sub_idΒ Β )
+ FIELDS id,
+Β Β Β Β Β Β Β Β parent_id,
+Β Β Β Β Β Β Β Β name,
+Β Β Β Β Β Β Β Β hierarchy_distance
+ INTO TABLE @FINAL(descendants).
+```
+
+Our CDS hierarchy `DEMO_CDS_SIMPLE_TREE_VIEW` is used to
+create a SQL hierarchy with a start node passed to parameter
+`p_id` and for a node `sub_id` all descendants
+are fetched. Running the program shows the result including the
+additional column `HIERARCHY_DISTANCE` that contains the
+distance to the respective start node. A further parameter
+`DISTANCE` - not shown here - allows you to restrict the
+distance to the respective start node.
+
+
+
+### Hierarchy Node Navigator HIERARCHY_ANCESTORS
+
+Now the other way around: ABAP SQL function
+[`HIERARCHY_ANCESTORS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_node_navis.htm)
+returns the ancestors of any given node of an existing hierarchy:
+
+``` abap
+DATA root_id TYPE demo_cds_simple_tree_view-id.
+
+DATA max_id TYPE demo_cds_simple_tree_view-id.
+
+...
+
+SELECT FROM HIERARCHY_ANCESTORS(
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @root_id )
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β START WHERE id = @max_id )
+ FIELDS id,
+Β Β Β Β Β Β Β Β Β Β parent_id,
+Β Β Β Β Β Β Β Β Β Β name,
+Β Β Β Β Β Β Β Β Β Β hierarchy_distance
+ INTO TABLE @FINAL(ancestors).
+```
+
+Looking at the result when running
+`CL_DEMO_SQL_HIERARCHIES`, you see that the
+value of column `HIERARCHY_DISTANCE` is negative now. Using
+aggregate functions or evaluating the internal result table, you can now
+easily extract further information like the number of ancestors and so
+on.
+
+
+
+### Hierarchy Node Navigator HIERARCHY_SIBLINGS
+
+Besides descendants and ancestors, hierarchy nodes also can have
+siblings, that is nodes that have the same parent node. You can find
+these by looking for all nodes with the same value in hierarchy column
+`HIERARCHY_PARENT_RANK`. But there is also
+[`HIERARCHY_SIBLINGS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_node_navis.htm)
+as a hierarchy function for that:
+
+``` abap
+DATA root_id TYPE demo_cds_simple_tree_view-id.
+
+DATA sibl_id TYPE demo_cds_simple_tree_view-id.
+
+...
+
+SELECT FROM HIERARCHY_SIBLINGS(
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @root_id )
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β START WHERE id = @sibl_id )
+ FIELDS id,
+Β Β Β Β Β Β Β Β Β Β parent_id,
+Β Β Β Β Β Β Β Β Β Β name,
+Β Β Β Β Β Β Β Β Β Β hierarchy_sibling_distance
+ INTO TABLE @FINAL(siblings).
+```
+
+You see that this function adds another hierarchy column
+`HIERARCHY_SIBLING_DISTANCE` that contains the distance to
+the respective start node. Running
+`CL_DEMO_SQL_HIERARCHIES`, where we start with
+a node that definitely has some siblings, shows the result.
+
+
+
+### Hierarchy Aggregate Navigators
+
+Finally let us turn to the [hierarchy aggregate
+navigators](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhierarchy_agg_navi_glosry.htm "Glossary Entry")
+that allow you to apply some aggregate functions to descendants and
+ancestors of any node of a SQL hierarchy:
+
+- [`HIERARCHY_DESCENDANTS_AGGREGATE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_desc_agg.htm)
+- [`HIERARCHY_ANCESTORS_AGGREGATE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_ancs_agg.htm)
+
+We will show an example for the descendants case and refer to the
+[documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_ancs_agg.htm)
+for the ancestors.
+
+Applying aggregate functions to columns normally means that you have
+some data there for which this makes sense. In our simplistic SQL
+hierarchy tree we do not have such meaningful data. On the other hand,
+this can also be a use case: You can have the administrative data for
+the parent-child relation in one database table and the real data in
+another one. And for that use case, the hierarchy aggregate navigator
+`HIERARCHY_DESCENDANTS_AGGREGATE` gives you the option of
+joining such data to your SQL hierarchy:
+
+``` abap
+TYPES:
+Β Β BEGIN OF value,
+Β Β Β Β idΒ Β Β Β TYPE i,
+Β Β Β Β amount TYPE p LENGTH 16 DECIMALS 2,
+Β Β END OF value.
+
+DATA value_tab TYPE SORTED TABLE OF value WITH UNIQUE KEY id.
+
+DATA root_id TYPE demo_cds_simple_tree_view-id.
+
+DATA sub_id TYPE demo_cds_simple_tree_view-id.
+
+...
+
+SELECT FROM HIERARCHY_DESCENDANTS_AGGREGATE(
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β SOURCE demo_cds_simple_tree( p_id = @sub_idΒ Β ) AS h
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β JOIN @value_tab AS v
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ONΒ Β v~id = h~id
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β MEASURES SUM( v~amount ) AS amount_sum
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β WHERE hierarchy_rank > 1
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β WITH SUBTOTAL
+Β Β Β Β Β Β Β Β Β Β Β Β Β Β WITH BALANCE )
+ FIELDS id,
+Β Β Β Β Β Β Β Β amount_sum,
+Β Β Β Β Β Β Β Β hierarchy_rank,
+Β Β Β Β Β Β Β Β hierarchy_aggregate_type
+ INTO TABLE @FINAL(descendants_aggregate).
+```
+
+In our example, we join an internal table `value_tab` of the
+same program to the SQL hierarchy. In a real life example you would join
+another database table, of course. On the other hand the example shows
+ABAP SQL's capability of using internal tables as data sources. You
+even can go so far to evaluate hierarchical data in internal tables with
+ABAP SQL by using an internal table as data source for a CTE hierarchy!
+
+The example does the following:
+
+- We use the hierarchy aggregate navigator
+ `HIERARCHY_DESCENDANTS_AGGREGATE` as a data source of a
+ `FROM` clause.
+- Our CDS hierarchy `DEMO_CDS_SIMPLE_TREE_VIEW` joined
+ with internal table `value_tab` is used as the data source.
+- The ABAP SQL function returns a tabular result of nodes of the data
+ source.
+- The aggregate function `SUM` behind `MEASURES` sums
+ up the values of the column amounts of the joined internal table for
+ all descendants of each node returned by the ABAP SQL function.
+- The `WHERE` condition restricts the result set by a freely
+ programmable condition.
+- The `WITH` additions add further rows to the result set that
+ can be recognized by values in an additional hierarchy column
+ `HIERARCHY_AGGREGATE_TYPE`:
+
+ - `WITH SUBTOTAL`
+
+ In the row where `HIERARCHY_AGGREGATE_TYPE` has
+ value 1, column `AMOUNT_SUM` contains the sum of the
+ values of all hierarchy nodes that meet the `WHERE`
+ condition.
+
+ - `WITH BALANCE`
+
+ In the row where `HIERARCHY_AGGREGATE_TYPE` has
+ value 2, column `AMOUNT_SUM` contains the sum of the
+ values of all hierarchy nodes that do not meet the
+ `WHERE` condition.
+
+ For more `WITH` additions see the
+ [documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_desc_agg.htm).
+
+Running `CL_DEMO_SQL_HIERARCHIES` shows the
+result. It also shows the result of the joined data source, where you
+can check that the calculated values are correct.
+
+
+
+
+## More Information
+For the complete reference documentation about SQL hierarchies, see [`SELECT, FROM hierarchy_data`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenselect_hierarchy_data.htm).
diff --git a/11_Internal_Tables_Grouping.md b/11_Internal_Tables_Grouping.md
index a26ee8f..fa5950f 100644
--- a/11_Internal_Tables_Grouping.md
+++ b/11_Internal_Tables_Grouping.md
@@ -176,6 +176,6 @@ SIZE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file
[zcl_demo_abap_sql_group_by](./src/zcl_demo_abap_sql_group_by.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
\ No newline at end of file
diff --git a/12_AMDP.md b/12_AMDP.md
index 1d325fe..c593834 100644
--- a/12_AMDP.md
+++ b/12_AMDP.md
@@ -71,7 +71,7 @@ in the ABAP Keyword Documentation.
executed only on the (SAP HANA) database and not in AS ABAP, i. e.
method calls are sent to the database procedure or function.
-> **π‘ Note**
+> [!NOTE]
>- The use of AMDP is not recommended if the same task can be
achieved using [ABAP
SQL](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_sql_glosry.htm "Glossary Entry").
@@ -367,7 +367,7 @@ Among the differences are:
- The return value and the input parameters must have an elementary type.
- The AMDP scalar function can be called like a regular method in ABAP.
-> **π‘ Note**
+> [!NOTE]
> The executable example in the *AMDP Scalar Functions for CDS Scalar Functions* section includes *AMDP scalar functions for AMDP methods*.
@@ -383,7 +383,7 @@ Among the differences are:
- CDS view entities; different positions such as in the element list, in an `ON` or `WHERE` condition and others, are possible
- ABAP SQL (possible for [SQL-based scalar functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_sql_scalar_glosry.htm))
-> **π‘ Note**
+> [!NOTE]
> - CDS scalar functions are available as [analytical scalar functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_ana_scalar_glosry.htm) and [SQL-based scalar functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_sql_scalar_glosry.htm), i.e. they are either evalauted by an SQL environment or an analytical runtime environment.
> - The example below focuses on SQL-based scalar functions. Analytical scalar functions are predelivered [system functions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_system_func_glosry.htm) and cannot be user-defined. Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENCDS_ANA_SCALAR_FUNCTION.html).
@@ -449,7 +449,7 @@ define scalar function zdemo_abap_scalar_func
The following example includes the creation of the three required artifacts (CDS scalar function, CDS scalar function implementation reference, AMDP class including an *AMDP scalar function for CDS scalar function*, as well as an *AMDP scalar function for AMDP method*). The AMDP class implements the `if_oo_adt_classrun` interface, making the class executable. The simplified example illustrates AMDP scalar functions at a high level. After activating all artifacts, choose *F9* in ADT to run the class. The example is set up to display output in the console.
-> **π‘ Note**
+> [!NOTE]
> As a prerequisite for exploring the example, you have imported the ABAP cheat sheet repository as the example uses some of its artifacts.
@@ -489,7 +489,7 @@ define scalar function zdemo_abap_scalar_func
- Insert the code below into the class.
- After activation, choose *F9* in ADT to run the class. The example is set up to display output in the console.
-> **π‘ Note**
+> [!NOTE]
> - The demo class includes multiple AMDP methods demonstrating several aspects regarding AMDP scalar functions:
> - `get_max_fltime` demonstrates an *AMDP scalar function for AMDP method*. It returns the longest flight time among all flights of a certain carrier.
> - `select_entries_w_max_fltime` demonstrates an AMDP procedure that includes calling the `get_max_fltime` AMDP scalar function. The effect is the same as shown with an ABAP SQL `SELECT` statement using `get_max_fltime`.
@@ -766,7 +766,7 @@ define view entity zdemo_abap_cds_ve_w_scalar
### Notes on Client Handling and Client Safety
-> **π° In brief**
+> [!IMPORTANT]
> - ABAP SQL features implicit client handling.
> - You cannot disable this feature in ABAP for Cloud Development, as you can in [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm). You can only access your own client in ABAP for Cloud Development.
> - Native SQL, unlike ABAP SQL, does not feature implicit client handling. AMDP, which uses Native SQL, can be used in ABAP for Cloud Development. It is essential to ensure AMDP accesses only client-safe repository objects, meaning it retrieves data solely from client-dependent sources providing data of one client, i.e. the current client. Cross-client access must be avoided. Client-independent data sources are implicitly client-safe.
@@ -832,7 +832,7 @@ To ensure client safety, the following prerequisites must be met.
- Must not call built-in HANA functions that include a client ID parameter.
- The client parameter from AMDP method signatures should be removed. If removal is not possible, for example, due to compatibility reasons, ensure the client is excluded from the SQLScript code to prevent interference from external callers.
-> **π‘ Note**
+> [!NOTE]
> - Using pre-delivered repository objects in ABAP for Cloud Development:
> - Use only pre-delivered AMDP methods with a [C4 contract](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENC4_CONTRACT_GLOSRY.html).
> - Create and use your own wrapper CDS view entities for pre-delivered CDS view entities with a [C1 contract](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENC1_CONTRACT_GLOSRY.html).
@@ -846,7 +846,7 @@ To ensure client safety, the following prerequisites must be met.
- AMDP in ABAP for Cloud Development: [ABAP Keyword Documentation (ABAP for Cloud Development)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenamdp.htm)
- AMDP in Standard ABAP: [ABAP Keyword Documentation (Standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenamdp.htm)
- > **βοΈ Hint**
+ > [!TIP]
> Checking if AMDP is supported in classic ABAP:
> ```abap
> IF NOT cl_abap_dbfeatures=>use_features(
@@ -864,7 +864,7 @@ To ensure client safety, the following prerequisites must be met.
[zcl_demo_abap_amdp](./src/zcl_demo_abap_amdp.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example covers the following topics:
> - AMDP procedures, calling AMDP procedures from SQLScript
> - AMDP table functions for AMDP methods
diff --git a/13_Program_Flow_Logic.md b/13_Program_Flow_Logic.md
index 76c1131..41bf95f 100644
--- a/13_Program_Flow_Logic.md
+++ b/13_Program_Flow_Logic.md
@@ -229,7 +229,7 @@ ELSE.
ENDIF.
```
-> **π‘ Note**
+> [!NOTE]
> Logical expressions and functions can also be used in other ABAP statements.
@@ -297,7 +297,7 @@ ELSE.
ENDIF.
```
-> **π‘ Note**
+> [!NOTE]
> - Control structures can be nested. It is recommended that you do not include more than 5 nested control structures since the code will
> get really hard to understand. Better go for outsourcing functionality into methods to reduce nested control structures.
> - Keep the number of consecutive control structures low.
@@ -504,7 +504,7 @@ ENDDO.
```
-> **π‘ Note**
+> [!NOTE]
> - [`RETURN`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapreturn.htm) statements immediately terminate the current processing block. However, according to the [guidelines (F1 docu for standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenexit_procedure_guidl.htm), `RETURN` should only be used to exit procedures like methods.
> - `EXIT` and `CHECK` might also be used for exiting procedures. However, their use inside loops is recommended.
@@ -580,7 +580,7 @@ Note that methods and calling methods are described in the context of the [ABAP
### Function Modules
-> **π‘ Note**
+> [!NOTE]
> In [ABAP for Cloud Development](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_for_cloud_dev_glosry.htm), function modules can technically be used, but they are not recommended for new implementations. Many features available in standard ABAP, such as various includes, are not compatible with ABAP for Cloud Development (for example, [dynpro](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abendynpro_glosry.htm)-related functionality).
Function modules ...
@@ -952,7 +952,7 @@ Exceptions and runtime errors affect the program flow. Find an overview in the [
[zcl_demo_abap_prog_flow_logic](./src/zcl_demo_abap_prog_flow_logic.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example ...
> - covers the following topics, among others:
> - Control structures with `IF`, `CASE`, and `TRY`
diff --git a/14_ABAP_Unit_Tests.md b/14_ABAP_Unit_Tests.md
index 2ecef4c..a204ffd 100644
--- a/14_ABAP_Unit_Tests.md
+++ b/14_ABAP_Unit_Tests.md
@@ -22,7 +22,7 @@
This cheat sheet contains basic information about [unit testing](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenunit_test_glosry.htm) in ABAP.
-> **π‘ Note**
+> [!NOTE]
> - This cheat sheet focuses on testing methods.
> - See the [More Information](#more-information) section for links to more in-depth information.
> - The executable examples are **not** suitable role models for ABAP unit tests. They are intended to give you a rough idea. You should always work out your own solution for each individual case.
@@ -49,7 +49,7 @@ This cheat sheet contains basic information about [unit testing](https://help.sa
- Create test classes and methods
- Run unit tests
-> **π‘ Note**
+> [!NOTE]
> In some examples, the code does not have any dependent-on components. Therefore, the considerations about dependency isolation, test doubles, and their injection into the code are skipped.
@@ -85,7 +85,7 @@ CLASS ltc_test_class IMPLEMENTATION.
ENDCLASS.
```
-> **π‘ Note**
+> [!NOTE]
> - `FOR TESTING` can be used for multiple purposes:
> - Creating a test class containing test methods
> - Creating a test double
@@ -423,7 +423,7 @@ CLASS ltc_test_class IMPLEMENTATION.
ENDCLASS.
```
-> **π‘ Note**
+> [!NOTE]
> You can also specify helper methods, for example, for recurring tasks such as the assertions.
@@ -447,7 +447,7 @@ There are multiple ways to implement test doubles manually:
- You can create your own local interface, adapt your production code accordingly, and implement interface methods.
- If the DOC is a method in a class that allows inheritance (i.e. it is not defined as `FINAL`), you can inherit from the class and redefine methods for which you need a test double.
-> **π‘ Note**
+> [!NOTE]
> See information and an example about frameworks such as the [ABAP OO Test Double Framework](https://help.sap.com/docs/ABAP_PLATFORM_NEW/c238d694b825421f940829321ffa326a/804c251e9c19426cadd1395978d3f17b.html?locale=en-US) below that support you with creating the test doubles.
### Injecting Test Doubles
@@ -600,7 +600,7 @@ For more information about evaluating ABAP unit test results, see [here](https:/
- The example class is supported by two additional classes: [zcl_demo_abap_unit_dataprov](./src/zcl_demo_abap_unit_dataprov.clas.abap) (includes dependent-on-components that are replaced by test doubles when running ABAP Unit tests) and [ztcl_demo_abap_unit_tdf_testcl](./src/ztcl_demo_abap_unit_tdf_testcl.clas.abap) (includes the test class for testing class `zcl_demo_abap_unit_tdf`; the local test class includes the `"! @testing ...` syntax).
-> **π‘ Note**
+> [!NOTE]
> - The executable examples contain comments in the code for more information.
> - The examples are designed to display output in the console when they are run using `F9`. However, the focus is on ABAP Unit tests. Choose `Ctrl/Cmd + Shift + F10` to run the unit tests.
> - The example classes are intentionally simplified and nonsemantic, designed to highlight basic unit tests and explore framework classes and methods.
diff --git a/15_CDS_View_Entities.md b/15_CDS_View_Entities.md
index 9b2de7c..cb654c7 100644
--- a/15_CDS_View_Entities.md
+++ b/15_CDS_View_Entities.md
@@ -7,7 +7,7 @@
Core data services (CDS) are an infrastructure for defining and consuming semantically rich data models on the [standard database](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_db_glosry.htm) of an [AS ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenas_abap_glosry.htm).
-> **π‘ Note**
+> [!NOTE]
> - The executable example focuses on CDS view entities and covers a selection of features.
> - The sample CDS view entities are designed to demonstrate a selection of features with a limited number of artifacts. They are not intended to be role models for proper CDS view design. They focus on syntax options only. They are not intended to solve concrete programming tasks. You should always work out your own solution for each individual case. For more detailed information, refer to the links in the [More Information](#more-information) section.
> - The [ABAP Dictionary](26_ABAP_Dictionary.md) cheat sheet highlights that several [CDS entities](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_entity_glosry.htm) - apart from CDS view entities - represent structured types that are usable in ABAP.
@@ -58,7 +58,7 @@ The following links take you to the source code of the cheat sheet artifacts to
[zcl_demo_abap_cds_ve](./src/zcl_demo_abap_cds_ve.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example covers the following topics:
> - Operands, expressions, built-in functions, and input parameters in CDS view entities
> - Selecting data from CDS view entities using ABAP SQL `SELECT` statements
diff --git a/16_Data_Types_and_Objects.md b/16_Data_Types_and_Objects.md
index bc98140..87d4fbe 100644
--- a/16_Data_Types_and_Objects.md
+++ b/16_Data_Types_and_Objects.md
@@ -55,7 +55,7 @@ Data objects:
- Are usually used in [ABAP statements](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_statement_glosry.htm) by specifying them in the [operand position](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenoperand_position_glosry.htm).
-> **π‘ Note**
+> [!NOTE]
> There are several differentations that further distinguish and characterize data types and objects. See [here](#terms-related-to-data-types-and-objects-in-a-nutshell).
@@ -86,7 +86,7 @@ For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu
- Character-like type for [text strings](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentext_string_glosry.htm) (`string`)
- Byte-like type for [byte strings](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbyte_string_glosry.htm) (`xstring`)
-> **π‘ Note**
+> [!NOTE]
> - The data types `c`, `n`, `x`, and `p` are incomplete, i.e., [generic data types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abengeneric_data_type_glosry.htm), with respect to their length. The type definition syntax has a special addition for this (`LENGTH`). In addition, `p` is also generic with respect to the number of decimal places (`DECIMALS` addition). See more about generic types in the following sections.
> - The other types can be considered as [complete data types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencomplete_data_type_glosry.htm). They don't need any additional syntax elements for the definition.
> - The numeric data types `b` and `s` cannot be specified directly in ABAP programs for short integers. Alternative [built-in DDIC types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuiltin_ddic_type_glosry.htm) are available.
@@ -107,7 +107,7 @@ For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu
- [BDEF derived types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrap_derived_type_glosry.htm): RAP-specific structured and table types. The typical syntax elements are `... TYPE STRUCTURE FOR ...` and `... TYPE TABLE FOR ...`. More information can be found [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrpm_derived_types.htm) and in the ABAP cheat sheet on ABAP EML.
- A data object of a complex type can be accessed as a whole or by component.
-> **π‘ Note**
+> [!NOTE]
> Structured and table types are used in this cheat sheet as examples for complex types. For more information, see the ABAP Keyword Documentation and the ABAP cheat sheets for structures and internal tables.
@@ -118,7 +118,7 @@ For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu
- A reference type must be defined either in the ABAP program or in the ABAP Dictionary. There are no built-in reference types in ABAP.
- The typical syntax element is `... REF TO ...`.
-> **π‘ Note**
+> [!NOTE]
> There are [generic ABAP types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abengeneric_abap_type_glosry.htm). Generic data types are types that do not define all of the properties of a data object. They can only be used for the typing of [formal parameters](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenformal_parameter_glosry.htm) and [field symbols](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfield_symbol_glosry.htm). See an example further down.
The only generic types that can be used after `TYPE REF TO` are `data` for the generic typing of data references, and `object`, for the generic typing of object references.
@@ -321,7 +321,7 @@ TYPES tr_like_table_ref LIKE TABLE OF REF TO itab_str.
- [Generic ABAP Types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuilt_in_types_generic.htm)
- [ABAP cheat sheet about dynamic programming](06_Dynamic_Programming.md) regarding field symbols and `ASSIGN` statements
-> **π‘ Note**
+> [!NOTE]
> The `TYPE REF TO` addition types as a reference variable. A generic type cannot be specified after `REF TO`. A typing with `TYPE REF TO data` and `TYPE REF TO object` is considered as completely typing.
@@ -626,7 +626,7 @@ DATA struc_like_line LIKE LINE OF itab_ddic_tab.
```
-> **π‘ Note**
+> [!NOTE]
> The above data objects are declared by assigning a dedicated name. These data objects can be addressed by that name. This is not true for [anonymous data objects](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenanonymous_data_object_glosry.htm), which can only be addressed through reference variables. This is covered [below](#assigning-references-to-data-reference-variables).
@@ -664,7 +664,7 @@ DATA dref_tab_str LIKE TABLE OF REF TO do_some_string.
An assignment passes the contents of a source to a target data object.
-> **π‘ Note**
+> [!NOTE]
> - There are conversion rules when assigning a source to a target data object that have different types. For more information, see the topic [Assignment and Conversion Rules](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_rules.htm) in the ABAP Keyword Documentation, especially for complex types, since elementary types are usually demonstrated in the cheat sheet.
> - There are many ways to assigning values to data objects in ABAP. They occur in the context of various ABAP statements. Here, assignments with the assignment operator `=` are mostly used.
> - In older ABAP code, you may see `MOVE ... TO ...` statements for value assignments. These statements are obsolete. They are not to be confused with `MOVE-CORRESPONDING` statements for complex types. These are not obsolete.
@@ -1489,7 +1489,7 @@ ASSERT len = 27.
An [inline declaration](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeninline_declaration_glosry.htm) is made using the declaration operator [`DATA`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_inline.htm). It can be specified in any designated [declaration position](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendeclaration_position_glosry.htm). The result of the declaration is used in the current operand position, is statically visible from the current position, and is valid in the current context.
-> **π‘ Note**
+> [!NOTE]
> - In an assignment, if the data object is declared inline on the left side, there are many options for what can be placed on the right side as shown in the previous section. The data type of the variable is determined by the operand type. It must be possible to derive this type completely statically.
> - For more information about the possible declaration positions, see [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendeclaration_positions.htm).
> - You can use the [`FINAL`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfinal_inline.htm) declaration operator to create [immutable variables](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenimmutable_variable_glosry.htm), as shown below.
@@ -2289,7 +2289,7 @@ The following cases must be distinguished with regard to the data type:
See the conversion rules for the different data types here: [Assignment and Conversion Rules](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_rules.htm)
-> **π‘ Note**
+> [!NOTE]
> - The [operands](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenoperand_glosry.htm) of many ABAP statements are assigned internally according to the assignment rules.
> - Typically, assignements are made using the assignment operator `=`. If necessary and applicable, the type is converted implicitly. However, you can also use the conversion operator [`CONV`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_conv.htm) to convert types explicitly.
> - For [lossless assignments](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenlossless_assignment_glosry.htm), the lossless operator [`EXACT`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_exact.htm) can be used to perform checks before the conversion is performed to ensure that only valid values are assigned and that no values are lost in assignments.
@@ -3301,7 +3301,7 @@ date = '202511'.
[zcl_demo_abap_dtype_dobj](./src/zcl_demo_abap_dtype_dobj.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example ...
> - covers, among others, the following topics:
> - Declaring data types
diff --git a/17_SAP_LUW.md b/17_SAP_LUW.md
index a77c88b..4c98b4e 100644
--- a/17_SAP_LUW.md
+++ b/17_SAP_LUW.md
@@ -15,7 +15,7 @@
## Introduction
-> **π‘ Note**
+> [!NOTE]
> The concept is relevant to both ABAP Cloud and classic ABAP, but some of the statements covered in the cheat sheet and the executable example are only relevant to [classic ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_abap_glosry.htm).
This cheat sheet provides a high-level overview of the [SAP LUW](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensap_luw_glosry.htm) concept that deals with data consistency with a focus on SAP LUW-related statements, supported by an executable example to check the syntax in action.
@@ -29,7 +29,7 @@ Consider the following example of transactional consistency:
- This transaction may include other related tasks. Data may be loaded into a buffer, processed there, and become inconsistent during this time. It may also take a while for the whole process to be completed.
- However, at the end of the transaction, all data must be in a consistent state so that the database can be updated accordingly. Or, if errors occur during the transaction, it must be ensured that all changes can be reversed. It must not happen that money is credited to account B without also updating the totals of account A. In such a case, the previous consistent state must be restored.
-> **π‘ Note**
+> [!NOTE]
> - This cheat sheet focuses on [classic ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_abap_glosry.htm). Hence, the links in this cheat sheet open topics in the ABAP Keyword Documentation for [Standard ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_abap_glosry.htm).
> - The SAP LUW concept is also relevant to ABAP Cloud. The [ABAP RESTful Application Programming Model (RAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenarap_glosry.htm) is the transactional programming model for [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm). It comes with a well-defined transactional model and follows the rules of the SAP LUW. Find out more in this [blog](https://blogs.sap.com/2022/12/05/the-sap-luw-in-abap-cloud/).
@@ -189,7 +189,7 @@ The following bundling techniques are available for classic ABAP. This means tha
"COMMIT WORK AND WAIT.
```
-> **π‘ Note**
+> [!NOTE]
> If a runtime error occurs during the update, the update work process executes a database rollback, and notifies the user whose program created the entries.
**Using [remote-enabled function modules](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenremote_enabled_fm_glosry.htm)**
@@ -233,7 +233,7 @@ The statements to end an SAP LUW have already been mentioned above: [`COMMIT WOR
- causes all changes within an SAP LUW to be undone, that is, all previous registrations for the current SAP LUW are removed.
- triggers a database rollback on all currently open database connections, which also terminates the current database LUW.
-> **π‘ Note**
+> [!NOTE]
> Notes on database connections:
> - The [database interface](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abendatabase_interface_glosry.htm) uses the [standard connection](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_db_connection_glosry.htm) of the current work process to access the [standard database](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_db_glosry.htm) by default.
> - Optionally, database accesses can also be made by using [secondary connections](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensecondary_db_connection_glosry.htm) to [secondary databases](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensecondary_db_glosry.htm) or by using [service connections](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenservice_connection_glosry.htm) to the standard database. The secondary connections are usually used by technical components. For example, they are used for caches, traces, logs, and so on.
@@ -272,7 +272,7 @@ The following concepts are related to the SAP LUW to ensure transactional consis
- [SAP Locks](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensap_lock.htm)
- Note the information on the `CL_ABAP_LOCK_OBJECT_FACTORY` class that is related to this context [here](https://help.sap.com/docs/sap-btp-abap-environment/abap-environment/lock-objects).
-> **π‘ Note**
+> [!NOTE]
> For more information about related topics in RAP, see the sections [Authorization Control](https://help.sap.com/docs/SAP_S4HANA_CLOUD/e5522a8a7b174979913c99268bc03f1a/375a8124b22948688ac1c55297868d06.html) and [Concurrency Control](https://help.sap.com/docs/SAP_S4HANA_CLOUD/e5522a8a7b174979913c99268bc03f1a/d315c13677d94a6891beb3418e3e02ed.html) in the *Development guide for the ABAP RESTful Application Programming Model*.
@@ -377,7 +377,7 @@ After the import of the repository, proceed as follows:
- Enter `zdemo_abap_sap_luw` and open the program.
- Run the program by choosing `F8`.
-> **π‘ Note**
+> [!NOTE]
> - The examples in the *main* branch of the ABAP cheat sheet repository are designed to be imported into the SAP BTP ABAP Environment. For Standard ABAP, you can find examples (such as `zdemo_abap_sap_luw`) in the other branches of the repository.
> - The executable example ...
> - demonstrates the SAP LUW using classic dynpros to provide a self-contained and simple example that highlights the considerations regarding implicit database commits, without putting the spotlight on dynpros. Note that classic dynpros are outdated for application programs. New developments should use web-based UIs, such as SAP Fiori UIs.
diff --git a/18_Dynpro.md b/18_Dynpro.md
index 0527fd0..e0953f1 100644
--- a/18_Dynpro.md
+++ b/18_Dynpro.md
@@ -28,7 +28,7 @@
## Introduction
-> **π‘ Note**
+> [!NOTE]
> The content of this cheat sheet and the executable example are only relevant to [classic ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_abap_glosry.htm).
[User interfaces (UI)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenuser_interface_glosry.htm) are not limited to displaying some information, they must also allow the user to interact with the program.
@@ -38,7 +38,7 @@ This is where [dynpros](https://help.sap.com/doc/abapdocu_latest_index_htm/lates
This cheat sheet provides a high-level overview of classic dynpro topics with a focus on dynpro-related statements, supported by an executable example to check the syntax in action.
-> **π‘ Note**
+> [!NOTE]
> - Classic dynpros are outdated for application programs. New developments should use web-based UIs, such as SAPUI5.
> - Dynpros cannot be created in ABAP Cloud.
> - This cheat sheet ...
@@ -67,7 +67,7 @@ This cheat sheet provides a high-level overview of classic dynpro topics with a
- Have their own data objects, called [dynpro fields](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abendynpro_field_glosry.htm) (see more below)
- Are called either by another dynpro (as the next dynpro), by a [transaction code](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abentransaction_code_glosry.htm) ([dialog transaction](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abendialog_transaction_glosry.htm)), or by ABAP statements (e.g. `CALL SCREEN`). Several dynpros in a single ABAP program can be called in sequence to form a dynpro sequence.
-> **π‘ Note**
+> [!NOTE]
> There are special dynpros ([selection screens](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenselection_screen_glosry.htm), [classic lists](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_list_glosry.htm)). They are created implicitly. See the [Selection Screens and Classic Lists](20_Selection_Screens_Lists.md) cheat sheet.
@@ -91,7 +91,7 @@ This cheat sheet provides a high-level overview of classic dynpro topics with a
- The dialog modules called at PAI evaluate the user entries and process them.
- When the processing is complete, the processing of the current dynpro ends and the next dynpro is called.
- > **π‘ Note**
+ > [!NOTE]
> - The PAI processing of the current dynpro and the PBO processing of the next dynpro take place one after the other in the same [work process](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenwork_process_glosry.htm) on the application server and together form a dialog step.
> - As soon as the screen is ready for input again, only the presentation server is active until the next user action. During this time, the ABAP program waiting for user input does not occupy a work process on the application server.
@@ -468,7 +468,7 @@ SET SCREEN 0.
- `LEAVE SCREEN.` exits the current dynpro and enters the next dynpro. This is either statically defined in the properties of the current dynpro or was previously set with the `SET SCREEN` statement.
- `LEAVE TO SCREEN` does the same, but first sets the next dynpro to the specified dynpro number. This statement is a short form of the statements `SET SCREEN dynnr. LEAVE SCREEN.`.
-> **π‘ Note**
+> [!NOTE]
> - The statements do not exit the entire dynpro sequence and instead branch to another dynpro in the same sequence. Only if the number 0 is used to branch to the next dynpro does a `LEAVE` statement terminate the dynpro sequence.
> - A dialog transaction can be started from an ABAP program using the [`CALL TRANSACTION`](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapcall_transaction.htm) or [`LEAVE TO TRANSACTION`](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapleave_to_transaction.htm) statements, or directly by the user by entering the transaction code in the input field of the [standard toolbar](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_toolbar_glosry.htm). When a dialog transaction is started, the associated ABAP program is loaded and the PBO processing of the initial dynpro is called.
> - [`LEAVE PROGRAM`](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapleave_program.htm) statements terminate the program.
@@ -590,7 +590,7 @@ ENDMODULE.
SET TITLEBAR title WITH text1 ... text9.
```
-> **π‘ Note**
+> [!NOTE]
> By separating the GUI status and title from the dynpro itself, the screen layout can remain constant when switching dynpros, and only the title and available functions can be changed.
@@ -637,7 +637,7 @@ ENDLOOP.
...
```
-> **π‘ Note**
+> [!NOTE]
> - In a modern program, it is more comfortable to use an ALV Grid control.
> - More additions are available for the statement.
@@ -727,7 +727,7 @@ After the import of the repository, proceed as follows:
- Enter `zdemo_abap_dynpro` and open the program.
- Run the program by choosing `F8`.
-> **π‘ Note**
+> [!NOTE]
> - The examples in the *main* branch of the ABAP cheat sheet repository are designed to be imported into the SAP BTP ABAP Environment. For Standard ABAP, you can find examples (such as `zdemo_abap_dynpro`) in the other branches of the repository.
> - The executable example ...
> - covers the following topics:
diff --git a/19_ABAP_for_Cloud_Development.md b/19_ABAP_for_Cloud_Development.md
index c14ccfe..503a878 100644
--- a/19_ABAP_for_Cloud_Development.md
+++ b/19_ABAP_for_Cloud_Development.md
@@ -38,7 +38,7 @@ It provides references to more detailed information on the topic.
- Supported in [SAP S/4HANA](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensap_s4hana_glosry.htm)
-> **π‘ Note**
+> [!NOTE]
> - See more information in the topic [ABAP Language Versions, Release Contracts and Released APIs](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_versions_and_apis.htm).
> - See the topic [Language Elements in ABAP Versions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrestricted_abap_elements.htm) that provides a table showing which ABAP language elements are allowed in which ABAP language version
@@ -251,7 +251,7 @@ It provides references to more detailed information on the topic.
## Executable Example
[zcl_demo_abap_cloud_excursion](./src/zcl_demo_abap_cloud_excursion.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example ...
> - does not focus - unlike other ABAP cheat sheet examples - on ABAP syntax as such (the other non-Standard-ABAP cheat sheet examples focus on ABAP syntax available in ABAP for Cloud Development), but rather emphasizes released APIs and libraries that provide predefined functionality and can be used in ABAP for Cloud Development. In particular, the Extension Components Library (XCO) is used.
> - covers an arbitrary selection for you to explore. For more detailed information and code snippets, see the SAP Help Portal documentation [here](https://help.sap.com/docs/btp/sap-business-technology-platform/sap-business-technology-platform?version=Cloud) and [here about XCO](https://help.sap.com/docs/btp/sap-business-technology-platform/xco-library?version=Cloud). In most cases, the example covers a selection of classes and methods for retrieving information about repository objects. It is more of a "playground" for exploring the APIs with a few snippets of code, and should be seen as an invitation to more in-depth exploration.
diff --git a/20_Selection_Screens_Lists.md b/20_Selection_Screens_Lists.md
index feaefe9..93cdfc9 100644
--- a/20_Selection_Screens_Lists.md
+++ b/20_Selection_Screens_Lists.md
@@ -30,7 +30,7 @@
## Introduction
-> **π‘ Note**
+> [!NOTE]
> The content of this cheat sheet and the executable examples are only relevant to [classic ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_abap_glosry.htm).
[Selection screens](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenselection_screen_glosry.htm) and [classic lists](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclassic_list_glosry.htm) are among the classic ABAP user interfaces. They are integrated into the ABAP language itself, which means that special ABAP statements are available to create and handle them.
@@ -39,7 +39,7 @@ This cheat sheet provides a high-level overview of selection screens and classic
For more detailed information and syntax options, see the topics [Selection Screens](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenselection_screen.htm) and [Classic Lists](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenabap_dynpro_list.htm) in the ABAP Keyword Documentation.
-> **π‘ Note**
+> [!NOTE]
> - Although they are considered outdated for application programs, you will still find classic ABAP UIs frequently in classic ABAP.
> - Classic ABAP UIs cannot be created in [ABAP Cloud](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenabap_cloud_glosry.htm).
> - This cheat sheet ...
@@ -86,7 +86,7 @@ For more detailed information and syntax options, see the topics [Selection Scre
- The list can be further implemented to respond to user interaction, such as clicking a line in the list.
- More modern alternatives for classic lists are available, such as the classes of the SAP List Viewer (ALV), for example `CL_SALV_TABLE`.
-> **π‘ Note**
+> [!NOTE]
> The program is grouped into so-called [event blocks](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenevent_block_glosry.htm), which can contain implementations for various events (e.g. a [selection screen event](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenselection_screen_event_glosry.htm) when a user selects a radio button, or a [list event](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenlist_event_glosry.htm) when a user double-clicks a line in the list). These event blocks are introduced by special ABAP statements. When a particular event is triggered, the corresponding event block is called and the appropriate code can be implemented there to react to the user action. See more information [here](#event-blocks).
@@ -108,7 +108,7 @@ Selection screens can be created by using special ABAP statements in the global
The following table includes code snippets with a selection of available syntax options:
-> **π‘ Note**
+> [!NOTE]
> - Various combinations of multiple additions are possible with `PARAMETERS` statement, and some are not. See the ABAP Keyword Documentation for details.
> - To try out the code examples, you can create a demo executable program, copy and paste the code snippets, and run the programs using F8. They are designed to output content using classic lists.
> - The code snippets anticipate topics outlined further down, for example, event blocks and `WRITE` statements.
@@ -428,7 +428,7 @@ Additions `OBLIGATORY`, `NO-DISPLAY`, `VISIBLE LENGTH`, `AS CHECKBOX`, `RADIOBUT
- `AS LISTBOX VISIBLE LENGTH`: Creates a dropdown list box. You can use the function module `VRM_SET_VALUES` by passing a suitable list at the
`AT SELECTION-SCREEN OUTPUT` or `AT SELECTION-SCREEN ON VALUE-REQUEST` events. You may want to specify the `OBLIGATORY` addition here, too, as the check is also applied to empty fields.
-> **π‘ Note**
+> [!NOTE]
> The `USER-COMMAND` addition can be specified together with `AS CHECKBOX`, `RADIOBUTTON GROUP` and `AS LISTBOX VISIBLE LENGTH` to assign a function code to the selection parameter.
@@ -763,7 +763,7 @@ START-OF-SELECTION.
The following table includes code snippets with a selection of available syntax options:
-> **π‘ Note**
+> [!NOTE]
> - Various combinations of multiple additions are possible with `SELECT-OPTIONS` statements.
> - To try out the code examples, you can create a demo executable program, copy and paste the code snippets, and run the programs using F8. They are designed to output content using classic lists.
> - The code snippets anticipate topics outlined further down, for example, event blocks and `WRITE` statements.
@@ -4392,7 +4392,7 @@ AT LINE-SELECTION.
-> **π‘ Note**
+> [!NOTE]
> - [Relevant sy components in the context of lists](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenlist_systemfields.htm)
> - You can interact with a list by double-clicking a line (or pressing F2; the default `PICK` function code raises the `AT LINE-SELECTION` event). Other function codes usually trigger the `AT USER-COMMAND` event. See the event blocks below. In your ABAP program, you can react to the user action by implementing the individual event blocks. Regarding the function code, you can use the `sy-ucomm` system field for evaluation (unlike dynpros, there's no `OK_CODE` field to be filled).
@@ -4407,7 +4407,7 @@ AT LINE-SELECTION.
- Should not be specified more than once in a program
- Called depending on the user action and the program state (even if not explicitly specified)
-> **π‘ Note**
+> [!NOTE]
> The main purpose of the examples is to visualize the calling of the events. Internal tables are filled during the events to log the event name and the time stamp when it is called. The tables are then output.
@@ -4853,7 +4853,7 @@ END-OF-PAGE.
- define the display type for the ALV output. By default, full-screen display is enabled.
- display the ALV output using the `display` method.
-> **π‘ Note**
+> [!NOTE]
> - When working with ALV, make sure that you implement appropriate error handling.
> - The `factory` method also has optional exporting parameters. You can use the optional `list_display` parameter to specify whether you want to display the ALV output as classic list. It is set to false by default. There are also exporting parameters to display the ALV output in containers (e.g. see the dynpro cheat sheet example). The exporting parameters are not relevant in this example. Here, the ALV output is displayed on the entire screen (however, it is also possible to display the ALV output in a dialog box).
@@ -4887,7 +4887,7 @@ ENDTRY.
- For simplicity of the snippet, the code only uses the root exception class. Make sure that you implement appropriate error handling and exception classes.
- You can copy and paste the code into your own test program to explore the ALV output and the effect of the method calls.
-> **π‘ Note**
+> [!NOTE]
> Check the comments for the custom functions. If there are errors in your test program, replace the relevant code section and enable the generic ALV functions.
```abap
@@ -5223,7 +5223,7 @@ After the import of the repository, proceed as follows:
- `ZDEMO_ABAP_ALV`: Demonstrates the SAP List Viewer (ALV)
- Run the program by choosing `F8`.
-> **π‘ Note**
+> [!NOTE]
> - The examples in the *main* branch of the ABAP cheat sheet repository are designed to be imported into the SAP BTP ABAP Environment. For Standard ABAP, you can find examples (such as `ZDEMO_ABAP_SELSCR_LISTS_INTRO`) in the other branches of the repository.
> - The executable examples ...
> - do not claim to include meaningful selection screens and lists.
diff --git a/21_XML_JSON.md b/21_XML_JSON.md
index 72fd82e..5484b87 100644
--- a/21_XML_JSON.md
+++ b/21_XML_JSON.md
@@ -20,6 +20,7 @@
- [Converting string \<-\> xstring](#converting-string---xstring)
- [Compressing and Decompressing Binary Data](#compressing-and-decompressing-binary-data)
- [Exporting and Importing Data Clusters](#exporting-and-importing-data-clusters)
+ - [Repairing and Cleaning up XML Documents](#repairing-and-cleaning-up-xml-documents)
- [More Information](#more-information)
- [Executable Example](#executable-example)
@@ -31,7 +32,7 @@ This cheat sheet provides a high-level overview of working with XML and JSON in
- `CALL TRANSFORMATION` syntax
- Working with JSON data
-> **π‘ Note**
+> [!NOTE]
> - The cheat sheet snippets and the executable example cover simple cases. Find more executable examples of the ABAP Keyword Documentation following the links in the [More Information](#more-information) section.
> - For more detailed information, such as documentation on ST syntax, what asXML is, etc., also see the links in the [More Information](#more-information) section.
@@ -654,7 +655,7 @@ Possible transformations, some of which are covered in the example:
| ABAP <-> XML | X | X |
| ABAP <-> ABAP | X | - |
-> **π‘ Note**
+> [!NOTE]
> - asXML:
> - *ABAP Serialization XML*
> - Describes a format of XML data created when serializing ABAP data (ABAP -> XML) with the identity transformation
@@ -670,7 +671,7 @@ Possible transformations, some of which are covered in the example:
The following code snippets demonstrate a selection of possible syntax options when using [`CALL TRANSFORMATION`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapcall_transformation.htm) statements.
-> **π‘ Note**
+> [!NOTE]
> You can also transform ABAP to and from JSON data using transformations. Find examples in the [Transforming JSON Data Using Transformations](#transforming-json-data-using-transformations) section.
@@ -766,7 +767,7 @@ CALL TRANSFORMATION ... SOURCE ...
RESULT (restab).
```
-> **π‘ Note**
+> [!NOTE]
> More additions are available such as `PARAMETERS` (for parameter binding) and `OPTIONS` (for predefined transformation options). See the details in the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapcall_transformation.htm).
@@ -967,7 +968,7 @@ ENDCLASS.
### Creating and Reading JSON Data Using sXML
-> **π‘ Note**
+> [!NOTE]
> - In ABAP, the sXML library processes JSON data using JSON-XML, an SAP-specific JSON data representation in XML format. This intermediate step is used for both reading and creating JSON data. Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_json_xml.htm).
> - The following examples provide basic implementations to give you an idea. You should always work out your own solutions.
> - Both token-based and object-oriented rendering/parsing methods are available. These examples use the token-based approach.
@@ -1808,7 +1809,7 @@ DATA(is_equal) = xsdbool( len_xstr = len_xstr_decomp AND str = conv_str ).
- `EXPORT` to write data objects to the memory medium
- `IMPORT` to read from the memory medium and extract the data objects
-> **π‘ Note**
+> [!NOTE]
> - Regarding data clusters, the focus in this section is on the fast serialization and deserialization of data to and from `xstring`.
> - Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENDATA_CLUSTER.html).
> - More syntax options are available in [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm).
@@ -2026,6 +2027,146 @@ ENDCLASS.
+
## More Information
- [ABAP and XML (main topic in the ABAP Keyword Documentation)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_xml.htm)
@@ -2047,7 +2188,7 @@ ENDCLASS.
## Executable Example
[zcl_demo_abap_xml_json](./src/zcl_demo_abap_xml_json.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example ...
> - covers the following topics:
> - Creating/Parsing XML Data Using iXML
diff --git a/22_Released_ABAP_Classes.md b/22_Released_ABAP_Classes.md
index 413d5f9..188e36b 100644
--- a/22_Released_ABAP_Classes.md
+++ b/22_Released_ABAP_Classes.md
@@ -323,13 +323,13 @@ ENDCLASS.
-> **π‘ Note**
+> [!NOTE]
> - Find more information on IDE actions and examples:
> - [in the SAP documentation](https://help.sap.com/docs/abap-cloud/abap-development-tools-user-guide/working-with-ide-actions).
> - [in this Devtoberfest session](https://youtu.be/YOIsyR5C2Mk?t=2304).
> - Your user must be assigned to the `SAP_A4C_BC_DEV_AIA_PC` business catalog.
-> **β οΈ Disclaimer**
+> [!WARNING]
> - The examples are simplified and not meant to represent best practices for IDE action implementation. They are only intended for exploration purposes to get a high-level idea.
> - All examples use `CL_DEMO_OUTPUT_CLOUD` to retrieve HTML output of data objects. Note that this class is intended for demo purposes only.
> - **NOTE**: The use of IDE actions is your responsibility. Development and use are up to you. Refer to [this repository's disclaimer](./README.md#%EF%B8%8F-disclaimer) and the [disclaimer in the IDE action documentation](https://help.sap.com/docs/abap-cloud/abap-development-tools-user-guide/working-with-ide-actions).
@@ -1709,7 +1709,7 @@ ENDCLASS.
- Choose *Run*.
- If the XLSX content processing is successful, the IDE action result dialog will display the XLSX content in an internal table, presented as HTML table.
-> **β οΈ Disclaimer**
+> [!WARNING]
> Since the example IDE action lets you import a local file, be mindful of the potential security risks when importing external content. Refer to [this repository's disclaimer](./README.md#%EF%B8%8F-disclaimer) and to [the disclaimer in the documentation about XCO](https://help.sap.com/docs/btp/sap-business-technology-platform/xlsx-read-access).
@@ -3463,7 +3463,7 @@ DATA(repl_result_not_extended) = matcher_not_extended->text.
## Time and Date
-> **π‘ Note**
+> [!NOTE]
> In [ABAP for Cloud Development](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_for_cloud_dev_glosry.htm), do not use the date and time-related system fields such as `sy-datum` and `sy-uzeit`, and others. User-related time and date values can be retrieved using the XCO library. For code snippets, see the [Date, Time, and Time Stamp](23_Date_and_Time.md) cheat sheet.
@@ -5680,7 +5680,7 @@ To check out examples in demo classes, expand the collapsible sections below.
-> **β οΈ Note/Disclaimer**
+> [!WARNING]
> - The following self-contained and oversimplified example is not a representative best practice example, nor does it cover a meaningful use case. It only explores method calls and is intended to give a rough idea of the functionality.
> - The example uses the create_by_url method, which is only suitable for public services or testing purposes. No authentication is required for the APIs used.
> - Note the Disclaimer.
@@ -5846,7 +5846,7 @@ ENDCLASS.
-> **β οΈ Note/Disclaimer**
+> [!WARNING]
> - As stated for the previous example, also note for this example: Before using the GitHub APIs, make sure that you have consulted the following documentation: GitHub Docs, Render a Markdown document, Rate limits for the REST API
> - To run the example class, copy and paste the code into a class named `zcl_demo_abap`. Run the class using F9. It is set up to display HTML content in the console. Using the GitHub API, sample Markdown content is sent and converted to HTML.
@@ -5943,7 +5943,7 @@ The following example demonstrates a selection of methods and includes the follo
- A demo class explores a selection of XCO classes and methods.
- Exporting the adapted XLSX content (not related to the XCO library; just to visualize newly created XLSX content using XCO)
-> **π‘ Note**
+> [!NOTE]
> - Note [this repository's disclaimer](./README.md#%EF%B8%8F-disclaimer) and [the disclaimer in the documentation about XCO](https://help.sap.com/docs/btp/sap-business-technology-platform/xlsx-read-access) for security considerations when importing and processing external content.
> - IDE actions represent a simple way of file import. Find more information in section [Excursion: Exploring Demo Display Class Using IDE Actions](#excursion-exploring-demo-display-class-using-ide-actions).
@@ -6044,7 +6044,7 @@ The XLSX XCO module works with XLSX content in the form of an xstring. The follo
- Refer to the comments in the example class below. You can either exit the app now, leaving one entry in the database with the XLSX content, or use the UUID value of the created entry in the `WHERE` clause of the `SELECT` statement at the beginning of the `main` method implementation below.
-> **π‘ Note**
+> [!NOTE]
> - If there are issues with the UI (e.g. you cannot upload), try out UI V2.
> - Create a new service definition, e.g. right-click the *Service Definition* folder and choose *New Service Definition*.
> - Provide a name (e.g. `ZUI_TDEMO_ABAP_XLSX_O2`) and description. Choose *Next*.
@@ -6087,7 +6087,7 @@ The XLSX XCO module works with XLSX content in the form of an xstring. The follo
Assuming you have the XLSX content created and uploaded above on your system, you can explore the following example using the XCO classes/methods. Set up a demo class called `zcl_demo_abap` and use the code provided below. After activating it, choose *F9* in ADT to run the class. The example is designed to show output in the console.
-> **π‘ Note**
+> [!NOTE]
> - Refer to the comments in the code for information.
> - If you have used different names than those in this example, make sure to replace those names in the code.
> - If your artifacts have a different setup, names, or XLSX content, the example class will not function properly. You willl need to modify the class code to match your specific requirements.
@@ -7517,7 +7517,7 @@ The following code snippet uses the `XCO_CP_CTS` class, among others, to demonst
- Dynamically calling the `calculate` method to confirm the class creation. For more details, refer to the [Dynamic Programming](06_Dynamic_Programming.md) cheat sheet.
- Programmatically releasing a transport task and request
-> **π‘ Note**
+> [!NOTE]
> - The example is simplified and non-semantic, exploring various functionalities offered by the XCO APIs. See the repository's [disclaimer](./README.md#%EF%B8%8F-disclaimer).
> - For more information and code snippets, refer to the [SAP Help documentation](https://help.sap.com/docs/btp/sap-business-technology-platform/correction-and-transport-system).
> - The example assumes you have a transportable package, represented by the `pkg_name` constant in the example.
diff --git a/23_Date_and_Time.md b/23_Date_and_Time.md
index 36d5dc4..0f8669c 100644
--- a/23_Date_and_Time.md
+++ b/23_Date_and_Time.md
@@ -60,7 +60,7 @@ The main data types for date, time, and time stamps in ABAP are as follows:
| `utclong` | 8 byte | For storing a time stamp (i.e. a combined date/time specification). A time stamp field represents a unique time in UTC reference time (UTC: Coordinated Universal Time, which is the basis for representing worldwide time data). | Internal 8-byte integer representation of a UTC time stamp exact to 100 nanoseconds, in ISO-8601 notation between 0001-01-01T00:00:00.0000000 and 9999-12-31T23:59:59.9999999 | 0 | Find more details, e.g. on the special initial value, [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenutclong.htm). |
-> **π‘ Note**
+> [!NOTE]
> - Regarding DDIC types: When saving dates and times in a database, it is recommended that you use the `datn` and `timn` types in your implementations. These types are optimized for their corresponding functions and expressions, offering an advantage over the older `dats` and `tims` types, which require conversion to actual date and time types. If you need UTC time stamps to be stored in the database, the `utclong` DDIC type is recommended.
> - The [DDIC data elements](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_element_glosry.htm) `timestamp` and `timestampl` represent time stamps in [packed numbers](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenpacked_number_glosry.htm). They are [released](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_api_glosry.htm), and they are used in several ABAP statements and classes covered in the cheat sheet.
> - `timestamp`
@@ -95,7 +95,7 @@ DATA ts_long TYPE timestampl VALUE '20240101082802.1700020'.
## Retrieving the Time Zone
-> **π‘ Note**
+> [!NOTE]
> Regarding time zones:
> - Find more information on time zones [here (F1 for standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abensystem_user_time_zones.htm).
> - In case of [SAP BTP ABAP Environments](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensap_btp_abap_env_glosry.htm), the time zone is set to UTC by default. Find more information about maintaining user-specific language and regional settings in the SAP Fiori Launchpad [here](https://help.sap.com/docs/btp/sap-fiori-launchpad-for-sap-btp-abap-environment/maintaining-your-language-and-regional-settings).
@@ -121,7 +121,7 @@ DATA(tz_w_xco_utc) = xco_cp_time=>time_zone->utc->value.
## Date
-> **π‘ Note**
+> [!NOTE]
> - [AS ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenas_abap_glosry.htm) always implicitly references the Gregorian calendar. For output purposes, dates can be converted to country-specific calendars.
> - Regarding assignments of data objects with numeric data types and calculations: Valid values are converted to the number of days since 01.01.0001.
@@ -1429,7 +1429,7 @@ tz_str = |{ utclong_current( ) TIMEZONE = 'EST' COUNTRY = 'US ' }|. "12/30/2024
### Date and Time Functions in ABAP SQL and ABAP CDS
-> **π‘ Note**
+> [!NOTE]
> - Date and time functions are available for both [ABAP SQL](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_sql_date_time_functions.htm) and [ABAP CDS](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_date_time_functions_v2.htm). They have the same names. See the [overview](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddic_date_time_functions.htm) to find out which functions are available. The followig code snippet uses ABAP SQL.
> - The following code snippets use [typed literals](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentyped_literal_glosry.htm) to have self-contained examples. For more information, refer to the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_sql_typed_literals.htm) and the [Typed Literals in ABAP SQL](/16_Data_Types_and_Objects.md#typed-literals-in-abap-sql) section of the *Data Types and Data Objects* cheat sheet.
@@ -1541,7 +1541,7 @@ Find examples with classes for accessing calendar-related information in [this s
## Executable Example
[zcl_demo_abap_date_time](./src/zcl_demo_abap_date_time.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The executable example covers the handling and processing of date, time, and time stamps. The snippets of this cheat sheet and more are included.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
\ No newline at end of file
diff --git a/24_Builtin_Functions.md b/24_Builtin_Functions.md
index a0bf8ab..2f6cada 100644
--- a/24_Builtin_Functions.md
+++ b/24_Builtin_Functions.md
@@ -28,7 +28,7 @@ The functions can have one argument, which is a data object or an expression who
Built-in functions are also available in ABAP SQL and ABAP CDS.
-> **π‘ Note**
+> [!NOTE]
> - For more detailed information, refer to the topics linked in the [More Information](#more-information) section.
> - Avoid naming your methods the same as built-in functions within classes. Otherwise, the methods will "[hide](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuilt_in_functions_hiding.htm)" the built-in functions.
> - The examples in the ABAP cheat sheet are not comprehensive in terms of functions covered, syntax options and parameters used. Always refer to the ABAP Keyword Documentation for more details.
@@ -36,7 +36,7 @@ Built-in functions are also available in ABAP SQL and ABAP CDS.
## Logical Functions
-> **π‘ Note**
+> [!NOTE]
> - Logical functions in ABAP return a [truth value](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentruth_value_glosry.htm), either true or false. They are primarily used in [logical expressions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenlogexp.htm), for example, in control statements like `IF ... ELSE ... ENDIF`, and other statements that involve conditions.
> - Note that ABAP does not have a Boolean data type for truth values, nor does it support [Boolean data objects](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenboolean_data_object_glosry.htm). Instead, the `xsdbool` function can be used to represent truth values in various situations where the `abap_bool` type from the `abap` type pool, i.e. the values `abap_true` ('X') and `abap_false` (''), is expected.
> - Many of the examples in this section utilize the `xsdbool` function to visualize the truth value, rather than using `IF` control structures, for example.
@@ -1243,7 +1243,7 @@ DATA(ts_diff2) = utclong_diff( high = ts5
## Table Functions
-> **π‘ Note**
+> [!NOTE]
> See the `line_exists` function in the [Logical Functions](#logical-functions) section.
@@ -1341,7 +1341,7 @@ DATA(line_index7) = line_index( itab_str[ table_line = `zzz` ] ).
## Built-In Functions for ABAP CDS and ABAP SQL
-> **π‘ Note**
+> [!NOTE]
> - The examples only demonstrate ABAP SQL statements. Refer to the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddic_builtin_functions.htm) for the complete picture.
> - As with the previous examples, the following examples showcase a variety of available functions.
> - The examples use [typed literals](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentyped_literal_glosry.htm) to ensure appropriate types are used and to provide self-contained examples.
@@ -1756,6 +1756,6 @@ SELECT tab2~key_field,
[zcl_demo_abap_builtin_func](./src/zcl_demo_abap_builtin_func.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
diff --git a/25_Authorization_Checks.md b/25_Authorization_Checks.md
index 8fca1c7..38c3584 100644
--- a/25_Authorization_Checks.md
+++ b/25_Authorization_Checks.md
@@ -116,14 +116,14 @@ The following topic covers authorization-related terms and provides you with the
## Executable Example (SAP BTP ABAP Environment)
-> **π‘ Note**
+> [!NOTE]
> - The example is intentionally simplified and nonsemantic, designed to explore basic authorization checks.
> - It is not meant to serve as a model for proper authorization check design. Always devise your own solutions for each unique case.
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
### Implementation Steps
-> **π‘ Note**
+> [!NOTE]
> - As a prerequisite, you have imported the ABAP cheat sheet GitHub repository. The example relies on some of its repository objects.
> - To get more details on the general implementation steps, see this [tutorial](https://developers.sap.com/tutorials/abap-environment-authorization.html). Note that not all the steps there are covered and relevant for the executable example here. Plus, other artifact names are used.
> - The purpose of the example is that activities are only allowed when the *countryfr* value is *US*. This is checked by the authorization check examples in the class further down.
diff --git a/26_ABAP_Dictionary.md b/26_ABAP_Dictionary.md
index 7872dcf..0ec8730 100644
--- a/26_ABAP_Dictionary.md
+++ b/26_ABAP_Dictionary.md
@@ -33,7 +33,7 @@ This cheat sheet ...
- focuses on [ABAP for Cloud Development](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_for_cloud_dev_glosry.htm), and therefore, does not cover certain DDIC topics and functionalities that are not relevant or supported in this context.
- invites you to a more in-depth exploration. Make sure that you refer to the documentation for more details and the complete picture.
-> **π‘ Note**
+> [!NOTE]
> - While several DDIC objects are still supported in [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm) (excluding, for example, classic DDIC views), it is recommended to use their ABAP CDS-based successors for new developments.
## Introduction
@@ -57,7 +57,7 @@ This cheat sheet ...
- Many repository objects are created from source code using dedicated data definition languages, as opposed to the form-based creation you may be familiar from [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm).
-> **π‘ Note**
+> [!NOTE]
> - DDIC provides a centralized location for defining and managing types that are frequently (re)used in DDIC, ABAP CDS, or ABAP programs. This means that a type change in DDIC will automatically update in all relevant places, potentially causing inconsistencies and making adjustments necessary. To find the users of a particular type in ADT, right-click the type and select *Get Where-Used List*.
> - Global access to types is only possible if the package concept does not specify otherwise. A package, which encapsulates repository objects into self-contained units, can be set to disallow external access. Find more information [here](https://help.sap.com/docs/abap-cloud/abap-development-tools-user-guide/editing-abap-packages?locale=en-US&version=sap_btp).
@@ -92,7 +92,7 @@ DDIC supports the following data types:
| `raw` | Represents byte strings Mapped to `x` |
-> **π‘ Note**
+> [!NOTE]
> - There are restrictions when using strings in ABAP CDS and ABAP SQL. For more information, see [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddic_character_byte_types.htm).
> - Built-in dictionary types cannot be used directly in ABAP, e.g. for typing local data objects. However, the types can be used in ABAP SQL, and also ABAP CDS, in the context of [typed literals](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentyped_literal_glosry.htm). Find more information in the [ABAP SQL](03_ABAP_SQL.md#typed-literals) cheat sheet.
@@ -121,7 +121,7 @@ They can be ...
- Field labels, primarily for classic ABAP UIs, can be specified. The *Medium Text* field label is exposed to OData.
- Domains provide additional semantic properties, such as a value range.
-> **π‘ Note**
+> [!NOTE]
> - CDS simple types represent successor artifacts of DDIC data elements.
> - As is true for all the global types discussed, locally defined types hide identically named global types in ABAP programs.
@@ -135,7 +135,7 @@ They can be ...
- Although domains define type properties, they cannot be used to declare types and data objects with `TYPES` and `DATA` in ABAP programs. They cannot be reused in repository objects other than data elements.
- You can specify value ranges to set fixed values or intervals as a semantic property. These are typically used for input checks in classic ABAP UIs, which ABAP Cloud does not support. While these value ranges have no effect when used in ABAP statements, they can be used for value helps in the context of CDS views.
-> **π‘ Note**
+> [!NOTE]
> In modern ABAP, CDS enumerated types offer a similar functionality for fixed values.
**Example: DDIC Data Elements/Domains**
@@ -210,7 +210,7 @@ DATA char10_dtel_ref TYPE zdemo_abap_dtel_ref.
- Table types
- For comprehensive details and more annotations, refer to the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenddicddl_define_structure.htm).
-> **π‘ Note**
+> [!NOTE]
> DDIC database tables and several CDS entities also represent structured types that can be used as such in ABAP programs.
**Example: DDIC Structures**
@@ -512,7 +512,7 @@ The following example creates two DDIC database tables exploring several options
- Although DDIC objects can be used in CDS objects, the reverse is not true. For example, a CDS view entity cannot be used in a DDIC database table.
- While ABAP Cloud still supports several DDIC objects, some have ABAP CDS-based successors. These successors offer advanced functionalities and support modern concepts such as ABAP RAP, which relies on data models defined in ABAP CDS and RAP behavior definitions that determine the model behavior.
-> **π‘ Note**
+> [!NOTE]
> - This cheat sheet only emphasizes ABAP CDS objects as global types to be used in ABAP. It does not cover use cases, data modeling aspects, annotations, syntax, and more. Refer to the [documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm) for the complete picture. The executable example of the [CDS View Entities](15_CDS_View_Entities.md) cheat sheet provides a demonstration of a selection of CDS-related syntax.
> - ABAP CDS objects are created in ADT from source code.
@@ -608,7 +608,7 @@ DATA(applies_to_data_cds_st) = tdo_cds_simple_type->applies_to_data( CONV c5( 'a
- define a base type. Possible base types include `int1`, `int2`, `int4`, `char`, and `numc`, with the last two having a maximum length of 8.
- include [annotations](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_enum_type_anno.htm) if needed.
-> **π‘ Note**
+> [!NOTE]
> - Enumerated types can also be specified in ABAP using the syntax `TYPES BEGIN OF ENUM`. See examples in the [Data Types and Data Objects](16_Data_Types_and_Objects.md) cheat sheet.
> - Find more information about RTTI, which is used in this and the previous examples, in the [Dynamic Programming](06_Dynamic_Programming.md) cheat sheet.
@@ -703,7 +703,7 @@ SELECT * FROM zdemo_abap_fli_ve INTO TABLE @itab_cds_ve.
SELECT * FROM zdemo_abap_table_function INTO TABLE @itab_cds_tabfunc.
```
-> **π‘ Note**
+> [!NOTE]
> - Some of the CDS entities can also be used as data sources in ABAP SQL statements, some cannot (for example, CDS custom entities).
> - [DDIC-based views](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_v1_view_glosry.htm) are obsolete and should not be used anymore.
@@ -764,7 +764,7 @@ Using the [XCO library](https://help.sap.com/docs/btp/sap-business-technology-pl
## Executable Example
-> **π‘ Note**
+> [!NOTE]
> - The executable example uses both the created repository objects as described in this cheat sheet and some repository objects of the ABAP cheat sheet repository. The example explores and uses code snippets of this cheat sheet, emphasizing the use of global types in ABAP programs.
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
diff --git a/27_Exceptions.md b/27_Exceptions.md
index 5cc9078..a24ced2 100644
--- a/27_Exceptions.md
+++ b/27_Exceptions.md
@@ -32,7 +32,7 @@
This cheat sheet includes an overview about syntax in the context of exceptions and runtime errors in ABAP.
-> **π‘ Note**
+> [!NOTE]
> Several code snippets in the cheat sheet use artifacts from the [executable example](#executable-example).
## Exceptions
@@ -75,7 +75,7 @@ Exception classes ...
RAISING cx_sy_zerodivide.
```
-> **π‘ Note**
+> [!NOTE]
> - Non-class-based exceptions are obsolete and should no longer be used in new developments. See the [guidelines (F1 docu for standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenclass_exception_guidl.htm).
> - Unhandled exceptions raised by the ABAP runtime environment trigger a corresponding runtime error. For example, the exception class `CX_SY_ZERODIVIDE` causes the runtime error `COMPUTE_INT_ZERODIVIDE`. For self-defined exception classes, unhandled exceptions generally trigger the runtime error `UNCAUGHT_EXCEPTION`.
@@ -229,7 +229,7 @@ Example:
-> **π‘ Note**
+> [!NOTE]
> - Basic rule: [Use a suitable exception category (F1 docu for standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenexception_category_guidl.htm).
> - Directly deriving from `CX_ROOT` is not possible.
> - As covered in the following sections, exception classes have specific components so that exceptions can be evaluated.
@@ -249,7 +249,7 @@ Example:
- `previous`: Reference to a previous exception; the type is a reference to `CX_ROOT`; also usually set by the constructor
- `is_resumable`: Flag for [resumable exceptions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenresumable_exception_glosry.htm); indicates whether the exception can be resumed and leave a `CATCH BEFORE UNWIND` block
-> **π‘ Note**
+> [!NOTE]
> - Further additions may be available depending on the exception object.
> - Usually, instances of exception classes are created when exceptions are raised. However, instances can also be created programmatically, e.g., with the `NEW` operator (if the classes are not abstract).
> - It is possible to define additional methods and attributes in exception classes, for example, for passing more information about error situations to handlers. Custom attributes should be defined as `READ-ONLY`.
@@ -272,7 +272,7 @@ Example:
Syntax examples for raising exceptions programmatically:
-> **π‘ Note**
+> [!NOTE]
> More variants of the statements shown are possible. They are covered in a [separate section below](#syntax-variants-of-raise-exceptionthrow) because they relate to topics covered in the following sections.
```abap
@@ -896,7 +896,7 @@ ENDCLASS.
- Optionally, up to four placeholders (`&1`, `&2`, `&3`, `&4`) can be specified for messages. At runtime, placeholders are replaced by values specified with the attributes.
-> **π‘ Note**
+> [!NOTE]
> When you create global exception classes in ADT, and you specify one of the exception superclasses to inherit from in the creation wizard, the resulting class code contains required implementations such as the instance constructor.
@@ -979,7 +979,7 @@ msgv4 = sy-msgv4. "H
- `... THROW exc( MESSAGE ID ... TYPE ... NUMBER ... WITH ... ) ...`
- `... THROW exc( USING MESSAGE ) ...`
-> **π‘ Note**
+> [!NOTE]
> - The code snippets below use exception classes, a message class and messages from the executable demo example.
> - The snippets include additions that are only available when exception classes implement the `IF_T100_DYN_MSG` interface.
> - In the executable example, `zcx_demo_abap_error_a` implements the `IF_T100_MESSAGE` interface and `zcx_demo_abap_error_b` implements `IF_T100_DYN_MSG`.
@@ -1581,7 +1581,7 @@ ENDTRY.
[zcl_demo_abap_error_handling](./src/zcl_demo_abap_error_handling.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The example involves the following artifacts:
> - One executable class `zcl_demo_abap_error_handling`
> - Two self-defined example exception classes `zcx_demo_abap_error_a` and `zcx_demo_abap_error_b` (one implements the `IF_T100_DYN_MSG`, the other implements `IF_T100_MESSAGE`)
diff --git a/28_Regular_Expressions.md b/28_Regular_Expressions.md
index 527e2f7..fe69b1b 100644
--- a/28_Regular_Expressions.md
+++ b/28_Regular_Expressions.md
@@ -46,7 +46,7 @@ Regular expressions
- PCRE regular expressions perform better
- A syntax warning for POSIX can be hidden with the pragma `##regex_posix`
-> **π‘ Note**
+> [!NOTE]
> - You can perform complex searches using regular expressions. For simple pattern-based searches, refer to comparison operators (`CP`, `NP`) in the [String Processing](07_String_Processing.md) cheat sheets.
> - The cheat sheet and examples focus on PCRE regular expressions. For other syntax types, find more information and links in the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENREGEX_SYNTAX.html).
> - In a system supporting [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm), you can check out the `demo_regex_toy` program for experimenting with regular expressions in ABAP.
@@ -55,7 +55,7 @@ Regular expressions
## Excursion: Common Regular Expressions
-> **π‘ Note**
+> [!NOTE]
> - The sections below provide an overview of common PCRE expressions with examples. This is not a comprehensive overview; only selected regular expressions are included.
> - For a complete guide to PCRE syntax, refer to the [official documentation](https://perldoc.perl.org/perlre). Note that ABAP-specific restrictions or modifications may apply to the standard syntax.
> - The code snippets use `replace` functions to show the effects of PCRE regular expressions. Many examples use the `occ` parameter with the assignment `occ = 0` to replace all occurrences.
@@ -1450,7 +1450,7 @@ DATA(repl_result_not_extended) = matcher_not_extended->text.
[zcl_demo_abap_regex](./src/zcl_demo_abap_regex.clas.abap)
-> **π‘ Note**
+> [!NOTE]
> - The [executable example](./src/zcl_demo_abap_string_proc.clas.abap) of the [String Processing](07_String_Processing.md) cheat sheet also includes examples with regular expressions.
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
> - [Disclaimer](./README.md#%EF%B8%8F-disclaimer)
\ No newline at end of file
diff --git a/29_Numeric_Operations.md b/29_Numeric_Operations.md
index 5223b0c..490b105 100644
--- a/29_Numeric_Operations.md
+++ b/29_Numeric_Operations.md
@@ -19,7 +19,7 @@
This cheat sheet explores various aspects of numeric operations and calculations in ABAP, covering miscellaneous topics and code snippets.
-> **π‘ Note**
+> [!NOTE]
> - Several topics and similar or the same code snippets in this cheat sheet are also found in other cheat sheets. For example, date and time calculations appear in the [Date, Time, and Time Stamp](23_Date_and_Time.md) cheat sheet. They are included here in the context of calculations in ABAP.
> - Find more information in the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENCOMPUTE_EXPRESSIONS.html).
@@ -113,7 +113,7 @@ This cheat sheet explores various aspects of numeric operations and calculations
-> **π‘ Note**
+> [!NOTE]
> - The built-in type `n` for numeric text fields is a character-like, not a numeric type, even though it only contains digits. It is not recommended for calculations. Use type `n` for purposes not involving calculations, like ID values or article numbers.
> - Generic types such as `numeric`, `p` and `decfloat` can be specified as types of field symbols and formal parameters of procedures such as methods of classes.
@@ -432,7 +432,7 @@ dec34_n = EXACT #( `.9E-3 ` ).
- The result of arithmetic expressions is a numeric value. Note the [calculation type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencalculation_type_glosry.htm) as described below.
-> **π‘ Note**
+> [!NOTE]
> - If the first operand is also 0 in a zero division, an exception is not raised. Instead, the result is set to 0.
> - For more information on the `DIV` and `MOD` operators, refer to [this blog](https://community.sap.com/t5/technology-blogs-by-sap/understanding-div-and-mod-in-abap-and-beyond/ba-p/14015181).
diff --git a/30_Generative_AI.md b/30_Generative_AI.md
index e5aa9e9..0e18522 100644
--- a/30_Generative_AI.md
+++ b/30_Generative_AI.md
@@ -30,7 +30,7 @@ This ABAP cheat sheet provides references to detailed information on *Generative
- This section explores released ABAP classes within the ABAP AI SDK for interacting with large language models (LLMs) in custom implementations.
- Find more information in [Developing Your Own AI-Enabled Applications](https://help.sap.com/docs/ABAP_AI/c7f5ef43ab274d078baf22f995fd2161/27c5d27b480043f0a9fd8e46ae8275a2.html?locale=en-US).
-> **π‘ Note**
+> [!NOTE]
> - The ABAP AI SDK is integrated with the *Intelligent Scenario Lifecycle Management (ISLM)*. Before using the ABAP AI SDK, administrative tasks outlined in the [documentation](https://help.sap.com/docs/ABAP_AI/c7f5ef43ab274d078baf22f995fd2161/339bd7a66c8545159cec357ce7f183d4.html?locale=en-US) have to be performed.
> - As a prerequisite to using the ABAP AI SDK, you have to create intelligent scenarios (ABAP repository objects containing various features to enable, for example, the instantiation of the completion API) and intelligent scenario models (defining, for example, which LLM is used).
> - The code snippets use the intelligent scenario name `ZDEMO_ABAP_INT_SCEN`. Assume that an example intelligent scenario model with the name `ZDEMO_ABAP_INT_SCEN_MODEL` exists, which includes a prompt template ID named `ZDEMO_PROMPT_TEMPLATE`.
diff --git a/31_WHERE_Conditions.md b/31_WHERE_Conditions.md
index 6c7eb24..5c6e8ec 100644
--- a/31_WHERE_Conditions.md
+++ b/31_WHERE_Conditions.md
@@ -10,7 +10,7 @@
This cheat sheet focuses on `WHERE` conditions and explores various syntax options in ABAP statements that include `WHERE` for data filtering. This is relevant, for example, when retrieving data from a data source using ABAP SQL or when processing internal tables with ABAP statements. For all details and syntax options, refer to the [ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENABAP.html). Several aspects and code snippets in this cheat sheet are also available in other cheat sheets.
-> **π‘ Note**
+> [!NOTE]
> - Most examples in the cheat sheet use internal tables as data sources for ABAP SQL `SELECT` statements to have self-contained examples. Use `SELECT` with internal tables as data sources only when SQL functionalities like joins exceed ABAP statements. For more details, refer to the [Internal Tables](01_Internal_Tables.md) cheat sheet.
> - Some examples also use artifacts from the ABAP cheat sheet repository. To check out these examples, ensure you have imported the ABAP cheat sheet repository into your system.
@@ -626,7 +626,7 @@ SELECT id FROM @itab AS tab
-> **π‘ Note**
+> [!NOTE]
> - Some subqueries in the syntax variants must be scalar subqueries. This means that the subquery returns a single-column result set. The `SELECT` list of the subquery must only contain a single element.
> - See [this topic](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABAPSQL_EXPR.html) in the ABAP Keyword Documentation what can be specified as operands on the left and right side.
> - The comparisons are done on the database, so there is no type conversions in ABAP beforehand. Note that platform-dependent conversion behavior may be applied. For SAP HANA Platform-related conversion rules, see [this topic](https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/b4b0eec1968f41a099c828a4a6c8ca0f.html).
@@ -638,7 +638,7 @@ SELECT id FROM @itab AS tab
To try the example out, create a demo class named `zcl_demo_abap` and paste the code into it. The example is not set up to display output in the console. Some results are included as comments for quick reference. After activation, you may want to set break points, choose *F9* in ADT to execute the class, and walk through the code to explore the effect of the statements.
-> **π‘ Note**
+> [!NOTE]
> - Many ABAP SQL `SELECT` statements in the example use an internal table as the data source to work with simple data.
> - Some examples also use subqueries. In these cases, another internal table cannot currently serve as the data source in the subquery. Therefore, examples use demo database tables from the ABAP cheat repository. They are also used to demonstrate `IS [NOT] NULL`. As a prerequisite, you have imported the ABAP cheat sheet repository to run the example class.
@@ -1190,7 +1190,7 @@ ENDCLASS.
### Executable Example (Statements for Internal Tables)
-> **π‘ Note**
+> [!NOTE]
> - The example snippets cover a selection and do not show all possible syntax variants, such as statements specifying table keys.
> - The evaluation of the `WHERE` condition depends on the table category and table key. Find more information on optimizing the `WHERE` condition [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/ABENITAB_WHERE_OPTIMIZATION.html). These considerations are not relevant in the example snippets, as the focus is on syntax options.
diff --git a/README.md b/README.md
index 4c49276..94c0419 100644
--- a/README.md
+++ b/README.md
@@ -37,23 +37,26 @@ ABAP cheat sheets[^1] ...
- are enriched by links to glossary entries and chapters of the **ABAP Keyword Documentation** (the *F1 help*) and more for you to deep dive into the respective ABAP topics and get more comprehensive information.
-
-π’ Click to expand for more information
-- Since the ABAP cheat sheets provide information in a nutshell, they do not claim to be fully comprehensive as far as the described syntax and concepts are concerned. If you need more details, you can always consult the ABAP Keyword Documentation, for example, by choosing *F1* on a keyword in your code, or by searching directly using the online or the system-internal version.
-- Unless otherwise stated in the cheat sheets, the content of this repository is relevant for these ABAP language versions, with a focus on ABAP for Cloud Development, particularly in the SAP BTP ABAP Environment β οΈ:
- - [ABAP for Cloud Development](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenabap_for_sap_cloud_glosry.htm): Restricted ABAP language scope for [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm) β [Online version of the documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm)
- - [Standard ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_abap_glosry.htm): Unrestricted ABAP language scope, for example, for [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm) β [Online version of the documentation (latest version)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenabap.htm)
-- Some of the embedded code snippets in the cheat sheets only display high-level code patterns, while others are fully functional and can be directly copied into an ABAP test program for exploration.
-- Check the [Known Issues](#-known-issues) and [Disclaimer](#%EF%B8%8F-disclaimer).
-- The cheat sheets provide links to glossary entries and topics in the ABAP Keyword Documentation. Note that unlike the classic ABAP-only cheat sheets, in most cases these links refer to ABAP for Cloud Development.
-- [Here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrestricted_abap_elements.htm) is an overview of the different ABAP language elements in the different ABAP versions, i.e. what is allowed in ABAP Cloud and what is not. See also the released APIs [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_apis.htm).
-- In order to have all ABAP cheat sheet documents in one place, the *main* branch (for examples to be imported into the SAP BTP ABAP environment) also contains the ABAP cheat sheet documents that are only relevant for [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm).
-- The example classes contained in the branches for classic ABAP mostly use syntax that is also available in ABAP for Cloud Development. Only the `TEST_ABAP_CHEAT_SHEETS_CLASSIC` subpackage contains syntax relevant to Standard ABAP and that is not available in ABAP for Cloud Development, such as dynpro-related ABAP keywords.
-- The code snippets in the ABAP cheat sheet documents and the executable examples include many comments. While it is generally not recommended to overuse comments in your code, they are used here to explain and provide context directly where it is needed. In many cases, they illustrate the results of ABAP statements.
-- As previously mentioned, the cheat sheet documents and examples primarily focus on syntax options. Most of the executable examples, code snippets, names of data objects, classes, methods, interfaces, etc., are nonsemantic.
-- Many ABAP statements allow additions in various orders, and these orders are not always fixed.
+> [!IMPORTANT]
+> - Unless otherwise stated in the cheat sheets, the content of this repository is relevant for these ABAP language versions, with a focus on ABAP for Cloud Development, particularly in the SAP BTP ABAP Environment β οΈ:
+> - [ABAP for Cloud Development](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenabap_for_sap_cloud_glosry.htm) Restricted ABAP language scope for [ABAP Cloud](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_cloud_glosry.htm) β [Online version of the ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm)
+> - [Standard ABAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstandard_abap_glosry.htm) Unrestricted ABAP language scope, for example, for [classic ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenclassic_abap_glosry.htm) β [Online version of the ABAP Keyword Documentation (latest version)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenabap.htm)
+> - The ABAP cheat sheet documents and examples mainly highlight and explore ABAP syntax options. Most executable examples, code snippets, names of data objects, classes, methods, and interfaces are non-semantic. These code examples do not claim to illustrate best practices. They are simply meant to illustrate ABAP statements and additions to give an idea of their functionality.
+
+
+
+> [!NOTE]
+> - Since the ABAP cheat sheets provide information in a nutshell, they are not fully comprehensive as far as the described syntax and concepts are concerned. If you need more details, you can always consult the ABAP Keyword Documentation, for example, by choosing *F1* on a keyword in your code, or by searching directly using the online or the system-internal version.
+>- Some of the embedded code snippets in the cheat sheets only display high-level code patterns, while others are fully functional and can be directly copied into an ABAP test program for exploration.
+>- Check the [Known Issues](#-known-issues) and [Disclaimer](#%EF%B8%8F-disclaimer).
+>- The cheat sheets provide links to glossary entries and topics in the ABAP Keyword Documentation. Note that unlike the classic ABAP-only cheat sheets, in most cases these links refer to ABAP for Cloud Development.
+>- [Here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrestricted_abap_elements.htm) is an overview of the different ABAP language elements in the different ABAP versions, i.e. what is allowed in ABAP for Cloud Development and what is not. See also the released APIs [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_apis.htm).
+>- In order to have all ABAP cheat sheet documents in one place, the *main* branch (for examples to be imported into the SAP BTP ABAP environment) also contains the ABAP cheat sheet documents that are only relevant for [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm).
+>- The example classes contained in the branches for classic ABAP mostly use syntax that is also available in ABAP for Cloud Development. Only the `TEST_ABAP_CHEAT_SHEETS_CLASSIC` subpackage contains syntax relevant to Standard ABAP and that is not available in ABAP for Cloud Development, such as dynpro-related ABAP keywords.
+>- The code snippets in the ABAP cheat sheet documents and the executable examples include many comments. While it is generally not recommended to overuse comments in your code, they are used here to explain and provide context directly with ABAP statements. In many cases, they illustrate the results of ABAP statements.
+>- Many ABAP statements allow additions in various orders, and these orders are not always fixed.
@@ -212,7 +215,7 @@ Use the standalone version of the abapGit report to import the demo examples of
- Open one of the ABAP cheat sheet example classes listed in the [ABAP Cheat Sheets Overview](#-abap-cheat-sheets-overview) section, for example, *zcl_demo_abap_string_proc*. The classes are located in the *Source Code Library* β *Classes* folder.
- Choose *F9* to run the class. Alternatively, choose *Run* β *Run As* β *2 ABAP Application (Console)* from the menu.
- Check the console output.
- > **π‘ Note**
+ > [!NOTE]
>- Check the notes on the context and the ABAP syntax used that are included as comments in the class.
>- Due to the amount of output in the console, the examples include numbers (e.g. 1) ..., 2) ..., 3) ...) that represent the headers of each example code section. Also, in most cases, the variable name is displayed in the console. Therefore, to find the relevant output in the console more easily and quickly, simply search the console for the number (e.g. search for *3)* for the particular output) or variable name (*CTRL+F* in the console), or use breakpoints in the code to check variables in the debugger.
>- You may want to clear the console by right-clicking in the console and choosing *Clear* before running another demo class to avoid confusing the output of multiple classes.