Sie sind auf Seite 1von 14

Prototype No : 1

• This report program uses a class to create


a report. All the headers are appended to
an internal table ‘it_heads’ and all the data
to be reported is appended field by field
into an internal table ‘it_export’. These
two internal tables along with the linesize
are exported to the class ‘Report’ which
creates the report.
1 The ASPplus Solutions Compan
Declaration

• Internal table to hold all headers


• Internal table to hold report data
• Internal table holding report data to be
exported to class report
• Variable v_linesize to hold linesize of
report

2 The ASPplus Solutions Compan


Start-of-selection

• Start of selection
populate internal table to hold report data

3 The ASPplus Solutions Compan


Populating Internal tables

• Append all collected report data to the


table being exported
• Append all headers to table being
exported

4 The ASPplus Solutions Compan


Exporting

• Export headers, data and length of report


to class report
• Call the program to create class report
which will create the report.

5 The ASPplus Solutions Compan


Program which creates the class

• This program contains the class definition


which can be used to create a report based
on the header table ‘it_headers’ which
contains all headers of the report and the
data table ‘it_data’ which contains all the
report data and the line size of the report
exported from the report program and
imported by this program
6 The ASPplus Solutions Compan
Declarations

• Internal table for headers


• Internal table for report data
• Variable v_index
• Variable v_pix for column number
• Variable v_temp
• Variable n_cnt for number of columns in
the report

7 The ASPplus Solutions Compan


Class Definition

Class report definition

public section.
methods :
constructor

endclass

8 The ASPplus Solutions Compan


Class Implementation

Class report implementation


method constructor
– import headers, data and length of report to class
report.
– Determine the number of columns in the report
– Calculate the report length
– Check that the report length is less than the
report line size.

9 The ASPplus Solutions Compan


Continued...

– Create the report header


– Create the report data
endmethod
endclass

10 The ASPplus Solutions Compan


Prototype No II.

• This program gives the documentation of


DATA ELEMENTS or TABLES from the
respective database tables depending on a
simple flag set in the program.

11 The ASPplus Solutions Compan


Prototype definition
• DEFINITION
class documentation_help definition.
public section.
methods:
display_help,
constructor importing
im_flag type c
im_type type c.
12 The ASPplus Solutions Compan
Prototype definition

Data: it_data_elem like standard table of it_Data,


type(1) type c,
Flag(1) type c.

private section.
methods:
get_table_texts,
get_de_texts,
report_output.
13 The ASPplus Solutions Compan
Prototype definition

data:
it_texts_Wa like line of it_texts,
it_texts like standard table of it_texts.
endclass.

14 The ASPplus Solutions Compan