We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
... NEW class( ... )->attr $|
CAST type( ... )->dobj
$| table_exp ...
1. ... NEW class( ... )->attr $| CAST type( ... )->dobj
2. ... table_exp
The operand position after ASSIGN is a result position in which
writable expressions can be specified.
... NEW class( ... )->attr $| CAST type( ... )->dobj
This alternative to specifying the memory area mem_area of the statement ASSIGN assigns the result of the following constructor expression to a field symbol:
The same rules apply as to statically specifying the memory area, but no offsets/lengths can be specified.
Constructor expression with NEW in the specified memory area of the statement ASSIGN. The assignment of the attribute attr to a field symbol persists the object.
Constructor expression with CAST in the specified memory area of ASSIGN statements.
... table_exp
This alternative to specifying the memory area mem_area of the statement ASSIGN assigns the result of the table expression table_exp or table expression chaining to the field symbol. The result of a table expression in these positions is always a temporary field symbol.
In this variant, the statement ASSIGN sets the return code sy-subrc.
Unlike in other use cases of table expressions, the system field sy-tabix is set here in the same way as in a corresponding READ TABLE statement.
If the assignment is not successful, the field symbol keeps its previous state. In this variant, it is therefore not sufficient to evaluate the predicate expression <fs> IS ASSIGNED, but sy-subrc needs to be checked as well.
In this variant of the statement ASSIGN, the addition CASTING can only be specified in assignments to an existing field symbol and not in inline declarations, and only as a standalone addition. The addition RANGE cannot be specified.
This example works in the same way as the example for READ TABLE ... ASSIGNING .... Here, the READ statement is replaced by an ASSIGN statements and the required component is assigned directly.
Leave us your contact details and we will call you back. Fields marked with * are mandatory.
We offer holistic SAP solutions from a single source to shape digital change and develop new business areas.
Switzerland
Schaffhausen
Germany
Mannheim, Düsseldorf, Munich
USA
Haverhill
Greece
Thessaloniki