SAP® Documentation

Single view

ABAPAPPEND_RESULT - APPEND RESULT

CPI1466 during Backup   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

APPEND - result

Short Reference



Syntax

... ${ ASSIGNING <fs> $[CASTING$]$}
  $| ${ REFERENCE INTO dref $}.

Effect

These additions can only be used when appending single rows. If the append was successful, the addition ASSIGNING is used to assign the appended row to a field symbol <fs>; the addition REFERENCE INTO is used to set a reference to the appended row 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 and FIELD-SYMBOL are possible.

Example

See the addition INITIAL LINE.

Example

After the DO loops, the data references in stab point to the random numbers up to 50 and those in ltab point to the random numbers larger than 50 that were appended to itab.

DATA:
  itab TYPE TABLE OF i WITH EMPTY KEY,
  stab TYPE TABLE OF REF TO i WITH EMPTY KEY,
  ltab TYPE TABLE OF REF TO i WITH EMPTY KEY.

DATA(rnd) = cl_abap_random_int=>create( seed = + sy-uzeit
                                        min  = 1
                                        max  = 100 ).

DO 100 TIMES.
  APPEND rnd->get_next( ) TO itab REFERENCE INTO DATA(dref).
  IF dref->* <= 50.
    APPEND dref TO stab.
  ELSE.
    APPEND dref TO ltab.
  ENDIF.
ENDDO.






General Material Data   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 3233 Date: 20200127 Time: 235308     sap01-206 ( 42 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.