From 455025e0331eb1f63b7140965b8db5d7a607f888 Mon Sep 17 00:00:00 2001 From: danrega <16720986+danrega@users.noreply.github.com> Date: Fri, 3 May 2024 16:33:59 +0200 Subject: [PATCH] Update --- 01_Internal_Tables.md | 12 +++ 02_Structures.md | 19 +++- 05_Constructor_Expressions.md | 194 ++++++++++++++++++++++++++-------- 06_Dynamic_Programming.md | 35 +++--- 07_String_Processing.md | 16 ++- 08_EML_ABAP_for_RAP.md | 153 +++++++++++++++++++++++++++ 13_Program_Flow_Logic.md | 6 +- 16_Data_Types_and_Objects.md | 17 ++- 21_XML_JSON.md | 8 +- README.md | 2 +- 10 files changed, 386 insertions(+), 76 deletions(-) diff --git a/01_Internal_Tables.md b/01_Internal_Tables.md index d2f4dc1..88aaa43 100644 --- a/01_Internal_Tables.md +++ b/01_Internal_Tables.md @@ -29,6 +29,7 @@ - [Improving Read Performance with Secondary Table Keys](#improving-read-performance-with-secondary-table-keys) - [Searching and Replacing Substrings in Internal Tables with Character-Like Data Types](#searching-and-replacing-substrings-in-internal-tables-with-character-like-data-types) - [Ranges Tables](#ranges-tables) + - [Getting Table Type Information and Creating Internal Tables at Runtime](#getting-table-type-information-and-creating-internal-tables-at-runtime) - [More Information](#more-information) - [Executable Example](#executable-example) @@ -1708,6 +1709,17 @@ SELECT * FROM @inttab AS tab
+### Getting Table Type Information and Creating Internal Tables at Runtime + +Using [Runtime Type Services (RTTS)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrun_time_type_services_glosry.htm "Glossary Entry") +you can ... +- get type information on data objects, data types or [instances](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeninstance_glosry.htm "Glossary Entry") at runtime ([Runtime Type Identification (RTTI)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrun_time_type_identific_glosry.htm "Glossary Entry")). +- define and create new data 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 ([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")). + +For more information, see the [Dynamic Programming](06_Dynamic_Programming.md) cheat sheet. + + + ## More Information Topic [Internal Tables](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenitab.htm) in the ABAP Keyword Documentation. diff --git a/02_Structures.md b/02_Structures.md index 199f2ed..9be8d3f 100644 --- a/02_Structures.md +++ b/02_Structures.md @@ -13,7 +13,9 @@ - [Using the CORRESPONDING Operator and MOVE-CORRESPONDING Statements](#using-the-corresponding-operator-and-move-corresponding-statements) - [Clearing Structures](#clearing-structures) - [Processing Structures](#processing-structures) - - [Excursion: Including Structures](#excursion-including-structures) + - [Excursions](#excursions) + - [Including Structures](#including-structures) + - [Getting Structured Type Information and Creating Structures at Runtime](#getting-structured-type-information-and-creating-structures-at-runtime) - [Executable Example](#executable-example) ## Introduction @@ -670,7 +672,9 @@ MODIFY TABLE itab FROM struc. -## Excursion: Including Structures +## Excursions + +### Including Structures - [`INCLUDE TYPE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapinclude_type.htm) and [`INCLUDE STRUCTURE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapinclude_type.htm) statements @@ -710,9 +714,20 @@ TYPES BEGIN OF address_type. TYPES END OF address_type. ``` + + +### Getting Structured Type Information and Creating Structures at Runtime + +Using [Runtime Type Services (RTTS)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrun_time_type_services_glosry.htm "Glossary Entry") +you can ... +- get type information on data objects, data types or [instances](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeninstance_glosry.htm "Glossary Entry") at runtime ([Runtime Type Identification (RTTI)](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenrun_time_type_identific_glosry.htm "Glossary Entry")). +- define and create new data 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 ([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")). + +For more information, see the [Dynamic Programming](06_Dynamic_Programming.md) cheat sheet. + ## Executable Example [zcl_demo_abap_structures](./src/zcl_demo_abap_structures.clas.abap) diff --git a/05_Constructor_Expressions.md b/05_Constructor_Expressions.md index 94602bc..f8bbd68 100644 --- a/05_Constructor_Expressions.md +++ b/05_Constructor_Expressions.md @@ -1126,68 +1126,176 @@ ENDCASE. ## FILTER - 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`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expression_filter.htm) 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). - The lines for the new internal table are taken from an - existing internal table based on conditions specified in a `WHERE` clause. Note that the table type of the existing internal table must be convertible to the specified target type. + existing internal table based on conditions specified in a `WHERE` condition. Note that the table type of the existing internal table must be convertible to the specified target type. - The conditions can either be based on single values or a [filter table](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expr_filter_table.htm). -- Additions: - -|Addition |Details | -|---|---| -|`USING KEY` | Specifies the [table key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abentable_key_glosry.htm "Glossary Entry") with which the `WHERE` condition is evaluated: either a [sorted key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensorted_key_glosry.htm "Glossary Entry") or a [hash key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhash_key_glosry.htm "Glossary Entry"). If the internal table has neither of them, a [secondary table key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensecondary_table_key_glosry.htm "Glossary Entry") must be available for the internal table which must then be specified after `USING KEY`. | -| `EXCEPT` | The specification of `EXCEPT` means that those lines of the existing table are used that do not meet the condition specified in the `WHERE` clause. Hence, if `EXCEPT` is not specified, the lines of the existing table are used that meet the condition. | +- The source table must have at least one [sorted key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensorted_key_glosry.htm "Glossary Entry") or a [hash key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenhash_key_glosry.htm "Glossary Entry") for accessing. If the table does not have such a primary table key, a [secondary table key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abensecondary_table_key_glosry.htm "Glossary Entry") must be available. +- Syntax options for the using the table key (i.e. specifying its components): + - Using the [primary table key](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenprimary_table_key_glosry.htm) without the `USING KEY` addition + - Using the default name `primary_key` for the primary key with `USING KEY` + - Using the secondary table key with `USING KEY` +- Notes on the `WHERE` condition: + - The conditions for the table key components can be specified as follows: + - Hash keys: Only the comparison operator `=` is allowed + - Sorted key: `=`/`EQ`, `<>`/`NE`, `<`/`LT`, `>`/`GT`, `<=`/`LE`, `>=`/`GE` + - Multiple comparisons can be combined using `AND`; boolean operators such as `NOT` or `OR` cannot be specified. +- Notes on the filter table: + - The line types of the source and filter table need not be identical. + - Refer to the [documentation](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expr_filter_table.htm) for all syntax options. For example, depending on where `USING KEY` is specified, the table key is specified for the source or filter table for the access. +- Notes on the `EXCEPT` addition: The specification of `EXCEPT` means that those lines of the table are used that do not meet the condition specified in the `WHERE` condition. Therefore, if `EXCEPT` is not specified, the lines of the table are used that meet the condition. Examples: ```abap -"FILTER and conditions based on single values -"Assumption the component num is of type i. -DATA itab1 TYPE SORTED TABLE OF struc WITH NON-UNIQUE KEY num. -DATA itab2 TYPE STANDARD TABLE OF struc WITH NON-UNIQUE SORTED KEY sec_key COMPONENTS num. -DATA itab3 TYPE HASHED TABLE OF struc WITH UNIQUE KEY num. + "Internal tables to work with in the example + TYPES: BEGIN OF fi_str, + a TYPE i, + b TYPE c LENGTH 3, + c TYPE c LENGTH 3, + END OF fi_str. -"The lines meeting the condition are respected. -"Note: The source table must have at least one sorted or hashed key. -"Here, the primary key is used -DATA(f1) = FILTER #( itab1 WHERE num >= 3 ). + DATA fi_tab1 TYPE SORTED TABLE OF fi_str WITH NON-UNIQUE KEY a. + DATA fi_tab2 TYPE STANDARD TABLE OF fi_str WITH NON-UNIQUE SORTED KEY sec_key COMPONENTS a. + DATA fi_tab3 TYPE HASHED TABLE OF fi_str WITH UNIQUE KEY a. + DATA fi_tab4 TYPE STANDARD TABLE OF fi_str WITH UNIQUE HASHED KEY sec_hash_key COMPONENTS a b. -"USING KEY primary_key explicitly specified; same as above -DATA(f2) = FILTER #( itab1 USING KEY primary_key WHERE num >= 3 ). + "Populating internal tables with demo data + fi_tab1 = VALUE #( ( a = 1 b = 'aaa' c = 'abc' ) + ( a = 2 b = 'bbb' c = 'def' ) + ( a = 3 b = 'ccc' c = 'hij' ) + ( a = 4 b = 'ddd' c = 'klm' ) + ( a = 5 b = 'eee' c = 'nop' ) ). -"EXCEPT addition -DATA(f3) = FILTER #( itab1 EXCEPT WHERE num >= 3 ). -DATA(f4) = FILTER #( itab1 EXCEPT USING KEY primary_key WHERE num >= 3 ). + fi_tab2 = fi_tab1. + fi_tab3 = fi_tab1. + fi_tab4 = fi_tab1. -"Secondary table key specified after USING KEY -DATA(f5) = FILTER #( itab2 USING KEY sec_key WHERE num >= 4 ). -DATA(f6) = FILTER #( itab2 EXCEPT USING KEY sec_key WHERE num >= 3 ). + "---------------- Basic form: Filtering using single values ---------------- + "Syntax options for using a WHERE condition and the table key -"Note: In case of a hash key, exactly one comparison expression for each key component is allowed; -"only = as comparison operator possible. -DATA(f7) = FILTER #( itab3 WHERE num = 3 ). + "Using the primary table key without specifying USING KEY + DATA(f1) = FILTER #( fi_tab1 WHERE a >= 4 ). -"Using a filter table -"In the WHERE condition, the columns of source and filter table are compared. Those lines in the source table -"are used for which at least one line in the filter table meets the condition. EXCEPT and USING KEY are also possible. +*A B C +*4 ddd klm +*5 eee nop -DATA filter_tab1 TYPE SORTED TABLE OF i - WITH NON-UNIQUE KEY table_line. + "Using the primary table key by specifying the default name primary_key + "and specifying USING KEY; the result in the example is the same as above + DATA(f2) = FILTER #( fi_tab1 USING KEY primary_key WHERE a >= 4 ). -DATA filter_tab2 TYPE STANDARD TABLE OF i - WITH EMPTY KEY - WITH UNIQUE SORTED KEY line COMPONENTS table_line. +*A B C +*4 ddd klm +*5 eee nop -DATA(f8) = FILTER #( itab1 IN filter_tab1 WHERE num = table_line ). + "Using the secondary table key by specifying its name and USING KEY + DATA(f3) = FILTER #( fi_tab2 USING KEY sec_key WHERE a < 3 ). -"EXCEPT addition -DATA(f9) = FILTER #( itab1 EXCEPT IN filter_tab1 WHERE num = table_line ). +*A B C +*1 aaa abc +*2 bbb def -"USING KEY is specified for the filter table -DATA(f10) = FILTER #( itab2 IN filter_tab2 USING KEY line WHERE num = table_line ). + "Note: When using a table with hash key, only the comparison operator = + "can be used in the WHERE clause + "The example uses the primary table key, which is a hash key. + DATA(f4) = FILTER #( fi_tab3 WHERE a = 3 ). -"USING KEY is specified for the source table, including EXCEPT -DATA(f11) = FILTER #( itab2 USING KEY sec_key EXCEPT IN filter_tab2 WHERE num = table_line ). +*A B C +*3 ccc hij + + "The example table used in the following example has two components specified + "for the table key. The key must be specified in full listing all components + "and using AND. + DATA(f5) = FILTER #( fi_tab4 USING KEY sec_hash_key WHERE a = 3 AND b = 'ccc' ). + +*A B C +*3 ccc hij + + "Examples with the EXCEPT addition + DATA(f6) = FILTER #( fi_tab1 EXCEPT WHERE a >= 4 ). + +*A B C +*1 aaa abc +*2 bbb def +*3 ccc hij + + DATA(f7) = FILTER #( fi_tab1 EXCEPT USING KEY primary_key WHERE a >= 4 ). + +*A B C +*1 aaa abc +*2 bbb def +*3 ccc hij + + "Secondary table key specified after USING KEY + DATA(f8) = FILTER #( fi_tab2 USING KEY sec_key WHERE a <= 2 ). + +*A B C +*1 aaa abc +*2 bbb def + + DATA(f9) = FILTER #( fi_tab2 EXCEPT USING KEY sec_key WHERE a >= 4 ). + +*A B C +*1 aaa abc +*2 bbb def +*3 ccc hij + + DATA(f10) = FILTER #( fi_tab4 EXCEPT USING KEY sec_hash_key WHERE a = 3 AND b = 'ccc' ). + +*A B C +*1 aaa abc +*2 bbb def +*4 ddd klm +*5 eee nop + + "---------------- Basic form: Filtering using a filter table ---------------- + + "In the WHERE condition, the columns of source and filter table are compared. + "Those lines in the source table are used for which at least one line in the + "filter table meets the condition. EXCEPT and USING KEY are also possible. + "The following examples use simple tables with elementary line types. Note + "that the line types of the tables in a FILTER epxression need not be identical. + "Declaring and filling filter tables + DATA filter_tab1 TYPE SORTED TABLE OF i WITH NON-UNIQUE KEY table_line. + + DATA filter_tab2 TYPE STANDARD TABLE OF i + WITH EMPTY KEY + WITH UNIQUE SORTED KEY line COMPONENTS table_line. + + filter_tab1 = VALUE #( ( 3 ) ( 5 ) ). + filter_tab2 = filter_tab1. + + "No further additions specified + DATA(f11) = FILTER #( fi_tab1 IN filter_tab1 WHERE a = table_line ). + +*A B C +*3 ccc hij +*5 eee nop + + "Specifying EXCEPT addition + DATA(f12) = FILTER #( fi_tab1 EXCEPT IN filter_tab1 WHERE a = table_line ). + +*A B C +*1 aaa abc +*2 bbb def +*4 ddd klm + + "Specifying USING KEY for the filter table + DATA(f13) = FILTER #( fi_tab2 IN filter_tab2 USING KEY line WHERE a = table_line ). + +*A B C +*3 ccc hij +*5 eee nop + + "Specifying USING KEY for the source table, including EXCEPT + DATA(f14) = FILTER #( fi_tab2 USING KEY sec_key EXCEPT IN filter_tab2 WHERE a = table_line ). + +*A B C +*1 aaa abc +*2 bbb def +*4 ddd klm ``` diff --git a/06_Dynamic_Programming.md b/06_Dynamic_Programming.md index f835329..58043f6 100644 --- a/06_Dynamic_Programming.md +++ b/06_Dynamic_Programming.md @@ -1091,23 +1091,22 @@ DATA(gen_comp) = CONV string(Hallo\n
Ciao!
Salut.
|. +> DATA(str_b) = str_a. +> +> REPLACE ALL OCCURRENCES OF PCRE `()(.*?)(<\/p>)` IN str_a WITH `$1Hi$3`. +> "
Hallo +> "
Hi
Hi
+> +> "Regular expression: any character or a new line with zero or more repretitions +> REPLACE ALL OCCURRENCES OF PCRE `()(.|\n)*?(<\/p>)` IN str_b WITH `$1Hi$3`. +> "
Hi
Hi
Hi
Anchors and Positions diff --git a/08_EML_ABAP_for_RAP.md b/08_EML_ABAP_for_RAP.md index 9f34149..c7c03b5 100644 --- a/08_EML_ABAP_for_RAP.md +++ b/08_EML_ABAP_for_RAP.md @@ -11,6 +11,7 @@ - [BDEF Derived Types](#bdef-derived-types) - [Components of BDEF Derived Types](#components-of-bdef-derived-types) - [Secondary Table Keys of BDEF Derived Types](#secondary-table-keys-of-bdef-derived-types) + - [Type Mapping for RAP](#type-mapping-for-rap) - [EML Syntax](#eml-syntax) - [EML Syntax for Modifying Operations](#eml-syntax-for-modifying-operations) - [EML Syntax for Reading Operations](#eml-syntax-for-reading-operations) @@ -884,6 +885,142 @@ DATA(line_e) = itab_cr[ KEY entity %key = VALUE #( key_field = 1 ) ]. +### Type Mapping for RAP + +**RAP-Specific Additions to the CORRESPONDING Operator** + +The [`CORRESPONDING`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenconstructor_expr_corresponding.htm) operator offers RAP-specific additions for handling type mappings related to BDEF derived types and other types. For more information, see the [ABAP Keyword Documentation topic](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapeml_type_mapping.htm). + +The following additions are available: +```abap +... CORRESPONDING ...( ... MAPPING FROM ENTITY ) ... +... CORRESPONDING ...( ... MAPPING TO ENTITY ) ... +... CORRESPONDING ...( ... USING CONTROL ) ... +... CORRESPONDING ...( ... MAPPING FROM ENTITY USING CONTROL ) ... +... CORRESPONDING ...( ... CHANGING CONTROL ) ... +``` + +For some additions, a mapping needs to be specified in the BDEF. For more information, see the +[ABAP Keyword Documentation topic](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenbdl_type_mapping.htm). + +The following example uses a BDEF derived type from the ABAP cheat sheets. It shows additions that do not require a type mapping to be specified. + +```abap +"BDEF derived type +DATA derived_type TYPE STRUCTURE FOR UPDATE zdemo_abap_rap_ro_m. + +"Other type +"For simplicity, the structure has the same component names +"and types to avoid further additions in the statement. +DATA: BEGIN OF some_other_type, + key_field TYPE i, + field1 TYPE c LENGTH 10, + field2 TYPE c LENGTH 10, + field3 TYPE i, + field4 TYPE i, + END OF some_other_type. + +derived_type = VALUE #( key_field = 1 + field1 = 'aaa' + field2 = 'bbb' + field3 = 2 + field4 = 3 + %control = VALUE #( key_field = if_abap_behv=>mk-on + field1 = if_abap_behv=>mk-off + field2 = if_abap_behv=>mk-on + field3 = if_abap_behv=>mk-on + field4 = if_abap_behv=>mk-off ) ). + +"-------------------- USING CONTROL addition -------------------- +"This addition respects the %control component of BDEF derived types, i.e. +"only those fields for which the %control field has been marked as enabled +"are respected by the mapping. A disabled %control field means that the +"mapping is not applied. + +"In the example, components are marked as disabled in %control. +"Consequently, the field values are not assigned, and the type-specific +"initial values are used. +some_other_type = CORRESPONDING #( derived_type USING CONTROL ). + +*KEY_FIELD FIELD1 FIELD2 FIELD3 FIELD4 +*1 bbb 2 0 + +"-------------------- CHANGING CONTROL addition -------------------- +"This variant fills the %control structure of a BDEF-derived type based on +"a non-BDEF-derived type that does not include control information. +"In the example, two components are not assigned (i.e. they remain initial). +"Consequently, when using the CORRESPONDING operator with CHANGING CONTROL, +"the %control values are marked as disabled, the others as enabled. + +some_other_type = VALUE #( key_field = 4 field1 = 'ccc' field4 = 5 ). + +derived_type = CORRESPONDING #( some_other_type CHANGING CONTROL ). + +*%CID_REF KEY_FIELD FIELD1 FIELD2 FIELD3 FIELD4 %CONTROL +* 4 ccc 0 5 KEY_FIELD FIELD1 FIELD2 FIELD3 FIELD4 +* 01 01 00 00 01 +``` + +**ABAP SQL Statements with BDEF Derived Types** + +The ABAP SQL statements `INSERT`, `UPDATE`, `MODIFY`, and `DELETE` offer the [`MAPPING FROM ENTITY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapmapping_from_entity.htmaddition) addition to handle BDEF derived types. + +```abap +"--------------- INSERT --------------- +"Populating a BDEF derived type +DATA cr_der_type TYPE STRUCTURE FOR CREATE zdemo_abap_rap_ro_m. +"%control is not relevant in this example +cr_der_type = VALUE #( key_field = 1 + field1 = 'aaa' + field2 = 'bbb' + field3 = 2 + field4 = 3 ). + +INSERT zdemo_abap_rapt1 FROM @cr_der_type MAPPING FROM ENTITY. + +*KEY_FIELD FIELD1 FIELD2 FIELD3 FIELD4 +*1 aaa bbb 2 3 + +"--------------- MODIFY --------------- +cr_der_type = VALUE #( BASE cr_der_type + field1 = 'YYY' + field2 = 'ZZZ' ). + +MODIFY zdemo_abap_rapt1 FROM @cr_der_type MAPPING FROM ENTITY. + +*KEY_FIELD FIELD1 FIELD2 FIELD3 FIELD4 +*1 YYY ZZZ 2 3 + +"--- UPDATE with the INDICATORS SET STRUCTURE %control addition --- +"Populating a BDEF derived type +"%control is relevant in this example. Some %control values are enabled, +"some are not. +cr_der_type = VALUE #( key_field = 1 + field1 = '###' + field2 = '...' + field3 = 100 + field4 = 200 + %control = VALUE #( key_field = if_abap_behv=>mk-on + field1 = if_abap_behv=>mk-on + field2 = if_abap_behv=>mk-off + field3 = if_abap_behv=>mk-off + field4 = if_abap_behv=>mk-on ) ). + +UPDATE zdemo_abap_rapt1 FROM @cr_der_type + INDICATORS SET STRUCTURE %control MAPPING FROM ENTITY. + +"--------------- DELETE --------------- +*KEY_FIELD FIELD1 FIELD2 FIELD3 FIELD4 +*1 ### ZZZ 2 200 + +DELETE zdemo_abap_rapt1 FROM @cr_der_type MAPPING FROM ENTITY. +``` + +> **💡 Note**