SAP INSERT ITAB RESULT ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• ELSE UNASSIGN INSERT itab
• CASTING INSERT itab
• ASSIGNING INSERT itab
• REFERENCE INTO INSERT itab

INSERT, result
Short Reference

ABAP_SYNTAX
ABAP_KEY ... ${ ASSIGNING <(><)> $[CASTING$] $[ELSE UNASSIGN$] $}
$| ${ REFERENCE INTO dref $}.

What does it do?
These additions can only be used when inserting single lines. If the insertion is successful, the addition ASSIGNING is used to assign the inserted line to a field symbol <(><)> or the addition REFERENCE INTO is used to set a reference to the inserted line in a reference variable.
The syntax and meaning are the same as when specifying the output behavior in the statement READ TABLE and the same restrictions apply regarding the modification of key fields for primary and secondary table keys. In particular, inline declarations using the declaration operators DATA, FINAL and FIELD-SYMBOL are possible. The addition ELSE UNASSIGN sets the state of the field symbol behind ASSIGNING to unassigned if the insertion was not successful and sy-subrc is set to 4. Otherwise, the field symbol keeps its previous state.

ABAP_EXAMPLE_VX5
See addition INITIAL LINE.
ABAP_EXAMPLE_END

ABAP_EXAMPLE_VX5
After the DO loop, the internal table ref_tab contains references to each line of the internal table itab.
ABEXA 00345
ABAP_EXAMPLE_END

Return to menu