Code :
REPORT ZVP_COLLECT_PROGRAM.
TYPES: BEGIN OF PERSON,
ID TYPE N,
NAME TYPE CHAR10,
SALARY TYPE I,
END OF PERSON.
DATA: IT TYPE TABLE OF PERSON,
WA TYPE PERSON.
WA-ID = '1'.
WA-NAME = 'SANJAY'.
WA-SALARY = '5000'.
COLLECT WA INTO IT.
CLEAR WA.
WA-ID = '1'.
WA-NAME = 'SANJAY'.
WA-SALARY = '500'.
COLLECT WA INTO IT.
CLEAR WA.
WA-ID = '3'.
WA-NAME = 'NIKESH'.
WA-SALARY = '3000'.
COLLECT WA INTO IT.
CLEAR WA.
WA-ID = '4'.
WA-NAME = 'HIMANGSHU'.
WA-SALARY = '5200'.
COLLECT WA INTO IT.
CLEAR WA.
LOOP AT IT INTO WA.
WRITE: / WA-ID, '|',
WA-NAME, '|',
WA-SALARY.
ULINE.
ENDLOOP.
Output :
IDE Used To Test This Code : ABAP Editor.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
REPORT ZVP_COLLECT_PROGRAM.
TYPES: BEGIN OF PERSON,
ID TYPE N,
NAME TYPE CHAR10,
SALARY TYPE I,
END OF PERSON.
DATA: IT TYPE TABLE OF PERSON,
WA TYPE PERSON.
WA-ID = '1'.
WA-NAME = 'SANJAY'.
WA-SALARY = '5000'.
COLLECT WA INTO IT.
CLEAR WA.
WA-ID = '1'.
WA-NAME = 'SANJAY'.
WA-SALARY = '500'.
COLLECT WA INTO IT.
CLEAR WA.
WA-ID = '3'.
WA-NAME = 'NIKESH'.
WA-SALARY = '3000'.
COLLECT WA INTO IT.
CLEAR WA.
WA-ID = '4'.
WA-NAME = 'HIMANGSHU'.
WA-SALARY = '5200'.
COLLECT WA INTO IT.
CLEAR WA.
LOOP AT IT INTO WA.
WRITE: / WA-ID, '|',
WA-NAME, '|',
WA-SALARY.
ULINE.
ENDLOOP.
Output :
IDE Used To Test This Code : ABAP Editor.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Post a Comment