Software Development Exam  >  Software Development Notes  >  Learn and Master SAP ABAP  >  SAP ABAP - Report Programming

SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development PDF Download

Introduction

  • A report is a presentation of data in an organized structure. Many database management systems include a report writer that enables you to design and generate reports. SAP applications support report creation.
  • A classical report is created by using the output data in the WRITE statement inside a loop. They do not contain any sub-reports. SAP also provides some standard reports such as RSCLTCOP that is used to copy tables across clients and RSPARAM that is used to display instance parameters.
  • These reports consist of only one screen as an output. We can use various events such as INITIALIZATON & TOP-OF-PAGE to create a classical report, and each event has its own importance during the creation of a classical report. Each of these events is associated to a specific user action and is triggered only when the user performs that action.

Following is a table describing the events and descriptions −
SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development

Example

Let's create a classical report. We will display the information stored in the standard database MARA (contains general material data) by using a sequence of statements in ABAP editor.

REPORT ZREPORT2 

LINE-SIZE 75 

LINE-COUNT 30(3) 

NO STANDARD PAGE HEADING. 

Tables: MARA. 

TYPES: Begin of itab, 

MATNR TYPE MARA-MATNR, 

MBRSH TYPE MARA-MBRSH, 

MEINS TYPE MARA-MEINS, 

MTART TYPE MARA-MTART, 

End of itab. 

DATA: wa_ma TYPE itab,

      it_ma TYPE STANDARD TABLE OF itab.

        

SELECT-OPTIONS: MATS FOR MARA-MATNR OBLIGATORY. 

INITIALIZATION. 

MATS-LOW = '1'. 

MATS-HIGH = '500'. 

APPEND MATS. 

AT SELECTION-SCREEN. .

IF MATS-LOW = ' '. 

MESSAGE I000(ZKMESSAGE). 

ELSEIF MATS-HIGH = ' '. 

MESSAGE I001(ZKMESSAGE). 

ENDIF. 

TOP-OF-PAGE. 

WRITE:/ 'CLASSICAL REPORT CONTAINING GENERAL MATERIAL DATA  

FROM THE TABLE MARA' COLOR 7. 

ULINE. 

WRITE:/ 'MATERIAL' COLOR 1, 

24 'INDUSTRY' COLOR 2, 

38 'UNITS' COLOR 3, 

53 'MATERIAL TYPE' COLOR 4. 

ULINE. 

END-OF-PAGE. 

START-OF-SELECTION. 

SELECT MATNR MBRSH MEINS MTART FROM MARA  

INTO TABLE it_ma WHERE MATNR IN MATS. 

LOOP AT it_ma into wa_ma. 

WRITE:/  wa_ma-MATNR, 

25 wa_ma-MBRSH, 

40 wa_ma-MEINS, 

55 wa_ma-MTART. 

ENDLOOP. 

END-OF-SELECTION. 

ULINE. 

WRITE:/ 'CLASSICAL REPORT HAS BEEN CREATED' COLOR 7.

ULINE. 

SKIP. 

The above code produces the following output containing the general material data from the standard table MARA −

SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development

The document SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development is a part of the Software Development Course Learn and Master SAP ABAP.
All you need of Software Development at this link: Software Development
73 videos|68 docs

Top Courses for Software Development

73 videos|68 docs
Download as PDF
Explore Courses for Software Development exam

Top Courses for Software Development

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Exam

,

SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development

,

past year papers

,

Viva Questions

,

SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development

,

Previous Year Questions with Solutions

,

Objective type Questions

,

pdf

,

Summary

,

practice quizzes

,

Important questions

,

Extra Questions

,

study material

,

shortcuts and tricks

,

Sample Paper

,

MCQs

,

Free

,

mock tests for examination

,

SAP ABAP - Report Programming | Learn and Master SAP ABAP - Software Development

,

ppt

,

Semester Notes

,

video lectures

;