Report development technique

12
Report Development Techniques

Transcript of Report development technique

Page 1: Report development technique

Report Development Techniques

Page 2: Report development technique

Analysis of Business Data for :

Taking Decision. Planning. Forecasting. Conclusion / Inferences.

Purpose of analysis.

According to SAP Reports means Business Analysis.

Business Reports:

Providing Business Information / Data in a convenient form, as desired for Business Analysis.

Page 3: Report development technique

SAP Applications

Database

Present the Data

Extract Data

VA01--------------- Sales Order.

ME21-------------- Create purchasing order.

Page 4: Report development technique

Report Development Techniques

Classical Reports Simple Reports

Complex Reports

Interactive Reports / Drill Down Reports

Report Development Using Logical Databases.

Report generation using SAP Queries.

Report Development using ALV (ABAP List Viewer).

Page 5: Report development technique

Task: To Develop Customer Information Report

Tables: KNA1- General Data in Customer Master

Fields:

KUNNR --------- Customer NumberNAME1 --------- Customer NameORT01 ------------- CityLAND1 ------------ Country

Page 6: Report development technique

ABAP Programming Guidelines and Naming Standards.

1. Separate each section of the program with a descriptive full line comment.

2. Provides mid line comment for each data object or type that refers to a dictionary definition.

3. User defined data type names should have the prefix “ ty_”.

4. Define data types and then define the data objects with reference to data types.

5. Work area names should have the prefix “ W”.6. Internal table names should have the prefix “T”.7. Modularize the program , where ever possible.

Page 7: Report development technique

Report Events

• Report Events are predefined with in the ABAP programming Environment. These events are triggered automatically as per their purpose but are processed only when they are specified in the report program.

• Report Events are independent processing blocks in an ABAP program.

• They can be defined anywhere in the ABAP program.

• When the event gets triggered, a SAP system locates the event block and then process the same.

Page 8: Report development technique

<event name>.<statements – To be processed when the event gets triggered>

Event Block

Top-of-Page.<statements>

Event Block

TOP-OF-PAGE is processed every time , before a new page is displayed onto the output.

Page 9: Report development technique

Task : To Develop Customer Wise Sales Orders Report.

Specifications to be fulfilled:

1. Provides a selection screen accepting Customer Number range and order number range.

2. Provide Page Header and Page Footer with page number on each page.

3. Display Sub Total Order Value for each Customer’s Orders.4. Display Grand Total Order Value for the report.5. Display Sub Total Order Value in Words.6. Details of every new customer to be displayed in a new

page.7. Do not display redundant data in the report.8. Provide default input values to the selection Screen.9. Validate input values of the selection screen.

Page 10: Report development technique

Tables & Fields:

KNA1 - General Data in Customer MasterKUNNR - Customer NumberNAME1 - Customer Name ORT01 - City LAND1 - Country

VBAK - Sales Order - Header DataVBLEN - Order NoERDAT - Order DateNETWR - Order ValueKUNNR - Customer Number

VBAB - Sales Order – Detail Data

POSNR - Item NumberARKTX - Item DescriptionWERKS - PlantVBELN - Order No

PK

PK

FK

FK

Page 11: Report development technique

Control Break Events:

These events are used only within Loop … Endloop.AT FIRST.<Statements>.ENDAT.

AT NEW <field>.<statements>.ENDAT.

AT END OF <field>.<statements>.ENDAT.

AT LAST<statements>.ENDAT.

Page 12: Report development technique

Report Event : INITIALIZATION

If this event is specified in the report program , this will be the first event to be processed by the SAP system.

This event will be processed only once, at the beginning of the program execution.

This event is used :

To provide default values to selection screen fields.

To initialize any other data objects. To define Constants. To execute any abap statement once, at

the beginning of the program execution.