Get Example source ABAP code based on a different SAP table
• CASTING COLLECT • ASSIGNING COLLECT • REFERENCE INTO COLLECT
COLLECT>, result> Short Reference >
ABAP_SYNTAX ABAP_KEY ... ${ ASSIGNING <(><)> $[CASTING$] $}> $| ${ REFERENCE INTO dref $}.>
What does it do? The addition ASSIGNING> is used to assign the inserted or existing line to a field symbol <(><)>> and the addition REFERENCE INTO> is used to set a reference to the line in a reference variable. The syntax and meaning are the same as when specifying the output behavior in the statement READ TABLE> > with the exception that the addition ELSE UNASSIGN> cannot be used. 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.
ABAP_EXAMPLE_VX5 The statement COLLECT> is executed until the column num> reaches the value 100 for one of the three possible key values. ABEXA 00114 ABAP_EXAMPLE_END