This commit is contained in:
danrega
2025-01-13 12:49:30 +01:00
parent 6926ca4f3b
commit 401542476a
8 changed files with 863 additions and 107 deletions

View File

@@ -9,6 +9,7 @@
- [`IF` Statements](#if-statements)
- [Excursion: `COND` Operator](#excursion-cond-operator)
- [`CASE`: Case Distinctions](#case-case-distinctions)
- [Control Structures Using CASE TYPE OF](#control-structures-using-case-type-of)
- [Excursion: `SWITCH` Operator](#excursion-switch-operator)
- [Loops](#loops)
- [`DO`: Unconditional Loops](#do-unconditional-loops)
@@ -355,6 +356,10 @@ CASE random_num.
ENDCASE.
```
<p align="right"><a href="#top">⬆️ back to top</a></p>
#### Control Structures Using CASE TYPE OF
Special control structure introduced by [`CASE TYPE OF`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapcase_type.htm): Checks the type of object reference variables. An object reference variable with the static type of a class or an interface must be specified after `CASE TYPE OF`.
```abap
@@ -547,7 +552,7 @@ Further keywords for defining loops are as follows. They are not dealt with here
- [`LOOP ... ENDLOOP`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaploop_at_itab.htm) statements are meant for loops across internal tables. See also the cheat sheet on internal tables.
- In contrast to the loops above, the system field `sy-index` is not set. Instead, the system field `sy-tabix` is set and which contains the table index of the current table line in the loop pass.
- You can also realize loops using iteration expressions with `VALUE` and `REDUCE`. For more information, refer to the [Constructor Expressions](05_Constructor_Expressions.md) cheat sheet.
- `FOR` loops: You can also realize loops using iteration expressions with `VALUE` and `REDUCE`. For more information, refer to the [Constructor Expressions](05_Constructor_Expressions.md) cheat sheet.
- [`SELECT ... ENDSELECT`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect.htm) statements loop across the result set of a database access. See also the cheat sheet on ABAP SQL.
<p align="right"><a href="#top">⬆️ back to top</a></p>