- SAP ABAP Reports
- Report Types and Events
- Message Class
- Example of Classical Report
- Example of Interactive Report
- Example of ALV Report
- Example of Blocked ALV Report
- Example of Hierarchical Report
- Module Pool Programming
- Screen Painter Components
- Events in Flow Logic Editor
- Screen Elements and Creation Steps
- Working with Validations
- Database Operations
- OO Programming in ABAP
- Types of Programming Structure
- Key Features of OO Programming
- Classes and Objects
- Types of Visibility Section
- Class Defination and Implementation
- Object Creation for Class
- Method Declaration and Implementation
- Types of Component Class
- Global Class and implement GLOBAL methods
- OOP's ALV
- OOP's BDC
24REPORT1408 – Example of Classical Report
*&———————————————————————*
*& Report ZCLS_REPORT_NEW
*&———————————————————————*
*&
*&———————————————————————*
REPORT ZCLS_REPORT_NEW.
TABLES: MARA.
TYPES: BEGIN OF GTY_MARA,
MATNR TYPE MATNR,
ERSDA TYPE ERSDA,
ERNAM TYPE ERNAM,
MTART TYPE MTART,
MATKL TYPE MATKL,
BISMT TYPE BISMT,
MEINS TYPE MEINS,
GEWEI TYPE GEWEI,
SPART TYPE SPART,
END OF GTY_MARA.
DATA: IT_MARA TYPE STANDARD TABLE OF GTY_MARA,
WA_MARA TYPE GTY_MARA.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:S_MATNR FOR MARA-MATNR.
SELECTION-SCREEN : END OF BLOCK B1.
START-OF-SELECTION.
SELECT MATNR
ERSDA
ERNAM
MTART
MATKL
BISMT
MEINS
GEWEI
SPART
FROM MARA INTO TABLE IT_MARA WHERE MATNR IN S_MATNR.
LOOP AT IT_MARA INTO WA_MARA.
WRITE:/ WA_MARA-MATNR,
35 WA_MARA-ERSDA,
55 WA_MARA-ERNAM,
75 WA_MARA-MTART,
92 WA_MARA-MATKL,
130 WA_MARA-BISMT,
150 WA_MARA-MEINS,
170 WA_MARA-GEWEI,
190 WA_MARA-SPART.
ENDLOOP.
ULINE.
WRITE:/’Classical Report has been created.’.
ULINE.
TOP-OF-PAGE.
WRITE:/ ‘MATERIAL’,
35 ‘Created On’,
58 ‘Name’,
73 ‘MATERIAL TYPE’,
90 ‘MATERIAL GROUP’,
120 ‘OLD MATERIAL NUMBER’,
150 ‘UOM’,
168 ‘UNIT OF WEIGHT’,
188 ‘DIVISION’.
ULINE.
END-OF-PAGE.
Output:
Author : Aniket Pawar, 9373518385
24REPORT1408 – Example of Classical Report
*&———————————————————————*
*& Report ZCLS_REPORT_NEW
*&———————————————————————*
*&
*&———————————————————————*
REPORT ZCLS_REPORT_NEW.
TABLES: MARA.
TYPES: BEGIN OF GTY_MARA,
MATNR TYPE MATNR,
ERSDA TYPE ERSDA,
ERNAM TYPE ERNAM,
MTART TYPE MTART,
MATKL TYPE MATKL,
BISMT TYPE BISMT,
MEINS TYPE MEINS,
GEWEI TYPE GEWEI,
SPART TYPE SPART,
END OF GTY_MARA.
DATA: IT_MARA TYPE STANDARD TABLE OF GTY_MARA,
WA_MARA TYPE GTY_MARA.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:S_MATNR FOR MARA-MATNR.
SELECTION-SCREEN : END OF BLOCK B1.
START-OF-SELECTION.
SELECT MATNR
ERSDA
ERNAM
MTART
MATKL
BISMT
MEINS
GEWEI
SPART
FROM MARA INTO TABLE IT_MARA WHERE MATNR IN S_MATNR.
LOOP AT IT_MARA INTO WA_MARA.
WRITE:/ WA_MARA-MATNR,
35 WA_MARA-ERSDA,
55 WA_MARA-ERNAM,
75 WA_MARA-MTART,
92 WA_MARA-MATKL,
130 WA_MARA-BISMT,
150 WA_MARA-MEINS,
170 WA_MARA-GEWEI,
190 WA_MARA-SPART.
ENDLOOP.
ULINE.
WRITE:/’Classical Report has been created.’.
ULINE.
TOP-OF-PAGE.
WRITE:/ ‘MATERIAL’,
35 ‘Created On’,
58 ‘Name’,
73 ‘MATERIAL TYPE’,
90 ‘MATERIAL GROUP’,
120 ‘OLD MATERIAL NUMBER’,
150 ‘UOM’,
168 ‘UNIT OF WEIGHT’,
188 ‘DIVISION’.
ULINE.
END-OF-PAGE.
Output:
Author : Aniket Pawar, 9373518385