Update
This commit is contained in:
@@ -353,6 +353,8 @@ DATA itab_a5 TYPE string_table.
|
|||||||
DATA itab_a6 TYPE TABLE OF ls_loc WITH NON-UNIQUE KEY key_field.
|
DATA itab_a6 TYPE TABLE OF ls_loc WITH NON-UNIQUE KEY key_field.
|
||||||
|
|
||||||
"Internal table based on an already existing internal table using LIKE.
|
"Internal table based on an already existing internal table using LIKE.
|
||||||
|
"Here, an internal table is created containing internal tables of the
|
||||||
|
"type of itab_a6.
|
||||||
DATA itab_a7 LIKE TABLE OF itab_a6.
|
DATA itab_a7 LIKE TABLE OF itab_a6.
|
||||||
|
|
||||||
"Creating internal tables by inline declarations
|
"Creating internal tables by inline declarations
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ TYPES BEGIN OF struc_type.
|
|||||||
TYPES END OF struc_type.
|
TYPES END OF struc_type.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
- The simplest structures and structured types have [elementary](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenelementary_data_type_glosry.htm "Glossary Entry")
|
- The simplest structures and structured types have [elementary](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenelementary_data_type_glosry.htm "Glossary Entry")
|
||||||
components.
|
components.
|
||||||
- As mentioned above, the components can be of any type, i.e. they can be of structured types themselves, internal table types, or [reference types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreference_type_glosry.htm).
|
- As mentioned above, the components can be of any type, i.e. they can be of structured types themselves, internal table types, or [reference types](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreference_type_glosry.htm).
|
||||||
@@ -345,9 +344,7 @@ TYPES: BEGIN OF addr_struc,
|
|||||||
DATA address TYPE addr_struc.
|
DATA address TYPE addr_struc.
|
||||||
|
|
||||||
address-name = `Mr. Duncan Pea`.
|
address-name = `Mr. Duncan Pea`.
|
||||||
|
|
||||||
address-street = `Vegetable Lane 11`.
|
address-street = `Vegetable Lane 11`.
|
||||||
|
|
||||||
address-city = `349875 Botanica`.
|
address-city = `349875 Botanica`.
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -450,26 +447,21 @@ The focus is on flat structures only.
|
|||||||
``` abap
|
``` abap
|
||||||
"Moves identically named components; content in other components
|
"Moves identically named components; content in other components
|
||||||
"of the targets structure are kept.
|
"of the targets structure are kept.
|
||||||
|
|
||||||
MOVE-CORRESPONDING struc TO diff_struc.
|
MOVE-CORRESPONDING struc TO diff_struc.
|
||||||
|
|
||||||
"Initializes target structure; moves identically named components
|
"Initializes target structure; moves identically named components
|
||||||
|
|
||||||
diff_struc = CORRESPONDING #( struc ).
|
diff_struc = CORRESPONDING #( struc ).
|
||||||
|
|
||||||
"Same effect as the first MOVE-CORRESPONDING statement;
|
"Same effect as the first MOVE-CORRESPONDING statement;
|
||||||
"addition BASE keeps existing content
|
"addition BASE keeps existing content
|
||||||
|
|
||||||
diff_struc = CORRESPONDING #( BASE ( diff_struc ) struc ).
|
diff_struc = CORRESPONDING #( BASE ( diff_struc ) struc ).
|
||||||
|
|
||||||
"MAPPING addition: Specifying components of a source structure that are
|
"MAPPING addition: Specifying components of a source structure that are
|
||||||
"assigned to the components of a target structure in mapping
|
"assigned to the components of a target structure in mapping
|
||||||
"relationships.
|
"relationships.
|
||||||
|
|
||||||
diff_struc = CORRESPONDING #( BASE ( diff_struc ) struc MAPPING comp1 = compa ).
|
diff_struc = CORRESPONDING #( BASE ( diff_struc ) struc MAPPING comp1 = compa ).
|
||||||
|
|
||||||
"EXCEPT addition: Excluding components from the assignment.
|
"EXCEPT addition: Excluding components from the assignment.
|
||||||
|
|
||||||
diff_struc = CORRESPONDING #( BASE ( diff_struc ) struc EXCEPT comp1 ).
|
diff_struc = CORRESPONDING #( BASE ( diff_struc ) struc EXCEPT comp1 ).
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -482,60 +474,50 @@ Value assignments in deep structures
|
|||||||
"structure which is true for the below MOVE-CORRESPONDING statements;
|
"structure which is true for the below MOVE-CORRESPONDING statements;
|
||||||
"existing internal table content is replaced by content of
|
"existing internal table content is replaced by content of
|
||||||
"the source table irrespective of identically named components
|
"the source table irrespective of identically named components
|
||||||
|
|
||||||
MOVE-CORRESPONDING deep_struc TO diff_deep_struc.
|
MOVE-CORRESPONDING deep_struc TO diff_deep_struc.
|
||||||
|
|
||||||
"Existing internal table content is replaced but the value
|
"Existing internal table content is replaced but the value
|
||||||
"assignment happens for identically named components only.
|
"assignment happens for identically named components only.
|
||||||
|
|
||||||
MOVE-CORRESPONDING deep_struc TO diff_deep_struc EXPANDING NESTED TABLES.
|
MOVE-CORRESPONDING deep_struc TO diff_deep_struc EXPANDING NESTED TABLES.
|
||||||
|
|
||||||
"Existing internal table content is kept; table content of the source
|
"Existing internal table content is kept; table content of the source
|
||||||
"structure are added but the value assignment happens like the first
|
"structure are added but the value assignment happens like the first
|
||||||
"MOVE-CORRESPONDING statement without further syntax additions.
|
"MOVE-CORRESPONDING statement without further syntax additions.
|
||||||
|
|
||||||
MOVE-CORRESPONDING deep_struc TO diff_deep_struc KEEPING TARGET LINES.
|
MOVE-CORRESPONDING deep_struc TO diff_deep_struc KEEPING TARGET LINES.
|
||||||
|
|
||||||
"Existing internal table content is kept; table content of the source
|
"Existing internal table content is kept; table content of the source
|
||||||
"structure are added; the value assignment happens like the statement
|
"structure are added; the value assignment happens like the statement
|
||||||
"MOVE-CORRESPONDING ... EXPANDING NESTED TABLES.
|
"MOVE-CORRESPONDING ... EXPANDING NESTED TABLES.
|
||||||
|
|
||||||
MOVE-CORRESPONDING deep_struc TO diff_deep_struc EXPANDING NESTED TABLES KEEPING TARGET LINES.
|
MOVE-CORRESPONDING deep_struc TO diff_deep_struc EXPANDING NESTED TABLES KEEPING TARGET LINES.
|
||||||
|
|
||||||
"Target structure is initialized; the value assignment for an internal
|
"Target structure is initialized; the value assignment for an internal
|
||||||
"table happens irrespective of identically named components.
|
"table happens irrespective of identically named components.
|
||||||
|
|
||||||
diff_deep_struc = CORRESPONDING #( deep_struc ).
|
diff_deep_struc = CORRESPONDING #( deep_struc ).
|
||||||
|
|
||||||
"Target structure is initialized; the value assignment for an internal
|
"Target structure is initialized; the value assignment for an internal
|
||||||
"table happens for identically named components only.
|
"table happens for identically named components only.
|
||||||
|
|
||||||
diff_deep_struc = CORRESPONDING #( DEEP deep_struc ).
|
diff_deep_struc = CORRESPONDING #( DEEP deep_struc ).
|
||||||
|
|
||||||
"Nonidentical elementary component types are kept in target structure;
|
"Nonidentical elementary component types are kept in target structure;
|
||||||
"internal table content is replaced; there, the value assignment
|
"internal table content is replaced; there, the value assignment
|
||||||
"happens like using the CORRESPONDING operator without addition.
|
"happens like using the CORRESPONDING operator without addition.
|
||||||
|
|
||||||
diff_deep_struc = CORRESPONDING #( BASE ( diff_struc ) deep_struc ).
|
diff_deep_struc = CORRESPONDING #( BASE ( diff_struc ) deep_struc ).
|
||||||
|
|
||||||
"Nonidentical elementary component types are kept in target structure;
|
"Nonidentical elementary component types are kept in target structure;
|
||||||
"internal table content is replaced; there, the value assignment
|
"internal table content is replaced; there, the value assignment
|
||||||
"happens like using the CORRESPONDING operator with the addition DEEP.
|
"happens like using the CORRESPONDING operator with the addition DEEP.
|
||||||
|
|
||||||
diff_deep_struc = CORRESPONDING #( DEEP BASE ( diff_struc ) deep_struc ).
|
diff_deep_struc = CORRESPONDING #( DEEP BASE ( diff_struc ) deep_struc ).
|
||||||
|
|
||||||
"Nonidentical elementary component types are kept in target structure;
|
"Nonidentical elementary component types are kept in target structure;
|
||||||
"internal table content is kept, too, and table content of the
|
"internal table content is kept, too, and table content of the
|
||||||
"source structure are added; there, the value assignment
|
"source structure are added; there, the value assignment
|
||||||
"happens like using the CORRESPONDING operator without addition.
|
"happens like using the CORRESPONDING operator without addition.
|
||||||
|
|
||||||
diff_deep_struc = CORRESPONDING #( APPENDING BASE ( diff_struc ) deep_struc ).
|
diff_deep_struc = CORRESPONDING #( APPENDING BASE ( diff_struc ) deep_struc ).
|
||||||
|
|
||||||
"Nonidentical elementary component types are kept in target structure;
|
"Nonidentical elementary component types are kept in target structure;
|
||||||
"internal table content is kept, too, and table content of the
|
"internal table content is kept, too, and table content of the
|
||||||
"source structure are added; there, the value assignment
|
"source structure are added; there, the value assignment
|
||||||
"happens like using the CORRESPONDING operator with the addition DEEP.
|
"happens like using the CORRESPONDING operator with the addition DEEP.
|
||||||
|
|
||||||
diff_deep_struc = CORRESPONDING #( DEEP APPENDING BASE ( diff_struc ) deep_struc ).
|
diff_deep_struc = CORRESPONDING #( DEEP APPENDING BASE ( diff_struc ) deep_struc ).
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -190,14 +190,12 @@ SELECT FROM source "What database table or view to read from
|
|||||||
"Note that if the selection covers more than one row, e. g. in case
|
"Note that if the selection covers more than one row, e. g. in case
|
||||||
"of a non-unique WHERE clause, one of these rows is included in
|
"of a non-unique WHERE clause, one of these rows is included in
|
||||||
"the result.
|
"the result.
|
||||||
|
|
||||||
SELECT SINGLE FROM dbtab
|
SELECT SINGLE FROM dbtab
|
||||||
FIELDS *
|
FIELDS *
|
||||||
WHERE ...
|
WHERE ...
|
||||||
INTO @struc. "Existing structure of dbtab's row type
|
INTO @struc. "Existing structure of dbtab's row type
|
||||||
|
|
||||||
"Reading a selected set of fields of a single row
|
"Reading a selected set of fields of a single row
|
||||||
|
|
||||||
SELECT SINGLE FROM dbtab
|
SELECT SINGLE FROM dbtab
|
||||||
FIELDS comp1, comp2, comp3
|
FIELDS comp1, comp2, comp3
|
||||||
WHERE ...
|
WHERE ...
|
||||||
@@ -207,7 +205,6 @@ SELECT SINGLE FROM dbtab
|
|||||||
"Here, the CORRESPONDING FIELDS OF addition is used. Only the content of
|
"Here, the CORRESPONDING FIELDS OF addition is used. Only the content of
|
||||||
"columns that have identically named components in the target data object
|
"columns that have identically named components in the target data object
|
||||||
"is assigned.
|
"is assigned.
|
||||||
|
|
||||||
SELECT SINGLE comp1, comp2, comp3 "Selected set of fields
|
SELECT SINGLE comp1, comp2, comp3 "Selected set of fields
|
||||||
FROM dbtab
|
FROM dbtab
|
||||||
WHERE ...
|
WHERE ...
|
||||||
@@ -227,7 +224,6 @@ SELECT FROM dbtab
|
|||||||
INTO TABLE @itab. "itab has an appropriate row type
|
INTO TABLE @itab. "itab has an appropriate row type
|
||||||
|
|
||||||
"Alternative syntax without the FIELDS addition
|
"Alternative syntax without the FIELDS addition
|
||||||
|
|
||||||
SELECT comp1, comp2, comp3 "Selected set of fields
|
SELECT comp1, comp2, comp3 "Selected set of fields
|
||||||
FROM dbtab
|
FROM dbtab
|
||||||
WHERE ...
|
WHERE ...
|
||||||
@@ -235,7 +231,6 @@ SELECT comp1, comp2, comp3 "Selected set of fields
|
|||||||
|
|
||||||
"Selected set of fields, existing variable
|
"Selected set of fields, existing variable
|
||||||
"See the note on CORRESPONDING FIELDS OF above
|
"See the note on CORRESPONDING FIELDS OF above
|
||||||
|
|
||||||
SELECT FROM dbtab
|
SELECT FROM dbtab
|
||||||
FIELDS comp1, comp2, comp3 "Selected set of fields
|
FIELDS comp1, comp2, comp3 "Selected set of fields
|
||||||
WHERE ...
|
WHERE ...
|
||||||
@@ -271,7 +266,6 @@ ENDSELECT.
|
|||||||
**Checking the existence of a row in a database table**
|
**Checking the existence of a row in a database table**
|
||||||
``` abap
|
``` abap
|
||||||
"Instead of @abap_true, you could also use 'X'.
|
"Instead of @abap_true, you could also use 'X'.
|
||||||
|
|
||||||
SELECT SINGLE @abap_true
|
SELECT SINGLE @abap_true
|
||||||
FROM dbtab
|
FROM dbtab
|
||||||
WHERE ...
|
WHERE ...
|
||||||
@@ -337,7 +331,6 @@ SELECT dbtab~*
|
|||||||
"object but, for example, a name in the target is different. Provided that there will
|
"object but, for example, a name in the target is different. Provided that there will
|
||||||
"not be an issue regarding the type (conversion) when the values are assigned, you might
|
"not be an issue regarding the type (conversion) when the values are assigned, you might
|
||||||
"specify an alias name for the database column to match a component's name in the target data object.
|
"specify an alias name for the database column to match a component's name in the target data object.
|
||||||
|
|
||||||
SELECT FROM dbtab
|
SELECT FROM dbtab
|
||||||
FIELDS comp1 AS comp_a, comp2 AS comp_b, comp3 AS comp_c
|
FIELDS comp1 AS comp_a, comp2 AS comp_b, comp3 AS comp_c
|
||||||
WHERE ...
|
WHERE ...
|
||||||
@@ -383,8 +376,7 @@ SELECT *
|
|||||||
|
|
||||||
`INTO` **clause**:
|
`INTO` **clause**:
|
||||||
|
|
||||||
**Limiting the number of returned table rows** using the optional addition [`UP TO n
|
**Limiting the number of returned table rows** using the optional addition [`UP TO n ROWS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_up_to_offset.htm).
|
||||||
ROWS`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_up_to_offset.htm).
|
|
||||||
|
|
||||||
``` abap
|
``` abap
|
||||||
"A maximum of five rows are to be returned
|
"A maximum of five rows are to be returned
|
||||||
@@ -1542,37 +1534,31 @@ expressions (with `@( ... )`).
|
|||||||
|
|
||||||
``` abap
|
``` abap
|
||||||
"Inserting a single row into a database table
|
"Inserting a single row into a database table
|
||||||
|
|
||||||
INSERT dbtab FROM @row.
|
INSERT dbtab FROM @row.
|
||||||
|
|
||||||
"Alternative syntax, same effect
|
"Alternative syntax, same effect
|
||||||
INSERT INTO dbtab VALUES @row.
|
INSERT INTO dbtab VALUES @row.
|
||||||
|
|
||||||
"Line is created inline using the VALUE operator as part of a host expression
|
"Line is created inline using the VALUE operator as part of a host expression
|
||||||
|
|
||||||
INSERT dbtab FROM @( VALUE #( comp1 = ... comp2 = ... ) ).
|
INSERT dbtab FROM @( VALUE #( comp1 = ... comp2 = ... ) ).
|
||||||
|
|
||||||
"Inserting multiple lines from an internal table into a database table.
|
"Inserting multiple lines from an internal table into a database table.
|
||||||
"Make sure that the internal table does not contain a line having the same key
|
"Make sure that the internal table does not contain a line having the same key
|
||||||
"as an existing row in the database table. Otherwise, a runtime error occurs.
|
"as an existing row in the database table. Otherwise, a runtime error occurs.
|
||||||
|
|
||||||
INSERT dbtab FROM TABLE @itab.
|
INSERT dbtab FROM TABLE @itab.
|
||||||
|
|
||||||
"Inserting lines from a table declared inline using the VALUE operator
|
"Inserting lines from a table declared inline using the VALUE operator
|
||||||
"as part of a host expression
|
"as part of a host expression
|
||||||
|
|
||||||
INSERT dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
INSERT dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
||||||
( comp1 = ... comp2 = ... ) ) ).
|
( comp1 = ... comp2 = ... ) ) ).
|
||||||
|
|
||||||
"ACCEPTING DUPLICATE KEYS addition: To avoid the runtime error mentioned above,
|
"ACCEPTING DUPLICATE KEYS addition: To avoid the runtime error mentioned above,
|
||||||
"all lines that would produce duplicate entries in the database table
|
"all lines that would produce duplicate entries in the database table
|
||||||
"regarding the keys are discarded and sy-subrc is set to 4.
|
"regarding the keys are discarded and sy-subrc is set to 4.
|
||||||
|
|
||||||
INSERT dbtab FROM TABLE @itab ACCEPTING DUPLICATE KEYS.
|
INSERT dbtab FROM TABLE @itab ACCEPTING DUPLICATE KEYS.
|
||||||
|
|
||||||
"Inserting the result set of an embedded subquery
|
"Inserting the result set of an embedded subquery
|
||||||
"Here, multiple result sets can be joined, e. g. using UNION.
|
"Here, multiple result sets can be joined, e. g. using UNION.
|
||||||
|
|
||||||
INSERT dbtab FROM ( SELECT ... ).
|
INSERT dbtab FROM ( SELECT ... ).
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1584,16 +1570,13 @@ INSERT dbtab FROM ( SELECT ... ).
|
|||||||
|
|
||||||
``` abap
|
``` abap
|
||||||
"Changing content by overwriting entire rows based on a structure
|
"Changing content by overwriting entire rows based on a structure
|
||||||
|
|
||||||
UPDATE dbtab FROM @row.
|
UPDATE dbtab FROM @row.
|
||||||
UPDATE dbtab FROM @( VALUE #( comp1 = ... comp2 = ... ) ). "Using a host expression
|
UPDATE dbtab FROM @( VALUE #( comp1 = ... comp2 = ... ) ). "Using a host expression
|
||||||
|
|
||||||
"Changing content by overwriting entire rows based on rows in an internal table
|
"Changing content by overwriting entire rows based on rows in an internal table
|
||||||
|
|
||||||
UPDATE dbtab FROM TABLE @itab.
|
UPDATE dbtab FROM TABLE @itab.
|
||||||
|
|
||||||
"Using a host expression
|
"Using a host expression
|
||||||
|
|
||||||
UPDATE dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
UPDATE dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
||||||
( comp1 = ... comp2 = ... ) ) ).
|
( comp1 = ... comp2 = ... ) ) ).
|
||||||
|
|
||||||
@@ -1606,7 +1589,6 @@ UPDATE dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
|||||||
"- Internal table is filled; only one component is flagged as to be updated
|
"- Internal table is filled; only one component is flagged as to be updated
|
||||||
"- Other fields remain unchanged; note that key fields must be included
|
"- Other fields remain unchanged; note that key fields must be included
|
||||||
" in ind_tab (indicator setting for key fields has no effect)
|
" in ind_tab (indicator setting for key fields has no effect)
|
||||||
|
|
||||||
TYPES ind_wa TYPE dbtab WITH INDICATORS comp_ind TYPE abap_bool.
|
TYPES ind_wa TYPE dbtab WITH INDICATORS comp_ind TYPE abap_bool.
|
||||||
|
|
||||||
DATA ind_tab TYPE TABLE OF ind_wa.
|
DATA ind_tab TYPE TABLE OF ind_wa.
|
||||||
@@ -1617,14 +1599,12 @@ ind_tab = VALUE #(
|
|||||||
|
|
||||||
UPDATE dbtab FROM TABLE @ind_tab INDICATORS SET STRUCTURE comp_ind.
|
UPDATE dbtab FROM TABLE @ind_tab INDICATORS SET STRUCTURE comp_ind.
|
||||||
|
|
||||||
"Reverses the logic
|
"In the following example, the logic is reversed using NOT.
|
||||||
|
|
||||||
UPDATE dbtab FROM TABLE @ind_tab INDICATORS NOT SET STRUCTURE comp_ind.
|
UPDATE dbtab FROM TABLE @ind_tab INDICATORS NOT SET STRUCTURE comp_ind.
|
||||||
|
|
||||||
"SET addition: Changing values of specific fields in all table rows
|
"SET addition: Changing values of specific fields in all table rows
|
||||||
"There are mutliple options for the value assignment. E.g. you can use
|
"There are mutliple options for the value assignment. E.g. you can use
|
||||||
"a literal, host variable/expression, SQL function, and so on.
|
"a literal, host variable/expression, SQL function, and so on.
|
||||||
|
|
||||||
UPDATE dbtab SET comp2 = ... .
|
UPDATE dbtab SET comp2 = ... .
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1636,24 +1616,19 @@ UPDATE dbtab SET comp2 = ... .
|
|||||||
|
|
||||||
``` abap
|
``` abap
|
||||||
"Inserting a single row into a database table or changing an existing row
|
"Inserting a single row into a database table or changing an existing row
|
||||||
|
|
||||||
MODIFY dbtab FROM @row.
|
MODIFY dbtab FROM @row.
|
||||||
|
|
||||||
"Using a host expression
|
"Using a host expression
|
||||||
|
|
||||||
MODIFY dbtab FROM @( VALUE #( comp1 = ... comp2 = ... ) ).
|
MODIFY dbtab FROM @( VALUE #( comp1 = ... comp2 = ... ) ).
|
||||||
|
|
||||||
"Inserting/Changing multiple rows
|
"Inserting/Changing multiple rows
|
||||||
|
|
||||||
MODIFY dbtab FROM TABLE @itab.
|
MODIFY dbtab FROM TABLE @itab.
|
||||||
|
|
||||||
"Using a host expression
|
"Using a host expression
|
||||||
|
|
||||||
MODIFY dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
MODIFY dbtab FROM TABLE @( VALUE #( ( comp1 = ... comp2 = ... )
|
||||||
( comp1 = ... comp2 = ... ) ) ).
|
( comp1 = ... comp2 = ... ) ) ).
|
||||||
|
|
||||||
"Inserting/Changing multiple rows based on a result set of an embedded subquery
|
"Inserting/Changing multiple rows based on a result set of an embedded subquery
|
||||||
|
|
||||||
MODIFY dbtab FROM ( SELECT ... ).
|
MODIFY dbtab FROM ( SELECT ... ).
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1667,26 +1642,20 @@ MODIFY dbtab FROM ( SELECT ... ).
|
|||||||
"Variant DELETE FROM ...: Either all rows are deleted or restricted
|
"Variant DELETE FROM ...: Either all rows are deleted or restricted
|
||||||
|
|
||||||
"All rows are deleted
|
"All rows are deleted
|
||||||
|
|
||||||
DELETE FROM dbtab.
|
DELETE FROM dbtab.
|
||||||
|
|
||||||
"Rows are deleted based on a condition
|
"Rows are deleted based on a condition
|
||||||
|
|
||||||
DELETE FROM dbtab WHERE ....
|
DELETE FROM dbtab WHERE ....
|
||||||
|
|
||||||
"Note that there are further options available, e. g. ORDER BY, UP TO
|
"Note that there are further options available, e. g. ORDER BY, UP TO
|
||||||
"Variant DELETE ... FROM ...: Deleting a single row or multiple row
|
"Variant DELETE ... FROM ...: Deleting a single row or multiple row
|
||||||
|
|
||||||
DELETE dbtab FROM @row.
|
DELETE dbtab FROM @row.
|
||||||
|
|
||||||
"Using a host expression
|
"Using a host expression
|
||||||
|
|
||||||
DELETE dbtab FROM @( VALUE #( comp1 = ... ) ).
|
DELETE dbtab FROM @( VALUE #( comp1 = ... ) ).
|
||||||
|
|
||||||
DELETE dbtab FROM TABLE @itab.
|
DELETE dbtab FROM TABLE @itab.
|
||||||
|
|
||||||
"Using a host expression
|
"Using a host expression
|
||||||
|
|
||||||
DELETE dbtab FROM TABLE @( VALUE #( ( comp1 = ... )
|
DELETE dbtab FROM TABLE @( VALUE #( ( comp1 = ... )
|
||||||
( comp1 = ... ) ) ).
|
( comp1 = ... ) ) ).
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -697,7 +697,7 @@ class_name=>meth( EXPORTING i = j k = l RECEIVING m = DATA(n) ).
|
|||||||
### Method Chaining
|
### Method Chaining
|
||||||
|
|
||||||
As shown in the previous example, method chaining is possible for functional method calls (i.e. methods that have exactly one return value declared with `RETURNING`) at appropriate read positions. In this case, the method's return value is used as an ABAP operand.
|
As shown in the previous example, method chaining is possible for functional method calls (i.e. methods that have exactly one return value declared with `RETURNING`) at appropriate read positions. In this case, the method's return value is used as an ABAP operand.
|
||||||
A chained method call can consist of multipled functional methods that are linked using component selectors `->`. The return values of each method are references to the next method.
|
A chained method call can consist of multiple functional methods that are linked using component selectors `->`. The return values of each method are references to the next method.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"The following example demonstrates method chaining
|
"The following example demonstrates method chaining
|
||||||
|
|||||||
@@ -12,25 +12,37 @@
|
|||||||
- [Concatenating Strings](#concatenating-strings)
|
- [Concatenating Strings](#concatenating-strings)
|
||||||
- [Splitting Strings](#splitting-strings)
|
- [Splitting Strings](#splitting-strings)
|
||||||
- [Modifying Strings](#modifying-strings)
|
- [Modifying Strings](#modifying-strings)
|
||||||
|
- [Transforming to Lowercase and Uppercase](#transforming-to-lowercase-and-uppercase)
|
||||||
|
- [Shifting Content](#shifting-content)
|
||||||
|
- [Condensing Strings](#condensing-strings)
|
||||||
|
- [Reversing Strings](#reversing-strings)
|
||||||
|
- [Inserting Substrings into Strings](#inserting-substrings-into-strings)
|
||||||
|
- [Overlaying Content](#overlaying-content)
|
||||||
- [Processing Substrings](#processing-substrings)
|
- [Processing Substrings](#processing-substrings)
|
||||||
- [Searching and Replacing](#searching-and-replacing)
|
- [Searching and Replacing](#searching-and-replacing)
|
||||||
- [Searching for Specific Characters](#searching-for-specific-characters)
|
- [Searching for Specific Characters](#searching-for-specific-characters)
|
||||||
- [Replacing Specific Characters in Strings](#replacing-specific-characters-in-strings)
|
- [Replacing Specific Characters in Strings](#replacing-specific-characters-in-strings)
|
||||||
- [Searching for Substrings in Strings (and Tables)](#searching-for-substrings-in-strings-and-tables)
|
- [Searching for Substrings in Strings](#searching-for-substrings-in-strings)
|
||||||
- [Replacing Substrings in Strings (and Tables)](#replacing-substrings-in-strings-and-tables)
|
- [Searching for Substrings in Tables](#searching-for-substrings-in-tables)
|
||||||
|
- [String Function find](#string-function-find)
|
||||||
|
- [Replacing Substrings in Strings](#replacing-substrings-in-strings)
|
||||||
|
- [Replacing Substrings in Tables](#replacing-substrings-in-tables)
|
||||||
|
- [String Function replace](#string-function-replace)
|
||||||
- [Pattern-Based Searching and Replacing in Strings](#pattern-based-searching-and-replacing-in-strings)
|
- [Pattern-Based Searching and Replacing in Strings](#pattern-based-searching-and-replacing-in-strings)
|
||||||
- [Simple Pattern-Based Searching Using Comparison Operators](#simple-pattern-based-searching-using-comparison-operators)
|
- [Simple Pattern-Based Searching Using Comparison Operators](#simple-pattern-based-searching-using-comparison-operators)
|
||||||
- [Complex Searching and Replacing Using Regular Expressions](#complex-searching-and-replacing-using-regular-expressions)
|
- [Complex Searching and Replacing Using Regular Expressions](#complex-searching-and-replacing-using-regular-expressions)
|
||||||
- [Excursion: Common Regular Expressions](#excursion-common-regular-expressions)
|
- [Excursion: Common Regular Expressions](#excursion-common-regular-expressions)
|
||||||
- [Searching Using Regular Expressions](#searching-using-regular-expressions)
|
- [Searching Using Regular Expressions](#searching-using-regular-expressions)
|
||||||
- [Excursion: System Classes for Regular Expressions](#excursion-system-classes-for-regular-expressions)
|
- [System Classes for Regular Expressions](#system-classes-for-regular-expressions)
|
||||||
- [Replacing Using Regular Expressions](#replacing-using-regular-expressions)
|
- [Replacing Using Regular Expressions](#replacing-using-regular-expressions)
|
||||||
- [More String Functions](#more-string-functions)
|
- [More String Functions](#more-string-functions)
|
||||||
- [Checking the Similarity of Strings](#checking-the-similarity-of-strings)
|
- [Checking the Similarity of Strings](#checking-the-similarity-of-strings)
|
||||||
- [Repeating Strings](#repeating-strings)
|
- [Repeating Strings](#repeating-strings)
|
||||||
- [Returning the Smallest/Biggest of a Set of Character-Like Arguments](#returning-the-smallestbiggest-of-a-set-of-character-like-arguments)
|
- [Returning the Smallest/Biggest of a Set of Character-Like Arguments](#returning-the-smallestbiggest-of-a-set-of-character-like-arguments)
|
||||||
- [Escaping Special Characters](#escaping-special-characters)
|
- [Escaping Special Characters](#escaping-special-characters)
|
||||||
- [Excursion: String Processing Using the XCO Library](#excursion-string-processing-using-the-xco-library)
|
- [Excursions](#excursions)
|
||||||
|
- [Comparison Operators for Character-Like Data Types in a Nutshell](#comparison-operators-for-character-like-data-types-in-a-nutshell)
|
||||||
|
- [String Processing Using the XCO Library](#string-processing-using-the-xco-library)
|
||||||
- [Executable Example](#executable-example)
|
- [Executable Example](#executable-example)
|
||||||
|
|
||||||
|
|
||||||
@@ -514,7 +526,7 @@ s2 = segment( val = s1 index = 2 sep = `,` ). "world
|
|||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
## Modifying Strings
|
## Modifying Strings
|
||||||
**Transforming to Lowercase and Uppercase**
|
### Transforming to Lowercase and Uppercase
|
||||||
|
|
||||||
- The string functions
|
- The string functions
|
||||||
[`to_lower`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencase_functions.htm)
|
[`to_lower`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencase_functions.htm)
|
||||||
@@ -538,7 +550,9 @@ TRANSLATE s1 TO UPPER CASE. "HALLO
|
|||||||
TRANSLATE s1 TO LOWER CASE. "hallo
|
TRANSLATE s1 TO LOWER CASE. "hallo
|
||||||
```
|
```
|
||||||
|
|
||||||
**Shifting Content**
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### Shifting Content
|
||||||
|
|
||||||
- You can shift content within a string to a specific position on the left
|
- You can shift content within a string to a specific position on the left
|
||||||
or right of a string.
|
or right of a string.
|
||||||
@@ -599,7 +613,9 @@ s2 = shift_right( val = `abc ` sub = ` ` ). "'abc'
|
|||||||
s2 = shift_right( val = `abc ` ). "'abc' (same result as above)
|
s2 = shift_right( val = `abc ` ). "'abc' (same result as above)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Condensing Strings**
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### Condensing Strings
|
||||||
|
|
||||||
- You can use
|
- You can use
|
||||||
[`CONDENSE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapcondense.htm)
|
[`CONDENSE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapcondense.htm)
|
||||||
@@ -649,7 +665,9 @@ s2 = condense( val = ` Rock'xxx'Roller`
|
|||||||
to = `n` ). "Rock'n'Roll
|
to = `n` ). "Rock'n'Roll
|
||||||
```
|
```
|
||||||
|
|
||||||
**Reversing Strings**
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### Reversing Strings
|
||||||
|
|
||||||
The string function
|
The string function
|
||||||
[`reverse`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreverse_functions.htm)
|
[`reverse`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreverse_functions.htm)
|
||||||
@@ -659,7 +677,9 @@ reverses a string:
|
|||||||
DATA(s1) = reverse( `paba` ).
|
DATA(s1) = reverse( `paba` ).
|
||||||
```
|
```
|
||||||
|
|
||||||
**Inserting Substrings into Strings**
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### Inserting Substrings into Strings
|
||||||
|
|
||||||
- The string function
|
- The string function
|
||||||
[`insert`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeninsert_functions.htm)
|
[`insert`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abeninsert_functions.htm)
|
||||||
@@ -678,7 +698,9 @@ DATA(s1) = insert( val = `abcghi` sub = `def` off = 3 ).
|
|||||||
s1 = insert( val = `abcghi` sub = `def` ).
|
s1 = insert( val = `abcghi` sub = `def` ).
|
||||||
```
|
```
|
||||||
|
|
||||||
**Overlaying Content**
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### Overlaying Content
|
||||||
|
|
||||||
You can use [`OVERLAY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapoverlay.htm) statements to replace characters in one variable with characters in another variable that are in the same place there.
|
You can use [`OVERLAY`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapoverlay.htm) statements to replace characters in one variable with characters in another variable that are in the same place there.
|
||||||
|
|
||||||
@@ -712,7 +734,7 @@ string (`val`).
|
|||||||
or `len` must be specified. The default value of `off`
|
or `len` must be specified. The default value of `off`
|
||||||
is 0, i.e. when using the default value, the substring is extracted
|
is 0, i.e. when using the default value, the substring is extracted
|
||||||
from the beginning of the string.
|
from the beginning of the string.
|
||||||
- If `len` is not specified, the rest of the remaining characters are respected. If the offset
|
- If `len` is not specified, the rest of the remaining characters is respected. If the offset
|
||||||
and length are greater than the actual length of the string, the
|
and length are greater than the actual length of the string, the
|
||||||
exception `CX_SY_RANGE_OUT_OF_BOUNDS` is raised.
|
exception `CX_SY_RANGE_OUT_OF_BOUNDS` is raised.
|
||||||
- You may also encounter the syntax for accessing substrings by specifying the offset
|
- You may also encounter the syntax for accessing substrings by specifying the offset
|
||||||
@@ -739,7 +761,7 @@ Syntax examples:
|
|||||||
DATA(s1) = `Lorem ipsum dolor sit amet`. "Type string
|
DATA(s1) = `Lorem ipsum dolor sit amet`. "Type string
|
||||||
|
|
||||||
"Extracting substring starting at a specific position
|
"Extracting substring starting at a specific position
|
||||||
"'len' not specified means the rest of the remaining characters are
|
"'len' not specified means the rest of the remaining characters is
|
||||||
"respected
|
"respected
|
||||||
DATA(s2) = substring( val = s1 off = 6 ). "ipsum dolor sit amet
|
DATA(s2) = substring( val = s1 off = 6 ). "ipsum dolor sit amet
|
||||||
|
|
||||||
@@ -934,7 +956,7 @@ TRANSLATE s1 USING `_.a#g+`. "...#bc.def.....+hi.
|
|||||||
|
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
### Searching for Substrings in Strings (and Tables)
|
### Searching for Substrings in Strings
|
||||||
|
|
||||||
- For simple substring searches, you can use the [comparison
|
- For simple substring searches, you can use the [comparison
|
||||||
operators](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencomp_operator_glosry.htm "Glossary Entry")
|
operators](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abencomp_operator_glosry.htm "Glossary Entry")
|
||||||
@@ -1142,6 +1164,7 @@ FIND FIRST OCCURRENCE OF `ab` IN str_abap
|
|||||||
"res10: line: 0, offset: 0, length: 2, submatches: (initial)
|
"res10: line: 0, offset: 0, length: 2, submatches: (initial)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Searching for Substrings in Tables
|
||||||
You can use [`FIND ... IN TABLE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapfind_itab.htm) statements to search for substrings in internal tables (standard tables without secondary table keys; with character-like line type) line by line.
|
You can use [`FIND ... IN TABLE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapfind_itab.htm) statements to search for substrings in internal tables (standard tables without secondary table keys; with character-like line type) line by line.
|
||||||
|
|
||||||
``` abap
|
``` abap
|
||||||
@@ -1180,7 +1203,7 @@ FIND FIRST OCCURRENCE OF `Z`
|
|||||||
RESPECTING CASE.
|
RESPECTING CASE.
|
||||||
```
|
```
|
||||||
|
|
||||||
**Built-in search functions**
|
### String Function find
|
||||||
- Built-in search functions, such as `find`, are available for searching strings.
|
- Built-in search functions, such as `find`, are available for searching strings.
|
||||||
- They return a return value of type i and contain multiple (optional) parameters.
|
- They return a return value of type i and contain multiple (optional) parameters.
|
||||||
- `FIND` covers the same functionality and more with the many addition options.
|
- `FIND` covers the same functionality and more with the many addition options.
|
||||||
@@ -1261,7 +1284,7 @@ ENDTRY.
|
|||||||
|
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
### Replacing Substrings in Strings (and Tables)
|
### Replacing Substrings in Strings
|
||||||
|
|
||||||
- [`REPLACE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapreplace.htm) and [`REPLACE ... IN TABLE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapreplace_itab.htm) statements have a similar syntax as `FIND` and `FIND ... IN TABLE` statements. Refer to the ABAP Keyword Documentation for all possible additions. The following code snippets cover a selection.
|
- [`REPLACE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapreplace.htm) and [`REPLACE ... IN TABLE`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapreplace_itab.htm) statements have a similar syntax as `FIND` and `FIND ... IN TABLE` statements. Refer to the ABAP Keyword Documentation for all possible additions. The following code snippets cover a selection.
|
||||||
- `sy-subrc` is set: 0 (search pattern or section was replaced by the specified content, result was not truncated on the right), 2 (search pattern or section was replaced, result was truncated on the right), 4 (search pattern was not found).
|
- `sy-subrc` is set: 0 (search pattern or section was replaced by the specified content, result was not truncated on the right), 2 (search pattern or section was replaced, result was truncated on the right), 4 (search pattern was not found).
|
||||||
@@ -1384,7 +1407,9 @@ str = str_original.
|
|||||||
REPLACE SECTION LENGTH 6 OF str WITH `#`. "#BAP abap
|
REPLACE SECTION LENGTH 6 OF str WITH `#`. "#BAP abap
|
||||||
```
|
```
|
||||||
|
|
||||||
Replacements in internal tables with `REPLACE ... IN TABLE`:
|
### Replacing Substrings in Tables
|
||||||
|
|
||||||
|
Replacements in internal tables with `REPLACE ... IN TABLE` (see the notes above for searching in internal tables):
|
||||||
``` abap
|
``` abap
|
||||||
DATA(str_table_original) = VALUE string_table( ( `aZbzZ` ) ( `cdZze` ) ( `Zzzf` ) ( `ghz` ) ).
|
DATA(str_table_original) = VALUE string_table( ( `aZbzZ` ) ( `cdZze` ) ( `Zzzf` ) ( `ghz` ) ).
|
||||||
DATA(str_table) = str_table_original.
|
DATA(str_table) = str_table_original.
|
||||||
@@ -1443,6 +1468,7 @@ REPLACE ALL OCCURRENCES OF `Z`
|
|||||||
"str_table: aZbz# / cdZze / Zzzf / ghz
|
"str_table: aZbz# / cdZze / Zzzf / ghz
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### String Function replace
|
||||||
- The string function
|
- The string function
|
||||||
[`replace`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreplace_functions.htm),
|
[`replace`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreplace_functions.htm),
|
||||||
allows you to store the result of a substring replacement in a separate
|
allows you to store the result of a substring replacement in a separate
|
||||||
@@ -1668,7 +1694,7 @@ FIND FIRST OCCURRENCE OF PCRE `\bt.` IN TABLE itab
|
|||||||
```
|
```
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
##### Excursion: System Classes for Regular Expressions
|
#### System Classes for Regular Expressions
|
||||||
|
|
||||||
- You can create an object-oriented representation of regular expressions using the `CL_ABAP_REGEX` system class.
|
- You can create an object-oriented representation of regular expressions using the `CL_ABAP_REGEX` system class.
|
||||||
- For example, the `CREATE_PCRE` method creates instances of regular expressions with PCRE syntax.
|
- For example, the `CREATE_PCRE` method creates instances of regular expressions with PCRE syntax.
|
||||||
@@ -1846,7 +1872,143 @@ ENDTRY.
|
|||||||
|
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
## Excursion: String Processing Using the XCO Library
|
## Excursions
|
||||||
|
|
||||||
|
### Comparison Operators for Character-Like Data Types in a Nutshell
|
||||||
|
|
||||||
|
The comparison operators have already been covered in different sections above. This is a summary of the operators.
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Comparison Operator</th>
|
||||||
|
<th>Details</th>
|
||||||
|
<th>Example</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>CA</code></td>
|
||||||
|
<td><i>Contains any</i><br>To determine whether any character of a given character set is contained
|
||||||
|
in a string. <br>Note: The search is case-sensitive. <code>sy-fdpos</code> contains the offset of the first character found, while 0 stands for the very first position. If nothing is found, <code>sy-fdpos</code> contains the length of the string.</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s1) = `cheers`.
|
||||||
|
IF s1 CA `aeiou`. ... "true; sy-fdpos: 2
|
||||||
|
IF s1 CA `xy`. ... "false; sy-fdpos: 6
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>NA</code></td>
|
||||||
|
<td><i>Contains not any</i><br>To determine whether any character of a given character set is not contained
|
||||||
|
in a string. See the note above. </td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s2) = `Hallo`.
|
||||||
|
IF s2 NA `bcdeh`. ... "true; sy-fdpos: 5
|
||||||
|
IF s2 NA `bcdeH`. ... "false; sy-fdpos: 0
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>CO</code></td>
|
||||||
|
<td><i>Contains only</i><br>To determine whether a string contains only a certain set of characters. See the note above.</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s3) = `abcd`.
|
||||||
|
IF s3 CO `abcd`. ... "true; sy-fdpos: 4
|
||||||
|
IF s3 CO `abCd`. ... "false; sy-fdpos: 2
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>CN</code></td>
|
||||||
|
<td><i>Contains not only</i><br>To determine whether a string does not only contain a certain set of characters, i.e. whether a string contains characters other than those in the character set. See the note above.</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s4) = `abap`.
|
||||||
|
IF s4 CN `ab`. ... "true; sy-fdpos: 3
|
||||||
|
IF s4 CN `abp`. ... "false; sy-fdpos: 4
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>CS</code></td>
|
||||||
|
<td><i>Contains string</i><br>For simple substring searches and determining whether a string contains a substring. <br>Note: The search is not case-sensitive. <code>sy-fdpos</code> contains the offset of the first substring found. If it is not found, <code>sy-fdpos</code> contains the length of the string searched.</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s5) = `Lorem ipsum dolor sit amet.`.
|
||||||
|
IF s5 CS `or`. ... "true; sy-fdpos: 1
|
||||||
|
IF s5 CS `zz`. ... "false; sy-fdpos: 27
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>NS</code></td>
|
||||||
|
<td><i>Contains no string</i><br>To determine whether a substring is not contained in a string. See the note for <code>CS</code>.</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s6) = `some test string`.
|
||||||
|
IF s6 NS `tests`. ... "true; sy-fdpos: 16
|
||||||
|
IF s6 NS `TEST`. ... "false; sy-fdpos: 5
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>CP</code></td>
|
||||||
|
<td><i>Conforms to pattern</i><br>For simple pattern searches and determining whether a set of characters is contained in a string that matches a particular pattern. You can use the following special characters as patterns: <ul><li><code>*</code>: Any character sequence (including blanks)</li><li><code>+</code>: Any character (only one character, including blanks)</li><li><code>#</code>: Escape character. The following character is marked for an exact comparison.</li></ul>Patterns are not case-sensitive except for characters marked with
|
||||||
|
<code>#</code>. If a pattern is found, <code>sy-fdpos</code> returns the offset of the first occurrence. Otherwise, it contains the length of the string searched.
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s7) = `abc_def_ghi`.
|
||||||
|
|
||||||
|
"Pattern: f is preceded by any character sequence, must be followed
|
||||||
|
"by '_' and then followed by any character sequence
|
||||||
|
IF s7 CP `*f#_*`. ... "true; sy-fdpos: 6
|
||||||
|
|
||||||
|
"Pattern: i is preceded by any character sequence, must be followed
|
||||||
|
"by any character or a blank
|
||||||
|
IF s7 CP `*i+`. ... "false; sy-fdpos: 11
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>NP</code></td>
|
||||||
|
<td><i>Does not conform to pattern</i><br>Negation of <code>CP</code>. See the previous notes.</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
```abap
|
||||||
|
DATA(s8) = `abcDEFghi`.
|
||||||
|
|
||||||
|
"Pattern: c is preceded by any character sequence, must be followed
|
||||||
|
"by a small letter d, and then followed by any character sequence
|
||||||
|
IF s8 NP `*c#d*`. ... "true; sy-fdpos: 9
|
||||||
|
|
||||||
|
"Pattern: c is preceded by any character sequence, must be followed
|
||||||
|
"by a capital letter D, and then followed by any character sequence
|
||||||
|
IF s8 NP `*c#D*`. ... "false; sy-fdpos: 2
|
||||||
|
```
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### String Processing Using the XCO Library
|
||||||
The Extension Components Library (XCO) library provides [released APIs](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_api_glosry.htm) and offers various development utilities. Find more information [here](https://help.sap.com/docs/btp/sap-business-technology-platform/overview-of-xco-modules). The following code snippet demonstrates several methods of the `XCO_CP` class that deal with string processing.
|
The Extension Components Library (XCO) library provides [released APIs](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_api_glosry.htm) and offers various development utilities. Find more information [here](https://help.sap.com/docs/btp/sap-business-technology-platform/overview-of-xco-modules). The following code snippet demonstrates several methods of the `XCO_CP` class that deal with string processing.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
|
|||||||
@@ -1159,7 +1159,7 @@ READ ENTITIES OF root_ent
|
|||||||
```
|
```
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
#### Dynamic Forms of EML Statements
|
### Dynamic Forms of EML Statements
|
||||||
|
|
||||||
In addition to the short and long forms described above, various ABAP EML statements also have dynamic forms.
|
In addition to the short and long forms described above, various ABAP EML statements also have dynamic forms.
|
||||||
Taking EML read operations as an example, the following code snippet shows a dynamic EML [`READ ENTITIES`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapread_entities_operations.htm) statement. The relevant syntax element is the `OPERATIONS` addition.
|
Taking EML read operations as an example, the following code snippet shows a dynamic EML [`READ ENTITIES`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapread_entities_operations.htm) statement. The relevant syntax element is the `OPERATIONS` addition.
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
- [`WHILE`: Conditional Loops](#while-conditional-loops)
|
- [`WHILE`: Conditional Loops](#while-conditional-loops)
|
||||||
- [Loops Across Tables](#loops-across-tables)
|
- [Loops Across Tables](#loops-across-tables)
|
||||||
- [Calling Procedures](#calling-procedures)
|
- [Calling Procedures](#calling-procedures)
|
||||||
|
- [Excursion: RETURN](#excursion-return)
|
||||||
- [Handling Exceptions](#handling-exceptions)
|
- [Handling Exceptions](#handling-exceptions)
|
||||||
- [Notes on Exception Classes](#notes-on-exception-classes)
|
- [Notes on Exception Classes](#notes-on-exception-classes)
|
||||||
- [Raising Exceptions](#raising-exceptions)
|
- [Raising Exceptions](#raising-exceptions)
|
||||||
@@ -442,6 +443,58 @@ Regarding the exiting of procedures, note the hint mentioned above. The use of `
|
|||||||
|
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
|
### Excursion: RETURN
|
||||||
|
|
||||||
|
As mentioned, `RETURN` terminates the current processing block. Usually, the statement is intended for leaving processing blocks early.
|
||||||
|
In case of functional method, i.e. methods that have one returning parameter, the `RETURN` statement can also be specified with an expression. In doing so, the
|
||||||
|
following statement
|
||||||
|
```abap
|
||||||
|
res = some_expr.
|
||||||
|
RETURN.
|
||||||
|
```
|
||||||
|
can also be specified as follows:
|
||||||
|
```abap
|
||||||
|
RETURN some_expr.
|
||||||
|
```
|
||||||
|
Here, the expression result is passed to the returning parameter without naming it explicitly. As an expression, you can specify a constructor expression (and using type inference with `#` means using the type of the returning parameter).
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```abap
|
||||||
|
CLASS zcl_some_class DEFINITION
|
||||||
|
PUBLIC
|
||||||
|
FINAL
|
||||||
|
CREATE PUBLIC.
|
||||||
|
PUBLIC SECTION.
|
||||||
|
INTERFACES: if_oo_adt_classrun.
|
||||||
|
PROTECTED SECTION.
|
||||||
|
PRIVATE SECTION.
|
||||||
|
CLASS-METHODS multiply
|
||||||
|
IMPORTING num1 TYPE i
|
||||||
|
num2 TYPE i
|
||||||
|
RETURNING VALUE(result) TYPE i.
|
||||||
|
ENDCLASS.
|
||||||
|
CLASS zcl_some_class IMPLEMENTATION.
|
||||||
|
METHOD if_oo_adt_classrun~main.
|
||||||
|
DATA(res1) = multiply( num1 = 2 num2 = 3 ).
|
||||||
|
DATA(res2) = multiply( num1 = 10 num2 = 10 ).
|
||||||
|
DATA(res3) = multiply( num1 = 99999999 num2 = 99999999 ).
|
||||||
|
out->write( res1 ). "6
|
||||||
|
out->write( res2 ). "100
|
||||||
|
out->write( res3 ). "0
|
||||||
|
ENDMETHOD.
|
||||||
|
METHOD multiply.
|
||||||
|
TRY.
|
||||||
|
"result = num1 * num2.
|
||||||
|
RETURN num1 * num2.
|
||||||
|
CATCH cx_sy_arithmetic_error.
|
||||||
|
RETURN VALUE #( ).
|
||||||
|
ENDTRY.
|
||||||
|
ENDMETHOD.
|
||||||
|
ENDCLASS.
|
||||||
|
```
|
||||||
|
|
||||||
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
|
|
||||||
## Handling Exceptions
|
## Handling Exceptions
|
||||||
- [Exceptions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenexception_glosry.htm) ...
|
- [Exceptions](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenexception_glosry.htm) ...
|
||||||
- are events during the execution of an ABAP program that interrupt the program flow because it is not possible for the program to continue in a meaningful way. For such situations, you can implement an exception handling in which you can react on the situations appropriately. Consider, for example, the implementation of a simple calculation. If there is a division by zero, the program will be terminated with a [runtime error](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenruntime_error_glosry.htm) unless you handle the exception appropriately.
|
- are events during the execution of an ABAP program that interrupt the program flow because it is not possible for the program to continue in a meaningful way. For such situations, you can implement an exception handling in which you can react on the situations appropriately. Consider, for example, the implementation of a simple calculation. If there is a division by zero, the program will be terminated with a [runtime error](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenruntime_error_glosry.htm) unless you handle the exception appropriately.
|
||||||
|
|||||||
@@ -895,7 +895,8 @@ DATA(dref_6_i) = REF #( do_number ).
|
|||||||
"The concepts of upcast and downcast enter the picture here.
|
"The concepts of upcast and downcast enter the picture here.
|
||||||
"Two different assignment operators are used, as well as the casting operator CAST.
|
"Two different assignment operators are used, as well as the casting operator CAST.
|
||||||
|
|
||||||
"Upcast is possible for elementary data types
|
"--------------------- Upcasts --------------------
|
||||||
|
"Upcasts are possible for elementary data types
|
||||||
"- The static type of the target variable is more general or identical to the static type of the source variable.
|
"- The static type of the target variable is more general or identical to the static type of the source variable.
|
||||||
"- Assignment operator used: =
|
"- Assignment operator used: =
|
||||||
"- Note that the operators for downcasts can also be used explicitly here, but it is usually not needed.
|
"- Note that the operators for downcasts can also be used explicitly here, but it is usually not needed.
|
||||||
@@ -909,7 +910,7 @@ dref_1_i = dref_6_i.
|
|||||||
"the target on the left side is a generic type (type data).
|
"the target on the left side is a generic type (type data).
|
||||||
dref_3_data = dref_1_i.
|
dref_3_data = dref_1_i.
|
||||||
|
|
||||||
"Downcasts
|
"--------------------- Downcasts --------------------
|
||||||
"- The static type of the target variable is more specific than the static type of the source variable.
|
"- The static type of the target variable is more specific than the static type of the source variable.
|
||||||
"- The assignability is not checked until runtime.
|
"- The assignability is not checked until runtime.
|
||||||
"- Must always be performed explicitly using the casting operator ?= or the more modern casting operator CAST.
|
"- Must always be performed explicitly using the casting operator ?= or the more modern casting operator CAST.
|
||||||
@@ -958,7 +959,7 @@ There are several ways to create anonymous data objects:
|
|||||||
- Addition `NEW` of the [`INTO`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_into_target.htm) clause in ABAP SQL `SELECT` statements
|
- Addition `NEW` of the [`INTO`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abapselect_into_target.htm) clause in ABAP SQL `SELECT` statements
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"CREATE DATA statements
|
"--------------------- CREATE DATA statements --------------------
|
||||||
"Note that there are many additions available. The examples show a selection.
|
"Note that there are many additions available. The examples show a selection.
|
||||||
|
|
||||||
"Creating an anonymous data object with an implicit type.
|
"Creating an anonymous data object with an implicit type.
|
||||||
@@ -1004,7 +1005,7 @@ SELECT SINGLE *
|
|||||||
FROM zdemo_abap_fli
|
FROM zdemo_abap_fli
|
||||||
INTO @dref_8_data->*.
|
INTO @dref_8_data->*.
|
||||||
|
|
||||||
"NEW operator
|
"--------------------- NEW operator --------------------
|
||||||
"- Works like CREATE DATA dref TYPE type statements and can be used in general expression positions.
|
"- Works like CREATE DATA dref TYPE type statements and can be used in general expression positions.
|
||||||
"- Allows to assign values to the new anonymous data objects in parentheses
|
"- Allows to assign values to the new anonymous data objects in parentheses
|
||||||
|
|
||||||
@@ -1047,6 +1048,7 @@ SELECT *
|
|||||||
[`FINAL`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfinal_inline.htm).
|
[`FINAL`](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenfinal_inline.htm).
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
|
"--------------------- Constants --------------------
|
||||||
"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`.
|
||||||
|
|
||||||
@@ -1054,7 +1056,7 @@ CONSTANTS con_str TYPE string VALUE `hallo`.
|
|||||||
CONSTANTS con_underscores TYPE string VALUE `__________`.
|
CONSTANTS con_underscores TYPE string VALUE `__________`.
|
||||||
DATA str_w_con_as_start_value TYPE string VALUE con_underscores.
|
DATA str_w_con_as_start_value TYPE string VALUE con_underscores.
|
||||||
|
|
||||||
"Immutable variables
|
"--------------------- Immutable variables --------------------
|
||||||
FINAL(do_final_inl) = 1.
|
FINAL(do_final_inl) = 1.
|
||||||
DATA(do_data_inl) = 1 + do_final_inl.
|
DATA(do_data_inl) = 1 + do_final_inl.
|
||||||
"not possible
|
"not possible
|
||||||
@@ -1125,7 +1127,7 @@ DATA(i2str) = CONV string( -10 ).
|
|||||||
## Terms Related to Data Types and Objects in a Nutshell
|
## Terms Related to Data Types and Objects in a Nutshell
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"Standalone and bound data types
|
"----------------- Standalone and bound data types -----------------
|
||||||
"Standalone: Data type that is defined using the statement TYPES in an
|
"Standalone: Data type that is defined using the statement TYPES in an
|
||||||
" ABAP program, as a data type of the ABAP Dictionary or as
|
" ABAP program, as a data type of the ABAP Dictionary or as
|
||||||
" an CDS entity.
|
" an CDS entity.
|
||||||
@@ -1139,9 +1141,7 @@ DATA do_a_c20 TYPE c LENGTH 20.
|
|||||||
DATA do_b_like LIKE do_a_c20.
|
DATA do_b_like LIKE do_a_c20.
|
||||||
TYPES te_b_like LIKE do_a_c20.
|
TYPES te_b_like LIKE do_a_c20.
|
||||||
|
|
||||||
**********************************************************************
|
"-------------- Complex and elementary data type/object --------------
|
||||||
|
|
||||||
"Complex and elementary data type/object
|
|
||||||
"Elementary: Data type of fixed or variable length that is neither
|
"Elementary: Data type of fixed or variable length that is neither
|
||||||
" structured, nor a table type or a reference type.
|
" structured, nor a table type or a reference type.
|
||||||
"Complex: Made up of other data types, for example structured data
|
"Complex: Made up of other data types, for example structured data
|
||||||
@@ -1159,9 +1159,7 @@ DATA: BEGIN OF struc_a,
|
|||||||
comp5 TYPE REF TO i, "reference type
|
comp5 TYPE REF TO i, "reference type
|
||||||
END OF struc_a.
|
END OF struc_a.
|
||||||
|
|
||||||
**********************************************************************
|
"------------------ Complete and generic data types ------------------
|
||||||
|
|
||||||
"Complete and generic data types
|
|
||||||
"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.
|
||||||
@@ -1191,9 +1189,7 @@ ASSIGN do_e_c5 TO <fs_b>.
|
|||||||
ASSIGN do_f_str TO <fs_b>.
|
ASSIGN do_f_str TO <fs_b>.
|
||||||
ASSIGN itab_a TO <fs_b>.
|
ASSIGN itab_a TO <fs_b>.
|
||||||
|
|
||||||
**********************************************************************
|
"------------------ Variable and constant data objects ------------------
|
||||||
|
|
||||||
"Variable and constant data objects
|
|
||||||
"Variable: Named data object whose value can be changed during the runtime
|
"Variable: Named data object whose value can be changed during the runtime
|
||||||
" of an ABAP program.
|
" of an ABAP program.
|
||||||
"Constant: Named data object whose value cannot be changed at runtime.
|
"Constant: Named data object whose value cannot be changed at runtime.
|
||||||
@@ -1206,9 +1202,7 @@ CONSTANTS con_a_i TYPE i VALUE 789.
|
|||||||
"Not changeable
|
"Not changeable
|
||||||
"con_a_i = 321.
|
"con_a_i = 321.
|
||||||
|
|
||||||
**********************************************************************
|
"--------------------- Static and dynamic data objects --------------------
|
||||||
|
|
||||||
"Static and dynamic data objects
|
|
||||||
"Static:
|
"Static:
|
||||||
"- Data object for which all attributes, including memory use, are specified
|
"- Data object for which all attributes, including memory use, are specified
|
||||||
" statically by the data type.
|
" statically by the data type.
|
||||||
@@ -1234,9 +1228,7 @@ do_i_str = `abc`.
|
|||||||
do_i_str = `d`.
|
do_i_str = `d`.
|
||||||
do_i_str = `efghijklmnopqrstuvwxyz`.
|
do_i_str = `efghijklmnopqrstuvwxyz`.
|
||||||
|
|
||||||
**********************************************************************
|
"------------------------ Static type and dynamic type -----------------------
|
||||||
|
|
||||||
"Static type and dynamic type
|
|
||||||
"Both are data types of a reference variable (reference type) that determine
|
"Both are data types of a reference variable (reference type) that determine
|
||||||
"the objects a reference variable can point to.
|
"the objects a reference variable can point to.
|
||||||
"Static type: For data reference variables, the static type is a data type
|
"Static type: For data reference variables, the static type is a data type
|
||||||
@@ -1261,9 +1253,7 @@ dref_b_data = REF #( do_j_i ).
|
|||||||
dref_b_data = REF #( do_k_str ).
|
dref_b_data = REF #( do_k_str ).
|
||||||
dref_b_data = REF #( dref_a_i ).
|
dref_b_data = REF #( dref_a_i ).
|
||||||
|
|
||||||
**********************************************************************
|
"------------------------ Flat and deep data objects -----------------------
|
||||||
|
|
||||||
"Flat and deep data objects
|
|
||||||
"Flat:
|
"Flat:
|
||||||
"- Property of a data type, where the content of its data objects represents
|
"- Property of a data type, where the content of its data objects represents
|
||||||
" the actual work data.
|
" the actual work data.
|
||||||
@@ -1296,9 +1286,7 @@ DATA: BEGIN OF struc_c_deep,
|
|||||||
comp4 TYPE string_table, "internal table as deep data object
|
comp4 TYPE string_table, "internal table as deep data object
|
||||||
END OF struc_c_deep.
|
END OF struc_c_deep.
|
||||||
|
|
||||||
**********************************************************************
|
"---------------------- Named and unnamed data object ---------------------
|
||||||
|
|
||||||
"Named and unnamed data object
|
|
||||||
"Named: Data object that can be identified via a name.
|
"Named: Data object that can be identified via a name.
|
||||||
"Unnamed: Data object that cannot be addressed by a name. Unnamed data
|
"Unnamed: Data object that cannot be addressed by a name. Unnamed data
|
||||||
" objects are literals and anonymous data objects.
|
" objects are literals and anonymous data objects.
|
||||||
@@ -1323,10 +1311,8 @@ SELECT *
|
|||||||
INTO TABLE NEW @DATA(dref_d_tab)
|
INTO TABLE NEW @DATA(dref_d_tab)
|
||||||
UP TO 3 ROWS.
|
UP TO 3 ROWS.
|
||||||
|
|
||||||
**********************************************************************
|
"--- Compatibility, convertibility and conversion regarding source and ---
|
||||||
|
"--- target data objects -------------------------------------------------
|
||||||
"Compatibility, convertibility and conversion regarding source and
|
|
||||||
"target data objects
|
|
||||||
"1. Source and target are compatible, all technical type properties
|
"1. Source and target are compatible, all technical type properties
|
||||||
" match
|
" match
|
||||||
DATA some_dobj TYPE c LENGTH 1 VALUE 'A'.
|
DATA some_dobj TYPE c LENGTH 1 VALUE 'A'.
|
||||||
|
|||||||
@@ -141,8 +141,7 @@ The following bundling techniques are available for classic ABAP. This means tha
|
|||||||
|
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"Synchronous update
|
"--------------------- Synchronous update ---------------------
|
||||||
|
|
||||||
DATA(st_a) = VALUE some_type( ... ).
|
DATA(st_a) = VALUE some_type( ... ).
|
||||||
|
|
||||||
...
|
...
|
||||||
@@ -156,9 +155,7 @@ The following bundling techniques are available for classic ABAP. This means tha
|
|||||||
"Triggering the synchronous update
|
"Triggering the synchronous update
|
||||||
COMMIT WORK AND WAIT.
|
COMMIT WORK AND WAIT.
|
||||||
|
|
||||||
***********************************************************************
|
"--------------------- Asynchronous update ---------------------
|
||||||
"Asynchronous update
|
|
||||||
|
|
||||||
DATA(st_b) = VALUE some_type( ... ).
|
DATA(st_b) = VALUE some_type( ... ).
|
||||||
|
|
||||||
...
|
...
|
||||||
@@ -171,8 +168,7 @@ The following bundling techniques are available for classic ABAP. This means tha
|
|||||||
"Triggering the asynchronous update
|
"Triggering the asynchronous update
|
||||||
COMMIT WORK.
|
COMMIT WORK.
|
||||||
|
|
||||||
***********************************************************************
|
"--------------------- Local update ---------------------
|
||||||
"Local update
|
|
||||||
|
|
||||||
"Before update function modules are registered.
|
"Before update function modules are registered.
|
||||||
SET UPDATE TASK LOCAL.
|
SET UPDATE TASK LOCAL.
|
||||||
@@ -332,7 +328,7 @@ Example using `CL_ABAP_TX`:
|
|||||||
```abap
|
```abap
|
||||||
...
|
...
|
||||||
|
|
||||||
"Activating the modify transactional phase
|
"------------- Activating the modify transactional phase -------------
|
||||||
cl_abap_tx=>modify( ).
|
cl_abap_tx=>modify( ).
|
||||||
|
|
||||||
"The following database modification statement is not allowed in the
|
"The following database modification statement is not allowed in the
|
||||||
@@ -346,7 +342,7 @@ MODIFY zdemo_abap_carr FROM TABLE @( VALUE #(
|
|||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
"Activating the save transactional phase
|
"------------- Activating the save transactional phase -------------
|
||||||
cl_abap_tx=>save( ).
|
cl_abap_tx=>save( ).
|
||||||
|
|
||||||
"In this phase, database modifications are allowed.
|
"In this phase, database modifications are allowed.
|
||||||
@@ -447,11 +443,3 @@ The log shows the value 1 for the transaction state after the update task is exe
|
|||||||
- The work process information may change due to the fact that database commits are triggered when completing a dialog step. So you might expect different numbers there, but not necessarily. The new free work process can also be the same as the one before it was freed. However, there will be no different work process information for the update. The numbers will be the same because the update is performed in a single work process.
|
- The work process information may change due to the fact that database commits are triggered when completing a dialog step. So you might expect different numbers there, but not necessarily. The new free work process can also be the same as the one before it was freed. However, there will be no different work process information for the update. The numbers will be the same because the update is performed in a single work process.
|
||||||
- Before calling the program that displays database entries and the log, the SAP LUW key is the same throughout the transaction. It does not change until a new SAP LUW is opened. See and compare the last entry for the SAP LUW key in the log that is retrieved for the program submitted.
|
- Before calling the program that displays database entries and the log, the SAP LUW key is the same throughout the transaction. It does not change until a new SAP LUW is opened. See and compare the last entry for the SAP LUW key in the log that is retrieved for the program submitted.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
20
18_Dynpro.md
20
18_Dynpro.md
@@ -152,7 +152,7 @@ PROCESS AFTER INPUT.
|
|||||||
MODULE pai_9000.
|
MODULE pai_9000.
|
||||||
```
|
```
|
||||||
|
|
||||||
Implementation of the dialog modules in the ABAP program
|
Implementation of the dialog modules in the ABAP program:
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
MODULE pbo_9000 OUTPUT.
|
MODULE pbo_9000 OUTPUT.
|
||||||
@@ -432,7 +432,7 @@ PROCESS AFTER INPUT.
|
|||||||
|
|
||||||
SET SCREEN 9200.
|
SET SCREEN 9200.
|
||||||
|
|
||||||
***************************
|
**********************************************
|
||||||
|
|
||||||
"The current dynpro sequence is terminated.
|
"The current dynpro sequence is terminated.
|
||||||
SET SCREEN 0.
|
SET SCREEN 0.
|
||||||
@@ -478,24 +478,26 @@ SET SCREEN 0.
|
|||||||
"Dynpro 9100 is called.
|
"Dynpro 9100 is called.
|
||||||
LEAVE SCREEN.
|
LEAVE SCREEN.
|
||||||
|
|
||||||
****************************************
|
**************************************************************************
|
||||||
|
|
||||||
"The following statement ends the processing of the current dynpro.
|
"The following statement ends the processing of the current dynpro.
|
||||||
"The statically defined dynpro 9100 is overwritten. Dynpro 9200 is called.
|
"The statically defined dynpro 9100 is overwritten. Dynpro 9200 is called.
|
||||||
SET SCREEN 9200.
|
SET SCREEN 9200.
|
||||||
LEAVE SCREEN.
|
LEAVE SCREEN.
|
||||||
|
|
||||||
****************************************
|
**************************************************************************
|
||||||
|
|
||||||
"The following statement is a shorter form of the one above.
|
"The following statement is a shorter form of the one above.
|
||||||
"It has the same effect.
|
"It has the same effect.
|
||||||
LEAVE TO SCREEN 9200.
|
LEAVE TO SCREEN 9200.
|
||||||
|
|
||||||
****************************************
|
**************************************************************************
|
||||||
|
|
||||||
"Ending the dynpro sequence
|
"Ending the dynpro sequence
|
||||||
SET SCREEN 0.
|
SET SCREEN 0.
|
||||||
LEAVE SCREEN.
|
LEAVE SCREEN.
|
||||||
|
"Alternative
|
||||||
|
LEAVE TO SCREEN 0.
|
||||||
```
|
```
|
||||||
|
|
||||||
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
<p align="right"><a href="#top">⬆️ back to top</a></p>
|
||||||
@@ -543,7 +545,7 @@ ENDMODULE.
|
|||||||
"Setting the GUI status (in PBO)
|
"Setting the GUI status (in PBO)
|
||||||
SET PF-STATUS status.
|
SET PF-STATUS status.
|
||||||
|
|
||||||
****************************************
|
****************************************************************************
|
||||||
|
|
||||||
"Setting the GUI status and excluding function codes, i.e. the
|
"Setting the GUI status and excluding function codes, i.e. the
|
||||||
"specified function codes are deactivated. fcode expects either
|
"specified function codes are deactivated. fcode expects either
|
||||||
@@ -558,7 +560,7 @@ ENDMODULE.
|
|||||||
GET PF-STATUS status.
|
GET PF-STATUS status.
|
||||||
st = sy-pfkey.
|
st = sy-pfkey.
|
||||||
|
|
||||||
****************************************
|
****************************************************************************
|
||||||
|
|
||||||
"The following statement inserts the function codes which are
|
"The following statement inserts the function codes which are
|
||||||
"inactive in the current GUI status line by line into the
|
"inactive in the current GUI status line by line into the
|
||||||
@@ -579,7 +581,7 @@ ENDMODULE.
|
|||||||
"The name of the current GUI title is displayed in the system field sy-title.
|
"The name of the current GUI title is displayed in the system field sy-title.
|
||||||
gui_title = sy-title.
|
gui_title = sy-title.
|
||||||
|
|
||||||
****************************************
|
****************************************************************************
|
||||||
|
|
||||||
"WITH addition
|
"WITH addition
|
||||||
"The placeholders of a GUI title can be replaced by the formatted
|
"The placeholders of a GUI title can be replaced by the formatted
|
||||||
@@ -677,7 +679,7 @@ tabstr-activetab = 'SOME_TAB'.
|
|||||||
prog = sy-repid.
|
prog = sy-repid.
|
||||||
...
|
...
|
||||||
|
|
||||||
******************************************************
|
****************************************************************************
|
||||||
|
|
||||||
"Code in the flow logic
|
"Code in the flow logic
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ It provides references to more detailed information on the topic.
|
|||||||
> - Examples for deprecated and invalid syntax in ABAP for Cloud Development are included. Among them, the invalid statement `MOVE ... TO` and others which are just included for demonstration purposes. To set breakpoints in ADT, double-click the area to the left of the code line number.
|
> - Examples for deprecated and invalid syntax in ABAP for Cloud Development are included. Among them, the invalid statement `MOVE ... TO` and others which are just included for demonstration purposes. To set breakpoints in ADT, double-click the area to the left of the code line number.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
CLASS zcl_demo_abap_temp DEFINITION
|
CLASS zcl_some_class DEFINITION
|
||||||
PUBLIC
|
PUBLIC
|
||||||
FINAL
|
FINAL
|
||||||
CREATE PUBLIC .
|
CREATE PUBLIC .
|
||||||
@@ -73,7 +73,7 @@ It provides references to more detailed information on the topic.
|
|||||||
INTERFACES if_oo_adt_classrun.
|
INTERFACES if_oo_adt_classrun.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
CLASS zcl_demo_abap_temp IMPLEMENTATION.
|
CLASS zcl_some_class IMPLEMENTATION.
|
||||||
METHOD if_oo_adt_classrun~main.
|
METHOD if_oo_adt_classrun~main.
|
||||||
"ABAP SQL statements using database tables as data sources
|
"ABAP SQL statements using database tables as data sources
|
||||||
"Data source that cannot be accessed in ABAP Cloud
|
"Data source that cannot be accessed in ABAP Cloud
|
||||||
@@ -183,5 +183,3 @@ It provides references to more detailed information on the topic.
|
|||||||
> - 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.
|
> - 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.
|
||||||
> - The steps to import and run the code are outlined [here](README.md#-getting-started-with-the-examples).
|
> - 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)
|
> - [Disclaimer](README.md#%EF%B8%8F-disclaimer)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,8 @@ The following code snippets provide a commented selection of available syntax op
|
|||||||
Note that various combinations of multiple additions are possible, and some are not. See the ABAP Keyword Documentation for details.
|
Note that various combinations of multiple additions are possible, and some are not. See the ABAP Keyword Documentation for details.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
****************************** Type options ******************************
|
"-------------------------- Type options --------------------------
|
||||||
|
|
||||||
"Referring to a built-in type with TYPE
|
"Referring to a built-in type with TYPE
|
||||||
"In this case, a variable length character string can be inserted in the
|
"In this case, a variable length character string can be inserted in the
|
||||||
"generated input field. Note the LOWER CASE addition further down.
|
"generated input field. Note the LOWER CASE addition further down.
|
||||||
@@ -153,7 +154,7 @@ PARAMETERS pj length 40.
|
|||||||
"No explicit type and length specification means TYPE c LENGTH 1 by default
|
"No explicit type and length specification means TYPE c LENGTH 1 by default
|
||||||
PARAMETERS pk.
|
PARAMETERS pk.
|
||||||
|
|
||||||
****************************** Value options ******************************
|
"-------------------------- Value options --------------------------
|
||||||
|
|
||||||
"DEFAULT: Defining a start value (can also be a data object instead of a literal)
|
"DEFAULT: Defining a start value (can also be a data object instead of a literal)
|
||||||
PARAMETERS pl TYPE i DEFAULT 12345.
|
PARAMETERS pl TYPE i DEFAULT 12345.
|
||||||
@@ -167,7 +168,7 @@ PARAMETERS pn TYPE string DEFAULT `Hello World` LOWER CASE.
|
|||||||
"or checking against fixed values defined in the domain of the data type, and so on.
|
"or checking against fixed values defined in the domain of the data type, and so on.
|
||||||
"You can also perform your custom input checks. See the event block section below.
|
"You can also perform your custom input checks. See the event block section below.
|
||||||
|
|
||||||
****************************** Screen options ******************************
|
"-------------------------- Screen options --------------------------
|
||||||
|
|
||||||
"OBLIGATORY: Declaring the input field as a required field
|
"OBLIGATORY: Declaring the input field as a required field
|
||||||
"If there is no entry, the program cannot proceed when choosing Execute.
|
"If there is no entry, the program cannot proceed when choosing Execute.
|
||||||
@@ -207,7 +208,7 @@ PARAMETERS: prb1 RADIOBUTTON GROUP rbgr,
|
|||||||
"See the executable example.
|
"See the executable example.
|
||||||
PARAMETERS pt TYPE i AS LISTBOX VISIBLE LENGTH 10.
|
PARAMETERS pt TYPE i AS LISTBOX VISIBLE LENGTH 10.
|
||||||
|
|
||||||
*********************** Assigning function codes ***********************
|
"-------------------------- Assigning function codes --------------------------
|
||||||
|
|
||||||
"The AS CHECKBOX, RADIOBUTTON GROUP, AS LISTBOX additions can be combined
|
"The AS CHECKBOX, RADIOBUTTON GROUP, AS LISTBOX additions can be combined
|
||||||
"with the addition USER-COMMAND. That means, on selection, the event
|
"with the addition USER-COMMAND. That means, on selection, the event
|
||||||
@@ -304,7 +305,7 @@ SELECT-OPTIONS f FOR some_dobj DEFAULT 4 TO 8 OPTION NB SIGN I.
|
|||||||
- Selection screens can be created as regular dynpros or as subscreen dynpros.
|
- Selection screens can be created as regular dynpros or as subscreen dynpros.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
******************************** Pattern ***********************************
|
"-------------------------- Pattern --------------------------
|
||||||
|
|
||||||
SELECTION-SCREEN BEGIN OF SCREEN ...
|
SELECTION-SCREEN BEGIN OF SCREEN ...
|
||||||
|
|
||||||
@@ -315,7 +316,7 @@ SELECTION-SCREEN BEGIN OF SCREEN ...
|
|||||||
SELECTION-SCREEN END OF SCREEN ...
|
SELECTION-SCREEN END OF SCREEN ...
|
||||||
|
|
||||||
|
|
||||||
****************************** Regular dynpros ******************************
|
"-------------------------- Regular dynpros --------------------------
|
||||||
|
|
||||||
"Creating a selection screen as regular dynpro
|
"Creating a selection screen as regular dynpro
|
||||||
"Note that the dynpro number must be unique in the program. Do not use 1000.
|
"Note that the dynpro number must be unique in the program. Do not use 1000.
|
||||||
@@ -334,7 +335,7 @@ SELECTION-SCREEN BEGIN OF SCREEN 9002 AS WINDOW.
|
|||||||
...
|
...
|
||||||
SELECTION-SCREEN END OF SCREEN 9002.
|
SELECTION-SCREEN END OF SCREEN 9002.
|
||||||
|
|
||||||
****************************** Subscreen dynpros ******************************
|
"-------------------------- Subscreen dynpros --------------------------
|
||||||
|
|
||||||
"Can be included in other dynpros or selection screens, or in subscreen areas
|
"Can be included in other dynpros or selection screens, or in subscreen areas
|
||||||
"or tab pages. But they cannot be called explicitly.
|
"or tab pages. But they cannot be called explicitly.
|
||||||
@@ -599,7 +600,7 @@ WRITE some_text && sy-uname.
|
|||||||
"/: Writes to a new line
|
"/: Writes to a new line
|
||||||
WRITE / 'new line'.
|
WRITE / 'new line'.
|
||||||
|
|
||||||
*********** Positioning output ***********
|
"-------------------------- Positioning output --------------------------
|
||||||
"Specifying the output position (and output in new line)
|
"Specifying the output position (and output in new line)
|
||||||
WRITE /5 'positioned'.
|
WRITE /5 'positioned'.
|
||||||
"Specifying the length, no position specified means the output is
|
"Specifying the length, no position specified means the output is
|
||||||
@@ -617,7 +618,8 @@ DATA dc34 TYPE decfloat34 VALUE ' 1.2345 '.
|
|||||||
WRITE /(*) dc34.
|
WRITE /(*) dc34.
|
||||||
WRITE /1(**) dc34.
|
WRITE /1(**) dc34.
|
||||||
|
|
||||||
*********** Further specification options ***********
|
"--------------------- Further specification options ----------------------
|
||||||
|
|
||||||
"Various examples for further specification options, among them function
|
"Various examples for further specification options, among them function
|
||||||
"calls, string expressions, method calls
|
"calls, string expressions, method calls
|
||||||
DATA txt TYPE string VALUE `abap`.
|
DATA txt TYPE string VALUE `abap`.
|
||||||
@@ -657,7 +659,8 @@ WRITE: (*) sy-uname QUICKINFO 'User name',
|
|||||||
'/',
|
'/',
|
||||||
(*) sy-uzeit QUICKINFO 'Current time'.
|
(*) sy-uzeit QUICKINFO 'Current time'.
|
||||||
|
|
||||||
*********** Special list elements ***********
|
"--------------------- Special list elements ----------------------
|
||||||
|
|
||||||
"INPUT: Enabling fields for input
|
"INPUT: Enabling fields for input
|
||||||
"You can overwrite the output and further evaluate the overwritten
|
"You can overwrite the output and further evaluate the overwritten
|
||||||
"content in a list event.
|
"content in a list event.
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ DATA(parser_pa) = ixml_pa->create_parser(
|
|||||||
DATA(parsing_check) = parser_pa->parse( ).
|
DATA(parsing_check) = parser_pa->parse( ).
|
||||||
IF parsing_check = 0. "Parsing was successful
|
IF parsing_check = 0. "Parsing was successful
|
||||||
|
|
||||||
"************* Directly reading nodes *************
|
"--------------------- Directly reading nodes ----------------------
|
||||||
|
|
||||||
"Accessing the root element of the DOM. It can be used as the initial node
|
"Accessing the root element of the DOM. It can be used as the initial node
|
||||||
"for accessing subnodes.
|
"for accessing subnodes.
|
||||||
@@ -135,7 +135,8 @@ IF parsing_check = 0. "Parsing was successful
|
|||||||
"Result: First element searched for
|
"Result: First element searched for
|
||||||
DATA(element_by_name) = document_pa->find_from_name( name = `word3` )->get_value( ). "are
|
DATA(element_by_name) = document_pa->find_from_name( name = `word3` )->get_value( ). "are
|
||||||
|
|
||||||
"************* Reading using iterators *************
|
"--------------------- Reading using iterators ----------------------
|
||||||
|
|
||||||
"i.e. going over the XML nodes one after another
|
"i.e. going over the XML nodes one after another
|
||||||
|
|
||||||
"Creating an iterator
|
"Creating an iterator
|
||||||
@@ -179,7 +180,7 @@ ENDIF.
|
|||||||
Creating XML data using sXML:
|
Creating XML data using sXML:
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"************** Token-based rendering **************
|
"--------------------- Token-based rendering ----------------------
|
||||||
|
|
||||||
"For sXML, there are specialized writer classes, such as CL_SXML_STRING_WRITE.
|
"For sXML, there are specialized writer classes, such as CL_SXML_STRING_WRITE.
|
||||||
"Writers created with this class render XML data to a byte string.
|
"Writers created with this class render XML data to a byte string.
|
||||||
@@ -239,7 +240,7 @@ DATA(xml) = CAST cl_sxml_string_writer( writer )->get_output( ).
|
|||||||
" </flight>
|
" </flight>
|
||||||
"</flights>
|
"</flights>
|
||||||
|
|
||||||
"************** Object-oriented rendering **************
|
"--------------------- Object-oriented rendering ----------------------
|
||||||
|
|
||||||
DATA(writer_oo) = CAST if_sxml_writer( cl_sxml_string_writer=>create( type = if_sxml=>co_xt_xml10
|
DATA(writer_oo) = CAST if_sxml_writer( cl_sxml_string_writer=>create( type = if_sxml=>co_xt_xml10
|
||||||
encoding = 'UTF-8' ) ).
|
encoding = 'UTF-8' ) ).
|
||||||
@@ -296,7 +297,7 @@ DATA(xml_oo) = CAST cl_sxml_string_writer( writer_oo )->get_output( ).
|
|||||||
Parsing XML data using sXML:
|
Parsing XML data using sXML:
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"************** Token-based parsing **************
|
"--------------------- Token-based parsing ----------------------
|
||||||
|
|
||||||
"Creating reader
|
"Creating reader
|
||||||
"Note: See the comments for the writer above. It is similar here. For readers,
|
"Note: See the comments for the writer above. It is similar here. For readers,
|
||||||
@@ -333,7 +334,7 @@ TRY.
|
|||||||
...
|
...
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
||||||
"************** Object-oriented parsing **************
|
"--------------------- Object-oriented parsing ----------------------
|
||||||
|
|
||||||
"Creating demo XML data to be used in the example.
|
"Creating demo XML data to be used in the example.
|
||||||
DATA(xml_oo_read) = cl_abap_conv_codepage=>create_out( )->convert(
|
DATA(xml_oo_read) = cl_abap_conv_codepage=>create_out( )->convert(
|
||||||
@@ -453,7 +454,7 @@ ENDTRY.
|
|||||||
There are multiple options. Check the executable example to explore them.
|
There are multiple options. Check the executable example to explore them.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"**************** Transforming XML data ****************
|
"--------------------- Transforming XML data ----------------------
|
||||||
"Options for src:
|
"Options for src:
|
||||||
"- Data object of type string or xstring containing XML data in XML 1.0 format
|
"- Data object of type string or xstring containing XML data in XML 1.0 format
|
||||||
"- Standard table with flat character-like or byte-like line type
|
"- Standard table with flat character-like or byte-like line type
|
||||||
@@ -462,7 +463,7 @@ There are multiple options. Check the executable example to explore them.
|
|||||||
CALL TRANSFORMATION ... SOURCE XML src
|
CALL TRANSFORMATION ... SOURCE XML src
|
||||||
RESULT ...
|
RESULT ...
|
||||||
|
|
||||||
"**************** Transforming ABAP data ****************
|
"--------------------- Transforming ABAP data ----------------------
|
||||||
"No XML specified after SOURCE
|
"No XML specified after SOURCE
|
||||||
"Options for src:
|
"Options for src:
|
||||||
"- One or multiple ABAP data objects (abap1 in the snippet) can be specified as
|
"- One or multiple ABAP data objects (abap1 in the snippet) can be specified as
|
||||||
@@ -485,7 +486,7 @@ CALL TRANSFORMATION ... SOURCE (srctab)
|
|||||||
There are multiple options. Check the executable example to see them in action.
|
There are multiple options. Check the executable example to see them in action.
|
||||||
|
|
||||||
```abap
|
```abap
|
||||||
"**************** Transforming to XML data ****************
|
"--------------------- Transforming to XML data ----------------------
|
||||||
"Options for res:
|
"Options for res:
|
||||||
"- Data object of type string or xstring
|
"- Data object of type string or xstring
|
||||||
"- Data object declared inline (e.g. DATA(a) or FINAL(b)), which has then the type xstring
|
"- Data object declared inline (e.g. DATA(a) or FINAL(b)), which has then the type xstring
|
||||||
@@ -494,7 +495,7 @@ There are multiple options. Check the executable example to see them in action.
|
|||||||
CALL TRANSFORMATION ... SOURCE ...
|
CALL TRANSFORMATION ... SOURCE ...
|
||||||
RESULT XML res.
|
RESULT XML res.
|
||||||
|
|
||||||
"**************** Transforming to ABAP data ****************
|
"--------------------- Transforming to ABAP data ----------------------
|
||||||
"No XML specified after RESULT
|
"No XML specified after RESULT
|
||||||
"Similar to above, multiple ABAP data objects can be specified as a static parameter list.
|
"Similar to above, multiple ABAP data objects can be specified as a static parameter list.
|
||||||
CALL TRANSFORMATION ... SOURCE ...
|
CALL TRANSFORMATION ... SOURCE ...
|
||||||
|
|||||||
Reference in New Issue
Block a user