Update content
This commit is contained in:
@@ -4,19 +4,19 @@
|
|||||||
|
|
||||||
- [Working with Constructor Expressions](#working-with-constructor-expressions)
|
- [Working with Constructor Expressions](#working-with-constructor-expressions)
|
||||||
- [Introduction](#introduction)
|
- [Introduction](#introduction)
|
||||||
- [`VALUE`](#value)
|
- [VALUE](#value)
|
||||||
- [`CORRESPONDING`](#corresponding)
|
- [CORRESPONDING](#corresponding)
|
||||||
- [`NEW`](#new)
|
- [NEW](#new)
|
||||||
- [`CONV`](#conv)
|
- [CONV](#conv)
|
||||||
- [`EXACT`](#exact)
|
- [EXACT](#exact)
|
||||||
- [`REF`](#ref)
|
- [REF](#ref)
|
||||||
- [`CAST`](#cast)
|
- [CAST](#cast)
|
||||||
- [`COND`](#cond)
|
- [COND](#cond)
|
||||||
- [`SWITCH`](#switch)
|
- [SWITCH](#switch)
|
||||||
- [`FILTER`](#filter)
|
- [FILTER](#filter)
|
||||||
- [`REDUCE`](#reduce)
|
- [REDUCE](#reduce)
|
||||||
- [Iteration Expressions with `FOR`](#iteration-expressions-with-for)
|
- [Iteration Expressions with FOR](#iteration-expressions-with-for)
|
||||||
- [`LET Expressions`](#let-expressions)
|
- [LET Expressions](#let-expressions)
|
||||||
- [Executable Example](#executable-example)
|
- [Executable Example](#executable-example)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
@@ -72,7 +72,7 @@ initialization can be avoided.
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `VALUE`
|
## VALUE
|
||||||
|
|
||||||
- Expressions with the
|
- Expressions with the
|
||||||
[`VALUE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_value.htm)
|
[`VALUE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_value.htm)
|
||||||
@@ -275,7 +275,7 @@ options of the constructor operators in the ABAP Keyword Documentation.
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `CORRESPONDING`
|
## CORRESPONDING
|
||||||
|
|
||||||
- Expressions with the
|
- Expressions with the
|
||||||
[`CORRESPONDING`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expr_corresponding.htm)
|
[`CORRESPONDING`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expr_corresponding.htm)
|
||||||
@@ -354,7 +354,7 @@ two statements are not the same:
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `NEW`
|
## NEW
|
||||||
|
|
||||||
- Using the instance operator
|
- Using the instance operator
|
||||||
[`NEW`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_new.htm),
|
[`NEW`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_new.htm),
|
||||||
@@ -479,7 +479,7 @@ DATA(oref3) = NEW cl2( p1 = ... p2 = ... ).
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `CONV`
|
## CONV
|
||||||
|
|
||||||
- The
|
- The
|
||||||
[`CONV`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_conv.htm)
|
[`CONV`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_conv.htm)
|
||||||
@@ -534,7 +534,7 @@ DATA(f) = `hallo`.
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `EXACT`
|
## EXACT
|
||||||
|
|
||||||
- The
|
- The
|
||||||
[`EXACT`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_exact.htm)
|
[`EXACT`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_exact.htm)
|
||||||
@@ -570,7 +570,7 @@ ENDTRY.
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `REF`
|
## REF
|
||||||
|
|
||||||
- The
|
- The
|
||||||
[`REF`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_ref.htm)
|
[`REF`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_ref.htm)
|
||||||
@@ -586,6 +586,7 @@ ENDTRY.
|
|||||||
and is particularly useful for avoiding the declaration of helper
|
and is particularly useful for avoiding the declaration of helper
|
||||||
variables that are only necessary, for example, to specify data
|
variables that are only necessary, for example, to specify data
|
||||||
reference variables as actual parameters.
|
reference variables as actual parameters.
|
||||||
|
- The following can be specified after `REF` before the first parenthesis: A non-generic data type that satisfies the rules of [upcasts in data references](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_references_data.htm), the generic type `data`, the `#` character if the type can be derived from the context.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
``` abap
|
``` abap
|
||||||
@@ -614,7 +615,7 @@ DATA(oref_b) = REF #( oref_a ).
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `CAST`
|
## CAST
|
||||||
|
|
||||||
- Using the
|
- Using the
|
||||||
[`CAST`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_cast.htm)
|
[`CAST`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_cast.htm)
|
||||||
@@ -651,7 +652,7 @@ DATA(methods) = CAST cl_abap_objectdescr(
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `COND`
|
## COND
|
||||||
|
|
||||||
- The
|
- The
|
||||||
[`COND`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconditional_expression_cond.htm)
|
[`COND`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconditional_expression_cond.htm)
|
||||||
@@ -680,7 +681,7 @@ DATA(b) = COND #( WHEN a BETWEEN 1 AND 3 THEN w
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `SWITCH`
|
## SWITCH
|
||||||
|
|
||||||
The
|
The
|
||||||
[`SWITCH`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconditional_expression_switch.htm)
|
[`SWITCH`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconditional_expression_switch.htm)
|
||||||
@@ -700,7 +701,7 @@ DATA(b) = SWITCH #( a
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `FILTER`
|
## FILTER
|
||||||
|
|
||||||
- The
|
- The
|
||||||
`FILTER` operator constructs an internal table according to a specified type (which can be an explicitly specified, non-generic table type or the # character as a symbol for the [operand type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenoperand_type_glosry.htm) before the first parenthesis).
|
`FILTER` operator constructs an internal table according to a specified type (which can be an explicitly specified, non-generic table type or the # character as a symbol for the [operand type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenoperand_type_glosry.htm) before the first parenthesis).
|
||||||
@@ -769,7 +770,7 @@ DATA(f11) = FILTER #( itab2 USING KEY sec_key EXCEPT IN filter_tab2 WHERE num =
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `REDUCE`
|
## REDUCE
|
||||||
|
|
||||||
- The
|
- The
|
||||||
[`REDUCE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_reduce.htm)
|
[`REDUCE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_reduce.htm)
|
||||||
@@ -801,7 +802,7 @@ DATA(sum) = REDUCE i( INIT s = 0
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## Iteration Expressions with `FOR`
|
## Iteration Expressions with FOR
|
||||||
|
|
||||||
- Using [iteration
|
- Using [iteration
|
||||||
expressions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeniteration_expression_glosry.htm "Glossary Entry")
|
expressions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeniteration_expression_glosry.htm "Glossary Entry")
|
||||||
@@ -898,7 +899,7 @@ TYPES t_type LIKE itab.
|
|||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## `LET Expressions`
|
## LET Expressions
|
||||||
|
|
||||||
- [`LET`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaplet.htm)
|
- [`LET`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaplet.htm)
|
||||||
expressions allow you to declare local helper fields (variables or
|
expressions allow you to declare local helper fields (variables or
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ FIELD-SYMBOLS <fs_data> TYPE data.
|
|||||||
FIELD-SYMBOLS <fs_any_table> TYPE any table.
|
FIELD-SYMBOLS <fs_any_table> TYPE any table.
|
||||||
|
|
||||||
"Declaring field symbols inline
|
"Declaring field symbols inline
|
||||||
"The typing of the field symbol is determined using the statically
|
"In an inline declaration, the typing of the field symbol is done with the generic type data.
|
||||||
"known type of the assigned memory area.
|
|
||||||
"Prominent use case: Inline declaration of a field symbol for an internal table.
|
"Prominent use case: Inline declaration of a field symbol for an internal table.
|
||||||
LOOP AT itab ASSIGNING FIELD-SYMBOL(<line>).
|
LOOP AT itab ASSIGNING FIELD-SYMBOL(<line>).
|
||||||
...
|
...
|
||||||
@@ -358,6 +357,9 @@ ref5 = CAST #( ref6 ).
|
|||||||
|
|
||||||
"Casting operator in older syntax
|
"Casting operator in older syntax
|
||||||
"ref5 ?= ref6.
|
"ref5 ?= ref6.
|
||||||
|
|
||||||
|
"Note: The cast operators can also but need not be specified for upcasts.
|
||||||
|
ref4 = CAST #( ref3 ).
|
||||||
```
|
```
|
||||||
|
|
||||||
**Addressing data references**
|
**Addressing data references**
|
||||||
|
|||||||
@@ -149,10 +149,9 @@ DATA char_len_one TYPE c.
|
|||||||
|
|
||||||
## Assigning Values
|
## Assigning Values
|
||||||
|
|
||||||
- When you declare character-like data objects, you can specify start values directly. For example, you can use
|
- When you declare character-like data objects, you can specify start values directly with the `VALUE` addition, e.g. `DATA chars TYPE c LENGTH 3 VALUE 'abc'.`.
|
||||||
the [assignment operator](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenassignment_operator_glosry.htm "Glossary Entry")
|
- You can do value assignments to data objects using the the [assignment operator](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenassignment_operator_glosry.htm "Glossary Entry") `=`.
|
||||||
`=`.
|
- As mentioned above, you can declare character-like data objects inline using the operators `DATA` or `FINAL`.
|
||||||
- As mentioned above, you can declare character-like data objects inline using the operators `DATA` or, in newer ABAP releases, `FINAL`.
|
|
||||||
- You can use the operators at many [write positions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenwrite_position_glosry.htm "Glossary Entry").
|
- You can use the operators at many [write positions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenwrite_position_glosry.htm "Glossary Entry").
|
||||||
- Unlike the `VALUE` addition of the declaration statements, inline declarations allow you to declare variables for the results of expressions or at other positions where character strings are returned.
|
- Unlike the `VALUE` addition of the declaration statements, inline declarations allow you to declare variables for the results of expressions or at other positions where character strings are returned.
|
||||||
- In the case below, a variable specified in parentheses preceded by `DATA` (or `FINAL`) on the left side of the assignment operator automatically derives a data type from the operand on the right. This helps to make your
|
- In the case below, a variable specified in parentheses preceded by `DATA` (or `FINAL`) on the left side of the assignment operator automatically derives a data type from the operand on the right. This helps to make your
|
||||||
@@ -161,6 +160,8 @@ programs leaner.
|
|||||||
Syntax examples:
|
Syntax examples:
|
||||||
``` abap
|
``` abap
|
||||||
"Data object declarations including default values with VALUE
|
"Data object declarations including default values with VALUE
|
||||||
|
"Note the chained statement: DATA followed by a colon, listing the data object declarations,
|
||||||
|
"separated by a comma.
|
||||||
DATA: flag TYPE c LENGTH 1 VALUE 'X',
|
DATA: flag TYPE c LENGTH 1 VALUE 'X',
|
||||||
str1 TYPE string VALUE `Hallo!`.
|
str1 TYPE string VALUE `Hallo!`.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# ABAP for RAP: Entity Manipulation Language (ABAP EML)
|
# ABAP for RAP: Entity Manipulation Language (ABAP EML)
|
||||||
|
|
||||||
- [ABAP for RAP: Entity Manipulation Language (ABAP EML)](#abap-for-rap-entity-manipulation-language-abap-eml)
|
- [ABAP for RAP: Entity Manipulation Language (ABAP EML)](#abap-for-rap-entity-manipulation-language-abap-eml)
|
||||||
- [Excursion: EML in the Context of RAP](#excursion-eml-in-the-context-of-rap)
|
- [RAP Buzzwords](#rap-buzzwords)
|
||||||
- [ABAP Behavior Pools (ABP)](#abap-behavior-pools-abp)
|
- [ABAP Behavior Pools (ABP)](#abap-behavior-pools-abp)
|
||||||
- [RAP Handler Classes and Methods](#rap-handler-classes-and-methods)
|
- [RAP Handler Classes and Methods](#rap-handler-classes-and-methods)
|
||||||
- [RAP Saver Class and Saver Methods](#rap-saver-class-and-saver-methods)
|
- [RAP Saver Class and Saver Methods](#rap-saver-class-and-saver-methods)
|
||||||
@@ -21,11 +21,10 @@
|
|||||||
- [More Information](#more-information)
|
- [More Information](#more-information)
|
||||||
- [Executable Examples](#executable-examples)
|
- [Executable Examples](#executable-examples)
|
||||||
|
|
||||||
## Excursion: EML in the Context of RAP
|
## RAP Buzzwords
|
||||||
|
|
||||||
[ABAP Entity Manipulation Language](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenaeml_glosry.htm) (or EML for short) is a subset of ABAP that allows you to access the data of [RAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenarap_glosry.htm) business objects in an ABAP program.
|
[ABAP Entity Manipulation Language](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenaeml_glosry.htm) (or EML for short) is a subset of ABAP that allows you to access the data of [RAP](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenarap_glosry.htm) business objects in an ABAP program.
|
||||||
The following points are meant to touch on RAP-related buzzwords like
|
The following points touch on RAP-related buzzwords such as *RAP business objects* and others for setting the context:
|
||||||
*RAP business objects* and others for setting the context:
|
|
||||||
|
|
||||||
- RAP business objects (RAP BO)
|
- RAP business objects (RAP BO)
|
||||||
- A RAP BO is based on a special, tree-like hierarchical structure
|
- A RAP BO is based on a special, tree-like hierarchical structure
|
||||||
@@ -140,8 +139,8 @@ The following points are meant to touch on RAP-related buzzwords like
|
|||||||
provided or self-implemented by developers in an ABAP behavior
|
provided or self-implemented by developers in an ABAP behavior
|
||||||
implementation
|
implementation
|
||||||
- Unmanaged RAP BOs are, for example, relevant for brownfield
|
- Unmanaged RAP BOs are, for example, relevant for brownfield
|
||||||
scenarios, i. e. in scenarios in which business logic is already
|
scenarios, i. e. in scenarios in which transactional buffers and application logic is already
|
||||||
available and should be embedded in the RAP world.
|
available and should be embedded in the RAP world. Note that it is possible to have a managed RAP BO with unamanged parts, e.g. unamanged save or additional save. Find more information [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl_rap_bo.htm).
|
||||||
- ABAP behavior implementation in an ABAP behavior pool (ABP)
|
- ABAP behavior implementation in an ABAP behavior pool (ABP)
|
||||||
- An [ABAP behavior
|
- An [ABAP behavior
|
||||||
pool](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbehavior_pool_glosry.htm "Glossary Entry")
|
pool](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbehavior_pool_glosry.htm "Glossary Entry")
|
||||||
@@ -625,7 +624,7 @@ the additions
|
|||||||
BY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm),
|
BY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm),
|
||||||
[`UPDATE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm),
|
[`UPDATE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm),
|
||||||
and
|
and
|
||||||
[`DELETE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm)
|
[`DELETE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm))
|
||||||
and non-standard operations (actions) using the addition
|
and non-standard operations (actions) using the addition
|
||||||
[`EXECUTE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm).
|
[`EXECUTE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmodify_entity_entities_op.htm).
|
||||||
All EML statements for the mentioned operations begin with
|
All EML statements for the mentioned operations begin with
|
||||||
|
|||||||
@@ -79,21 +79,21 @@ CLASS ltc_test_class IMPLEMENTATION.
|
|||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
> **💡 Note**<br>
|
||||||
- `FOR TESTING` can be used for multiple purposes:
|
> - `FOR TESTING` can be used for multiple purposes:
|
||||||
- Creating a test class containing test methods
|
> - Creating a test class containing test methods
|
||||||
- Creating a test double
|
> - Creating a test double
|
||||||
- Creating helper methods to support ABAP unit tests
|
> - Creating helper methods to support ABAP unit tests
|
||||||
- Note the possible [syntax options](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapclass_options.htm) before `FOR TESTING`
|
> - Note the possible [syntax options](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapclass_options.htm) before `FOR TESTING`
|
||||||
- Optional addition `RISK LEVEL ...`:
|
> - Optional addition `RISK LEVEL ...`:
|
||||||
- `CRITICAL`: test changes system settings or customizing data (default)
|
> - `CRITICAL`: test changes system settings or customizing data (default)
|
||||||
- `DANGEROUS`: test changes persistent data
|
> - `DANGEROUS`: test changes persistent data
|
||||||
- `HARMLESS`: test does not change system settings or persistent data
|
> - `HARMLESS`: test does not change system settings or persistent data
|
||||||
- Optional addition `DURATION ...`:
|
> - Optional addition `DURATION ...`:
|
||||||
- `SHORT`: execution time of only a few seconds is expected
|
> - `SHORT`: execution time of only a few seconds is expected
|
||||||
- `MEDIUM`: execution time of about one minute is expected
|
> - `MEDIUM`: execution time of about one minute is expected
|
||||||
- `LONG`: execution time of more than one minute is expected
|
> - `LONG`: execution time of more than one minute is expected
|
||||||
|
> - To create a class in ADT, type "test" in the "Test Class" tab and choose `CTRL` and `SPACE` to display the templates suggestions. You can then choose "testClass – Test class (ABAP Unit)". The skeleton of a test class is automatically generated.
|
||||||
|
|
||||||
To test protected or private methods, you must declare [friendship](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfriend_glosry.htm) with the class to be tested (class under test).
|
To test protected or private methods, you must declare [friendship](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfriend_glosry.htm) with the class to be tested (class under test).
|
||||||
Example:
|
Example:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Core data services (CDS) are an infrastructure for defining and consuming semant
|
|||||||
- [Feature Matrix: Data Modeling with ABAP Core Data Services](https://blogs.sap.com/2022/10/24/feature-matrix-data-modeling-with-abap-core-data-services/)
|
- [Feature Matrix: Data Modeling with ABAP Core Data Services](https://blogs.sap.com/2022/10/24/feature-matrix-data-modeling-with-abap-core-data-services/)
|
||||||
- [ABAP CDS Cheat Sheet: Amounts and Quantities in ABAP CDS](https://blogs.sap.com/2022/07/07/abap-cds-cheat-sheet-amounts-and-quantities-in-abap-cds/)
|
- [ABAP CDS Cheat Sheet: Amounts and Quantities in ABAP CDS](https://blogs.sap.com/2022/07/07/abap-cds-cheat-sheet-amounts-and-quantities-in-abap-cds/)
|
||||||
- [Section *ABAP - Core Data Services (ABAP CDS)* in the ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm)
|
- [Section *ABAP - Core Data Services (ABAP CDS)* in the ABAP Keyword Documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds.htm)
|
||||||
|
- [ABAP Data Models Guide](https://blogs.sap.com/2023/05/09/abap-data-models-guide/)
|
||||||
|
|
||||||
## Executable Example
|
## Executable Example
|
||||||
[zcl_demo_abap_cds_ve](./src/zcl_demo_abap_cds_ve.clas.abap)
|
[zcl_demo_abap_cds_ve](./src/zcl_demo_abap_cds_ve.clas.abap)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Note that the topics covered here are also partly covered in other ABAP cheat sh
|
|||||||
Data types
|
Data types
|
||||||
- Define technical properties of all data objects that have these data types, such as the maximum length of a [text field](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentext_field_glosry.htm).
|
- Define technical properties of all data objects that have these data types, such as the maximum length of a [text field](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentext_field_glosry.htm).
|
||||||
- Are descriptions only, with no data memory attached except for administrative information.
|
- Are descriptions only, with no data memory attached except for administrative information.
|
||||||
- Can occur in A[ABAP programs](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_program_glosry.htm) as [bound data types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbound_data_type_glosry.htm), that is, the type is a property of a data object, or as a [standalone data type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstand-alone_data_type_glosry.htm), that is, the data type is defined independently.
|
- Can occur in [ABAP programs](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_program_glosry.htm) as [bound data types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbound_data_type_glosry.htm), that is, the type is a property of a data object, or as a [standalone data type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstand-alone_data_type_glosry.htm), that is, the data type is defined independently.
|
||||||
- Can be defined locally in an ABAP program or globally in classes, interfaces and in the [ABAP Dictionary (DDIC)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_dictionary_glosry.htm).
|
- Can be defined locally in an ABAP program or globally in classes, interfaces and in the [ABAP Dictionary (DDIC)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenabap_dictionary_glosry.htm).
|
||||||
> **💡 Note**<br>
|
> **💡 Note**<br>
|
||||||
> - Note: Data types in the ABAP Dictionary are either created directly as [repository objects](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrepository_object_glosry.htm) ([DDIC data elements](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_element_glosry.htm)) or in a type pool (only in [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm)). [Database table](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendatabase_table_glosry.htm), [CDS entities](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_entity_glosry.htm) and their components can also be used as data types in ABAP programs.
|
> - Note: Data types in the ABAP Dictionary are either created directly as [repository objects](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrepository_object_glosry.htm) ([DDIC data elements](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_element_glosry.htm)) or in a type pool (only in [Standard ABAP](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenstandard_abap_glosry.htm)). [Database table](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendatabase_table_glosry.htm), [CDS entities](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencds_entity_glosry.htm) and their components can also be used as data types in ABAP programs.
|
||||||
@@ -46,7 +46,7 @@ Data objects:
|
|||||||
|
|
||||||
|
|
||||||
> **💡 Note**<br>
|
> **💡 Note**<br>
|
||||||
> There are several differentations that further distinguish and characterize data types and objects (see [here](#glossary-terms-in-a-nutshell)).
|
> There are several differentations that further distinguish and characterize data types and objects. See [here](#glossary-terms-in-a-nutshell).
|
||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ Data types can be divided into three groups:
|
|||||||
For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentype_hierarchy.htm) in the ABAP Keyword Documentation.
|
For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentype_hierarchy.htm) in the ABAP Keyword Documentation.
|
||||||
|
|
||||||
### Elementary Data Types
|
### Elementary Data Types
|
||||||
- Elementary (or scalar) data types are based directly on a set of [built-in ABAP types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuiltin_abap_type_glosry.htm)
|
- Elementary (or scalar) data types are based directly on a set of [built-in ABAP types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuiltin_abap_type_glosry.htm).
|
||||||
- Are not composed of of other data types.
|
- Are not composed of of other data types.
|
||||||
- Are types for holding numeric values, text information, binary data and special types for date and time.
|
- Are types for holding numeric values, text information, binary data and special types for date and time.
|
||||||
- Are further divided into elementary types of fixed and variable length.
|
- Are further divided into elementary types of fixed and variable length.
|
||||||
@@ -82,7 +82,7 @@ For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu
|
|||||||
> - 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.
|
> - 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.
|
||||||
> - `decfloat16` and `decfloat34` for decimal floating point numbers can be regarded as more modern versions of `p` and `f`, combining their advantages.
|
> - `decfloat16` and `decfloat34` for decimal floating point numbers can be regarded as more modern versions of `p` and `f`, combining their advantages.
|
||||||
> - Although they are character-like, `t` and `d` can be used for calculations.
|
> - Although they are character-like, `t` and `d` can be used for calculations.
|
||||||
> - See the ABAP Keyword Documentation [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuilt_in_types.htm) for more information about the initial values of the data types, how long they can be, and so on.
|
> - See the ABAP Keyword Documentation [here](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuilt_in_types.htm) for more information about the initial values of the data types, the standard length, and so on.
|
||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ For an overview, see the [ABAP Type Hierarchy](https://help.sap.com/doc/abapdocu
|
|||||||
### Declaring Data Types
|
### Declaring Data Types
|
||||||
|
|
||||||
Data types are defined in an ABAP program using the [`TYPES`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaptypes.htm) statement. Depending on the declaration context, the types can be accessed either locally or globally. As mentioned, data types can also be declared in the ABAP Dictionary. The focus here is on data type declarations in ABAP programs using `TYPES` statements.
|
Data types are defined in an ABAP program using the [`TYPES`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abaptypes.htm) statement. Depending on the declaration context, the types can be accessed either locally or globally. As mentioned, data types can also be declared in the ABAP Dictionary. The focus here is on data type declarations in ABAP programs using `TYPES` statements.
|
||||||
You can use built-in and user-defined data types can be used to create data types (and data objects).
|
You can use built-in and user-defined data types to create data types (and data objects).
|
||||||
|
|
||||||
The following code snippet shows various syntax options for declaring data types:
|
The following code snippet shows various syntax options for declaring data types:
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ TYPES: te_c5 TYPE c LENGTH 5,
|
|||||||
te_str TYPE string.
|
te_str TYPE string.
|
||||||
|
|
||||||
"Byte-like types
|
"Byte-like types
|
||||||
TYPES te_do_string TYPE x LENGTH 2.
|
TYPES te_x_l2 TYPE x LENGTH 2.
|
||||||
TYPES te_xstr TYPE xstring.
|
TYPES te_xstr TYPE xstring.
|
||||||
|
|
||||||
"Types for date and time
|
"Types for date and time
|
||||||
@@ -260,7 +260,7 @@ TYPES ts_ddic_tab TYPE zdemo_abap_carr.
|
|||||||
"Internal table type based on internal type that exists in a gloabl interface
|
"Internal table type based on internal type that exists in a gloabl interface
|
||||||
TYPES tt_tab_type_from_itf TYPE zdemo_abap_get_data_itf=>carr_tab.
|
TYPES tt_tab_type_from_itf TYPE zdemo_abap_get_data_itf=>carr_tab.
|
||||||
|
|
||||||
"Internal table types with an elementary line type based globally available types
|
"Internal table types with an elementary line type based on globally available types
|
||||||
"Elementary table type
|
"Elementary table type
|
||||||
TYPES tt_strtab TYPE string_table.
|
TYPES tt_strtab TYPE string_table.
|
||||||
"Elementary line type; the type is available in a global interface
|
"Elementary line type; the type is available in a global interface
|
||||||
@@ -433,7 +433,7 @@ DATA struc_like_line LIKE LINE OF itab_ddic_tab.
|
|||||||
|
|
||||||
|
|
||||||
> **💡 Note**<br>
|
> **💡 Note**<br>
|
||||||
> The above data objects are declared by assigning a dedicated name. These data objects can be addressed by taht 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.
|
> 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).
|
||||||
|
|
||||||
|
|
||||||
Data reference variables:
|
Data reference variables:
|
||||||
@@ -444,7 +444,7 @@ DATA dref_int TYPE REF TO i.
|
|||||||
DATA dref_str TYPE REF TO string.
|
DATA dref_str TYPE REF TO string.
|
||||||
DATA dref_ddic_tab TYPE REF TO zdemo_abap_carr.
|
DATA dref_ddic_tab TYPE REF TO zdemo_abap_carr.
|
||||||
"Using a generic type as static type
|
"Using a generic type as static type
|
||||||
DATA dref_8_dataa TYPE REF TO data.
|
DATA dref_data TYPE REF TO data.
|
||||||
|
|
||||||
"Referring to an existing reference type
|
"Referring to an existing reference type
|
||||||
TYPES tr_int TYPE REF TO i.
|
TYPES tr_int TYPE REF TO i.
|
||||||
@@ -574,8 +574,8 @@ An [inline declaration](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-
|
|||||||
|
|
||||||
> **💡 Note**<br>
|
> **💡 Note**<br>
|
||||||
> - 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 date type of the variable is determined by the operand type. It must be possible to derive this type completely statically.
|
> - 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 date 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_position_glosry.htm).
|
> - 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 shon below.
|
> - 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.
|
||||||
> - [Programming guidelines for inline declarations (F1 for Standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abendeclaration_inline_guidl.htm)
|
> - [Programming guidelines for inline declarations (F1 for Standard ABAP)](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abendeclaration_inline_guidl.htm)
|
||||||
|
|
||||||
|
|
||||||
@@ -663,13 +663,13 @@ SELECT * FROM zdemo_abap_carr INTO TABLE @DATA(itab_b3).
|
|||||||
|
|
||||||
### Assigning References to Data Reference Variables
|
### Assigning References to Data Reference Variables
|
||||||
|
|
||||||
- As with other data objects and types, there are special assignment rules for [data reference variable](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_reference_variable_glosry.htm). See the ABAP Keyword Documentation.
|
- As with other data objects and types, there are [special assignment rules](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconversion_references.htm) for [data reference variable](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendata_reference_variable_glosry.htm). See the ABAP Keyword Documentation.
|
||||||
- An initial reference variable contains the [null reference](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abennull_reference_glosry.htm), which does not point to any objects. This means that it has neither a data type nor a class as a [dynamic type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendynamic_type_glosry.htm).
|
- An initial reference variable contains the [null reference](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abennull_reference_glosry.htm), which does not point to any objects. This means that it has neither a data type nor a class as a [dynamic type](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendynamic_type_glosry.htm).
|
||||||
- The concepts of [upcast](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenup_cast_glosry.htm) and [downcast](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendown_cast_glosry.htm) enter the picture here. For more information, see the ABAP Keyword Documentation and the following code snippet.
|
- The concepts of [upcast](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenup_cast_glosry.htm) and [downcast](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abendown_cast_glosry.htm) enter the picture here. See the following code snippet.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"Declaring data reference variables with static types
|
"Declaring data reference variables with static types
|
||||||
"At this stage, initial references variables contains null references.
|
"At this stage, initial references variables contain null references.
|
||||||
DATA dref_1_i TYPE REF TO i.
|
DATA dref_1_i TYPE REF TO i.
|
||||||
DATA dref_2_str TYPE REF TO string.
|
DATA dref_2_str TYPE REF TO string.
|
||||||
"Generic type as static type
|
"Generic type as static type
|
||||||
@@ -974,7 +974,8 @@ DATA: BEGIN OF struc_a,
|
|||||||
"Complete: Non-generic data type
|
"Complete: Non-generic data type
|
||||||
"Generic:
|
"Generic:
|
||||||
"- Data type that does not set all properties of a data object.
|
"- Data type that does not set all properties of a data object.
|
||||||
"- Can only be used for the typing of formal parameters and field symbols.
|
"- Can only be used for the typing of formal parameters and field symbols, except for
|
||||||
|
" data reference variables using the generic type 'data'.
|
||||||
|
|
||||||
"Complete data type
|
"Complete data type
|
||||||
DATA do_d_i TYPE i.
|
DATA do_d_i TYPE i.
|
||||||
@@ -1052,7 +1053,6 @@ DATA do_j_i TYPE i VALUE 3.
|
|||||||
DATA do_k_str TYPE string VALUE `hallo`.
|
DATA do_k_str TYPE string VALUE `hallo`.
|
||||||
|
|
||||||
"Dynamic types
|
"Dynamic types
|
||||||
"Set a break point here and check the Variables tab in ADT how the value and the information changes.
|
|
||||||
dref_a_i = REF #( do_j_i ). "Only type i possible; the dynamic type is the same
|
dref_a_i = REF #( do_j_i ). "Only type i possible; the dynamic type is the same
|
||||||
|
|
||||||
"The dynamic type is more special than the static type (which is the generic type data in this case)
|
"The dynamic type is more special than the static type (which is the generic type data in this case)
|
||||||
@@ -1074,7 +1074,7 @@ dref_b_data = REF #( dref_a_i ).
|
|||||||
"- Structures that do not contain any deep components are flat structures. Structures that contain
|
"- Structures that do not contain any deep components are flat structures. Structures that contain
|
||||||
" at least one deep component are deep structures.
|
" at least one deep component are deep structures.
|
||||||
|
|
||||||
"Flat data object
|
"Flat elementary data object
|
||||||
DATA do_l_i TYPE i.
|
DATA do_l_i TYPE i.
|
||||||
|
|
||||||
"Flat structure
|
"Flat structure
|
||||||
@@ -1083,7 +1083,7 @@ DATA: BEGIN OF struc_b_flat,
|
|||||||
comp2 TYPE c LENGTH 3,
|
comp2 TYPE c LENGTH 3,
|
||||||
END OF struc_b_flat.
|
END OF struc_b_flat.
|
||||||
|
|
||||||
"Deep data object
|
"Deep elementary data object
|
||||||
DATA do_m_str TYPE string.
|
DATA do_m_str TYPE string.
|
||||||
|
|
||||||
"Deep structure
|
"Deep structure
|
||||||
@@ -1106,7 +1106,7 @@ DATA do_n_i TYPE i.
|
|||||||
CONSTANTS con_b_str TYPE string VALUE `hi`.
|
CONSTANTS con_b_str TYPE string VALUE `hi`.
|
||||||
|
|
||||||
"Unnamed data objects
|
"Unnamed data objects
|
||||||
"Literal that is output. It is cannot be addressed via a dedicated name.
|
"Literal that is output. It cannot be addressed via a dedicated name.
|
||||||
output->display( `I'm a literal...` ).
|
output->display( `I'm a literal...` ).
|
||||||
|
|
||||||
"Anonymous data object created using the NEW operator
|
"Anonymous data object created using the NEW operator
|
||||||
@@ -1137,7 +1137,7 @@ The declaration context of data types (and objects) determines the validity and
|
|||||||
- Declarations in the ABAP Dictionary, which is a special storage for the declarations of data types that are visible in all repository objects, provided that the [package](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenpackage_glosry.htm) check allows this.
|
- Declarations in the ABAP Dictionary, which is a special storage for the declarations of data types that are visible in all repository objects, provided that the [package](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenpackage_glosry.htm) check allows this.
|
||||||
- The data types of the ABAP Dictionary are not declared with the `TYPES` statement, but using ADT tools (and/or SAP GUI tools in systems where SAP GUI is available).
|
- The data types of the ABAP Dictionary are not declared with the `TYPES` statement, but using ADT tools (and/or SAP GUI tools in systems where SAP GUI is available).
|
||||||
- The DDIC has many more [built-in types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuiltin_ddic_type_glosry.htm) than ABAP. These types have other names. They cannot be used in ABAP programs.
|
- The DDIC has many more [built-in types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbuiltin_ddic_type_glosry.htm) than ABAP. These types have other names. They cannot be used in ABAP programs.
|
||||||
- The DDIC provides many options for defining types, including elementary data types (defined as data elements), reference types, complex types such as structured types and table types. Note that the name of a database table or a view can be used in type declarations to address the line type of these repository objects (for example, a structure: `DATA a TYPE some_db_table.).
|
- The DDIC provides many options for defining types, including elementary data types (defined as data elements), reference types, complex types such as structured types and table types. Note that the name of a database table or a view can be used in type declarations to address the line type of these repository objects (for example, a structure: `DATA a TYPE some_db_table.`).
|
||||||
- Note the following trap: Local declarations hide global declarations of the same name.
|
- Note the following trap: Local declarations hide global declarations of the same name.
|
||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ CLASS zcl_demo_abap_amdp IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `Demo: ABAP AMDP` ).
|
output->display( `ABAP Cheat Sheet Example: ABAP AMDP` ).
|
||||||
|
|
||||||
output->display( `1. AMDP procedure` ).
|
output->display( `1. AMDP procedure` ).
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ CLASS zcl_demo_abap_cds_ve IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP cheat sheet: CDS view entities` ).
|
output->display( `ABAP Cheat Sheet Example: CDS view entities` ).
|
||||||
|
|
||||||
output->display( `1) Operands, expressions and built-in functions ` &&
|
output->display( `1) Operands, expressions and built-in functions ` &&
|
||||||
`in a CDS view entity` ).
|
`in a CDS view entity` ).
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ CLASS zcl_demo_abap_constructor_expr IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP cheat sheet: Constructor expressions` ).
|
output->display( `ABAP Cheat Sheet Example: Constructor expressions` ).
|
||||||
|
|
||||||
output->next_section( `VALUE` ).
|
output->next_section( `VALUE` ).
|
||||||
output->display( `1) Structures: Populating a flat structure` ).
|
output->display( `1) Structures: Populating a flat structure` ).
|
||||||
@@ -341,9 +341,9 @@ CLASS zcl_demo_abap_constructor_expr IMPLEMENTATION.
|
|||||||
END OF substruc,
|
END OF substruc,
|
||||||
END OF deep_struc_ty.
|
END OF deep_struc_ty.
|
||||||
|
|
||||||
DATA(deep_struc) = VALUE deep_struc_ty( num = 1 char1 = 'aaa'
|
DATA(deep_struc) = VALUE deep_struc_ty( num = 1
|
||||||
|
char1 = 'aaa'
|
||||||
substruc = VALUE #( int = 123 str = `hallo` ) ).
|
substruc = VALUE #( int = 123 str = `hallo` ) ).
|
||||||
|
|
||||||
output->display( input = deep_struc name = `deep_struc` ).
|
output->display( input = deep_struc name = `deep_struc` ).
|
||||||
|
|
||||||
@@ -1335,6 +1335,8 @@ CLASS zcl_demo_abap_constructor_expr IMPLEMENTATION.
|
|||||||
|
|
||||||
output->display( input = str_tab name = `str_tab` ).
|
output->display( input = str_tab name = `str_tab` ).
|
||||||
|
|
||||||
|
**********************************************************************
|
||||||
|
|
||||||
output->next_section( `42) LET Expressions (2)` ).
|
output->next_section( `42) LET Expressions (2)` ).
|
||||||
|
|
||||||
"2) LET within a constructor expression with COND: 12 o'clock is
|
"2) LET within a constructor expression with COND: 12 o'clock is
|
||||||
@@ -1354,6 +1356,8 @@ CLASS zcl_demo_abap_constructor_expr IMPLEMENTATION.
|
|||||||
|
|
||||||
output->display( input = time name = `time` ).
|
output->display( input = time name = `time` ).
|
||||||
|
|
||||||
|
**********************************************************************
|
||||||
|
|
||||||
output->next_section( `43) LET Expressions (3)` ).
|
output->next_section( `43) LET Expressions (3)` ).
|
||||||
|
|
||||||
"3) An internal table that includes three components is created and
|
"3) An internal table that includes three components is created and
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
* code.
|
* code.
|
||||||
*
|
*
|
||||||
***********************************************************************
|
***********************************************************************
|
||||||
"! <p class="shorttext synchronized">ABAP cheat sheets: Data types and data objects</p>
|
"! <p class="shorttext synchronized">ABAP cheat sheet: Data types and data objects</p>
|
||||||
"! Example to demonstrate data types and data objects in ABAP.<br>Choose F9 in ADT to run the class.
|
"! Example to demonstrate data types and data objects in ABAP.<br>Choose F9 in ADT to run the class.
|
||||||
CLASS zcl_demo_abap_dtype_dobj DEFINITION
|
CLASS zcl_demo_abap_dtype_dobj DEFINITION
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@@ -91,8 +91,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
" CDS entity, which is not covered in this demo example.
|
" CDS entity, which is not covered in this demo example.
|
||||||
"- In ADT and because of the many type declarations, you may want to press
|
"- In ADT and because of the many type declarations, you may want to press
|
||||||
" F2 on the types to get more information.
|
" F2 on the types to get more information.
|
||||||
"- The examples show a selection. For more information, chheck out the
|
"- The examples show a selection.
|
||||||
" ABAP Keyword Documentation.
|
|
||||||
"- Only non-generic types can be used.
|
"- Only non-generic types can be used.
|
||||||
|
|
||||||
output->display( `1) Declaring data types based on elementary types` ).
|
output->display( `1) Declaring data types based on elementary types` ).
|
||||||
@@ -760,7 +759,6 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
"- Must always be performed explicitly using the casting operator ?= and the casting
|
"- Must always be performed explicitly using the casting operator ?= and the casting
|
||||||
" operator CAST.
|
" operator CAST.
|
||||||
|
|
||||||
|
|
||||||
"The following example would result in a syntax error due to type incompatibility.
|
"The following example would result in a syntax error due to type incompatibility.
|
||||||
"dref_1_i = dref_3_data.
|
"dref_1_i = dref_3_data.
|
||||||
|
|
||||||
@@ -775,7 +773,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
dref_1_i = CAST #( dref_3_data ).
|
dref_1_i = CAST #( dref_3_data ).
|
||||||
|
|
||||||
"If not caught, the following would result in a runtime error.
|
"If not caught, the following would result in a runtime error.
|
||||||
"dref_3_data points to a reference of type i, the static type is dref_2_str is string.
|
"dref_3_data points to a reference of type i, the static type of dref_2_str is string.
|
||||||
"So, the downcast does not work.
|
"So, the downcast does not work.
|
||||||
TRY.
|
TRY.
|
||||||
dref_2_str = CAST #( dref_3_data ).
|
dref_2_str = CAST #( dref_3_data ).
|
||||||
@@ -973,7 +971,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `1) Character strings and text field strings` ).
|
output->display( `12) Character strings and text field strings` ).
|
||||||
|
|
||||||
"The following example shows the difference between text field strings
|
"The following example shows the difference between text field strings
|
||||||
"of type c and character strings of type string when it comes to trailing
|
"of type c and character strings of type string when it comes to trailing
|
||||||
@@ -990,7 +988,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `12) Floating point numbers` ).
|
output->display( `13) Floating point numbers` ).
|
||||||
|
|
||||||
"The following example shows the difference between binary and decimal
|
"The following example shows the difference between binary and decimal
|
||||||
"floating point numbers.
|
"floating point numbers.
|
||||||
@@ -1005,9 +1003,9 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `13) Byte-like types` ).
|
output->display( `14) Byte-like types` ).
|
||||||
|
|
||||||
"The following example shows byte-like types x and xstring..
|
"The following example shows byte-like types x and xstring.
|
||||||
|
|
||||||
"A byte string is filled with binary data created from a string
|
"A byte string is filled with binary data created from a string
|
||||||
"using the convert_out method of the cl_abap_codepage class.
|
"using the convert_out method of the cl_abap_codepage class.
|
||||||
@@ -1058,7 +1056,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `14) Date and time` ).
|
output->display( `15) Date and time` ).
|
||||||
|
|
||||||
"In the example, date and time fields are assigned the current values
|
"In the example, date and time fields are assigned the current values
|
||||||
"using the cl_abap_context_info class. Calculations follow. The date of next
|
"using the cl_abap_context_info class. Calculations follow. The date of next
|
||||||
@@ -1093,7 +1091,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `15) Type conversion rules` ).
|
output->display( `16) Type conversion rules` ).
|
||||||
|
|
||||||
"The purpose of this example is to emphasize the conversion rules
|
"The purpose of this example is to emphasize the conversion rules
|
||||||
"that should be noted when performing conversions.
|
"that should be noted when performing conversions.
|
||||||
@@ -1248,7 +1246,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `16) Excursion: RTTI` ).
|
output->display( `17) Excursion: RTTI` ).
|
||||||
|
|
||||||
"Using RTTI to check type compatibility
|
"Using RTTI to check type compatibility
|
||||||
"In the following example the applies_to_data method of the RTTI class
|
"In the following example the applies_to_data method of the RTTI class
|
||||||
@@ -1316,7 +1314,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `17) Constants and immutable variables` ).
|
output->display( `18) Constants and immutable variables` ).
|
||||||
|
|
||||||
"As mentioned above, constants cannot be changed at runtime.
|
"As mentioned above, constants cannot be changed at runtime.
|
||||||
CONSTANTS con_str TYPE string VALUE `hallo`.
|
CONSTANTS con_str TYPE string VALUE `hallo`.
|
||||||
@@ -1356,7 +1354,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `18) Various ABAP glossary terms on data types and objects in a nutshell` ).
|
output->display( `19) Various ABAP glossary terms on data types and objects in a nutshell` ).
|
||||||
|
|
||||||
"Standalone and bound data types
|
"Standalone and bound data types
|
||||||
"Standalone: Data type that is defined using the statement TYPES in an ABAP program, as
|
"Standalone: Data type that is defined using the statement TYPES in an ABAP program, as
|
||||||
@@ -1570,7 +1568,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `19) Generic ABAP types for formal parameters of methods` ).
|
output->display( `20) Generic ABAP types for formal parameters of methods` ).
|
||||||
|
|
||||||
"Generic data types have already been covered above.
|
"Generic data types have already been covered above.
|
||||||
"A generic data type is an incomplete type specification that covers multiple
|
"A generic data type is an incomplete type specification that covers multiple
|
||||||
@@ -1615,7 +1613,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `20) Built-in data objects` ).
|
output->display( `21) Built-in data objects` ).
|
||||||
|
|
||||||
"This example demonstrates the availability of built-in data objects in ABAP..
|
"This example demonstrates the availability of built-in data objects in ABAP..
|
||||||
|
|
||||||
@@ -1697,7 +1695,7 @@ CLASS zcl_demo_abap_dtype_dobj IMPLEMENTATION.
|
|||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
output->display( `21) Declaration context` ).
|
output->display( `22) Declaration context` ).
|
||||||
|
|
||||||
"The declaration context of data objects can be problematic.
|
"The declaration context of data objects can be problematic.
|
||||||
"The example deals with local declarations and control structures.
|
"The example deals with local declarations and control structures.
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ CLASS zcl_demo_abap_dynamic_prog IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP Cheat Sheet: Dynamic Programming` ).
|
output->display( `ABAP Cheat Sheet Example: Dynamic Programming` ).
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
@@ -953,7 +953,7 @@ CLASS zcl_demo_abap_dynamic_prog IMPLEMENTATION.
|
|||||||
* "If the value is 0, the memory area of the entire structure is assigned to the field symbol.
|
* "If the value is 0, the memory area of the entire structure is assigned to the field symbol.
|
||||||
* ASSIGN wa-(0) TO FIELD-SYMBOL(<fs_m10>).
|
* ASSIGN wa-(0) TO FIELD-SYMBOL(<fs_m10>).
|
||||||
|
|
||||||
"The above statements replace the following syntax syntax
|
"The above statements replace the following syntax
|
||||||
ASSIGN COMPONENT 'CARRID' OF STRUCTURE wa TO FIELD-SYMBOL(<fs_m11>).
|
ASSIGN COMPONENT 'CARRID' OF STRUCTURE wa TO FIELD-SYMBOL(<fs_m11>).
|
||||||
|
|
||||||
ASSIGN COMPONENT 5 OF STRUCTURE wa TO FIELD-SYMBOL(<fs_m12>).
|
ASSIGN COMPONENT 5 OF STRUCTURE wa TO FIELD-SYMBOL(<fs_m12>).
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ CLASS ZCL_DEMO_ABAP_INTERNAL_TABLES IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `Demo: Working with Internal Tables` ).
|
output->display( `ABAP Cheat Sheet Example: Working with Internal Tables` ).
|
||||||
output->display( `Filling and Copying Internal Table Content` ).
|
output->display( `Filling and Copying Internal Table Content` ).
|
||||||
output->display( `1) Adding single lines using APPEND/INSERT` ).
|
output->display( `1) Adding single lines using APPEND/INSERT` ).
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ CLASS zcl_demo_abap_objects IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `Demo: ABAP Object Orientation` ).
|
output->display( `ABAP Cheat Sheet Example: ABAP Object Orientation` ).
|
||||||
output->display( `Working with objects and components` ).
|
output->display( `Working with objects and components` ).
|
||||||
output->display( `1) Declaring reference variables` ).
|
output->display( `1) Declaring reference variables` ).
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ CLASS zcl_demo_abap_prog_flow_logic IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP Cheat Sheet Demonstration Example: Program Flow Logic` ).
|
output->display( `ABAP Cheat Sheet Example: Program Flow Logic` ).
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ CLASS ZCL_DEMO_ABAP_RAP_DRAFT_LN_M IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `RAP Demo: RAP Calculator Using Managed, ` &&
|
output->display( `ABAP Cheat Sheet Example: RAP Calculator Using Managed, ` &&
|
||||||
`Draft-Enabled RAP BO (Late Numbering)` ).
|
`Draft-Enabled RAP BO (Late Numbering)` ).
|
||||||
output->display( `1) Creating Instances and ` &&
|
output->display( `1) Creating Instances and ` &&
|
||||||
`Saving to the database` ).
|
`Saving to the database` ).
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ CLASS ZCL_DEMO_ABAP_RAP_EXT_NUM_M IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `RAP Demo: RAP BO Operations Using a Managed ` &&
|
output->display( `ABAP Cheat Sheet Example: RAP BO Operations Using a Managed ` &&
|
||||||
`RAP BO` ).
|
`RAP BO` ).
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ CLASS zcl_demo_abap_rap_ext_num_u IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `RAP Demo: RAP BO Operations Using an ` &&
|
output->display( `ABAP Cheat Sheet Example: RAP BO Operations Using an ` &&
|
||||||
`Unmanaged RAP BO (External Numbering)` ).
|
`Unmanaged RAP BO (External Numbering)` ).
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ CLASS zcl_demo_abap_sql IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP Cheat Sheet: ABAP SQL in Use` ).
|
output->display( `ABAP Cheat Sheet Example: ABAP SQL in Use` ).
|
||||||
output->display( `Using SELECT for multiple purposes` ).
|
output->display( `Using SELECT for multiple purposes` ).
|
||||||
output->display( `1) Reading a single row from database table ` &&
|
output->display( `1) Reading a single row from database table ` &&
|
||||||
`into a structure` ).
|
`into a structure` ).
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ CLASS zcl_demo_abap_sql_group_by IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `Demo: Grouping Internal Tables` ).
|
output->display( `ABAP Cheat Sheet Example: Grouping Internal Tables` ).
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM zdemo_abap_flsch
|
FROM zdemo_abap_flsch
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ CLASS zcl_demo_abap_string_proc IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP Cheat Sheet Demo Example: String Processing` ).
|
output->display( `ABAP Cheat Sheet Example: String Processing` ).
|
||||||
output->display( `1) Creating Strings and Assigning Values` ).
|
output->display( `1) Creating Strings and Assigning Values` ).
|
||||||
|
|
||||||
"Data object declarations providing default values
|
"Data object declarations providing default values
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ CLASS zcl_demo_abap_structures IMPLEMENTATION.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP Cheat Sheet Demonstration Example: Working with Structures` ).
|
output->display( `ABAP Cheat Sheet Example: Working with Structures` ).
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ METHOD if_oo_adt_classrun~main.
|
|||||||
|
|
||||||
DATA(output) = NEW zcl_demo_abap_display( out ).
|
DATA(output) = NEW zcl_demo_abap_display( out ).
|
||||||
|
|
||||||
output->display( `ABAP Cheat Sheet Demonstration Example: ABAP Unit Tests` ).
|
output->display( `ABAP Cheat Sheet Example: ABAP Unit Tests` ).
|
||||||
output->display( `1) get_sum Method` ).
|
output->display( `1) get_sum Method` ).
|
||||||
"This method demonstrates the use of the setup and teardown methods in the test class.
|
"This method demonstrates the use of the setup and teardown methods in the test class.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user