Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REPORT ZMMREP01_TEST.
- TYPES : BEGIN OF ty_it,
- num,
- END OF ty_it.
- DATA it TYPE TABLE OF ty_it WITH HEADER LINE.
- do 3 TIMES.
- it-num = 1.
- APPEND it.
- ENDDO.
- DO 3 TIMES.
- it-num = 2.
- APPEND it.
- ENDDO.
- *BREAK-POINT.
- LOOP AT it.
- AT new num.
- WRITE :/ 'NEW'.
- ENDAT.
- "
- WRITE :/ 'no at new and at end'.
- "
- at END OF num.
- WRITE :/ 'END'.
- ENDAT.
- ENDLOOP.
- 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.
- COLLECT WA INTO ITAB. "collect
- CLEAR WA.
- WA-ID = 2.
- WA-NAME = 'SAPabap'.
- WA-SALARY = 50000.
- COLLECT WA INTO ITAB. "collect
- CLEAR WA.
- WA-ID = 1.
- WA-NAME = 'Sapnuts'.
- WA-SALARY = 15000.
- COLLECT WA INTO ITAB. "collect
- CLEAR WA.
- LOOP AT ITAB INTO WA.
- WRITE:/ WA-ID, WA-NAME, WA-SALARY. "loop and display data
- ENDLOOP.
Add Comment
Please, Sign In to add comment