We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
The statement MODIFY inserts one or more rows specified in source into the DDIC database table or DDIC table view specified in target, or overwrites existing rows. The addition connection can be used to specify a secondary connection.
The addition MAPPING FROM ENTITY is used to handle structures and internal tables that are typed with
types. Find more information in the topic ABAP SQL Statements with MAPPING FROM ENTITY.
The statement MODIFY sets the values of the system fields sy-subrc and sy-dbcnt.
|0||When a work area was specified in source, the specified row was inserted or modified. When an internal table was specified in source, all specified rows were inserted or modified, or the internal table is empty.|
|2||When a LOB handle structure was specified with a component for writer streams, the non-LOB handle components were not yet written to the database, and instead are passed when the stream is closed, at the latest. Whether this situation occurs or not depends on the database. See LOB handles.|
|4||When a work area or a subquery was specified in source, no rows were processed, or when an internal table was specified in source, not all specified rows were processed because there is already a row with the same unique secondary index in the database table.|
The statement MODIFY sets sy-dbcnt to the number of processed rows. If an overflow occurs
because the number or rows is greater than 2,147,483,647, sy-dbcnt is set to -1. If sy-subrc is 2, sy-dbcnt is also set to the value -1 (for undefined).
The first MODIFY statement inserts a row in an empty table. The second MODIFY statement modifies the values of the non-key fields of this row and inserts two additional rows.