REPORT ZSAPN_SUM_APPEND.
TYPES: BEGIN OF TY_DATA, "user defined type
       ID TYPE N ,
       NAME TYPE CHAR20,
       SALARY TYPE I,
      END OF TY_DATA.
DATA : ITAB TYPE TABLE OF TY_DATA. "internal table
DATA : WA TYPE TY_DATA. "work area

WA-ID = 1.
WA-NAME = 'Sapnuts'.
WA-SALARY = 5000.
APPEND WA TO ITAB. "APPEND
CLEAR WA.

WA-ID = 2.
WA-NAME = 'SAPabap'.
WA-SALARY = 50000.
APPEND WA TO ITAB. "APPEND
CLEAR WA.

WA-ID = 1.
WA-NAME = 'Sapnuts'.
WA-SALARY = 15000.
APPEND WA TO ITAB. "APPEND
CLEAR WA.

LOOP AT ITAB INTO WA.
  WRITE:/ WA-ID, WA-NAME, WA-SALARY. "loop and display data
ENDLOOP.
 
 
Serkan AKKAVAK
Computer Engineer
serkurumsal@yandex.com