Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Classic Report

Former Member
0 Likes
1,834

what is the ClassicReport?

6 REPLIES 6
Read only

Former Member
0 Likes
1,539

there are two types of reports.

Classical Report

and

Interative report.

<b>Classical report is the report in which user can sipmly watch the output list and cannot do other than seeing the list.</b>

Interactive reports are reports in which the user can interact with the list such as pressing a function key or double clicking the firld.

Check this link for classical ALV reports.

http://www.geocities.com/mpioud/Abap_programs.html

Read only

0 Likes
1,539

Hi,

As others have said, classical reports are just plain reports wherein after fetching/combing the data, it will write it. You cannot edit/manipulate the data being displayed.

Regards!

P.S. Please award points for useful answers.

Read only

Former Member
0 Likes
1,539

Hi Vijay,

In classical reporting, there's no user interaction on the list. The program is executed and a list is displayed. The user can just view the list and probably print it. And the events (START-OF-SELECTION, END-OF-SELECTION, TOP-OF-PAGE) are not controlled by the user.

Regards,

Mukesh Kumar

Read only

Former Member
0 Likes
1,539

hi vijay reddy,

<u>classical reports</u>

classical reports are Conventional reports do not allow interaction by the user; therefore, the basic list contains extensive information that the user must often sort through to find the relevant data.

it gives the information what the user needed to refer in a well format.

what do u realy want in classical report.please mention.

thanks and regards,

manik

Read only

Former Member
0 Likes
1,539

Hi Vijay,

• Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.

• Events In Classical Reports.

• INTIALIZATION: This event triggers before selection screen display.

• AT-SELECTION-SCREEN: This event triggers after processing user input still selection screen is in active mode.

• START OF SELECTIONS: Start of selection screen triggers after processing selection screen.

• TOP-OF-PAGE: It provides header for ABAP reports.

• END-OF-PAGE: It provides footer for page.

• AT PF: For predefined function keys

• END-OF-SELECTION

Go through this link also:

http://www.sapdevelopment.co.uk/

Regards,

Bhavana

Read only

Former Member
0 Likes
1,539

Hai Reddy

This is the order of execution in Classical/Interactive Report Events

Classical Reports

Reports which are properly formatted (header, footer, page numbers etc.,) with the help of one or more external events like top-of-page,end-of-page etc., are called as CLASSICAL REPORTS.

Standard list.

Output of Report program is nothing but Standard list. It consists of one continuous page of 60,000 lines.

To restrict number of lines per page.

Report Zxxxxx line-count 25.

OR

Report Zxxxxx line-count 25(3).

( In this case 3 lines are reserved for footer)

To restrict Output width.

Report Zxxxx line-size 125.

To suppress standard page heading.

Report Zxxxx no standard page heading

Above all at a time:

Report Zxxxx line-count 25(3)

line-size 125

no standard page heading.

Screen Events List Events

Initialization. Start-of-selection

At selection-screen. Top-of-page.

At selection-screen on <field>. End-of-page.

End-of-selection.

We can initialize the selection-screen with calculated default values under this event.

Initialization.

s_date-high = sy-datum.

s_date-low = sy-datum - 15.

Append s_date.

We can validate all the inputs on selection screen fields under this event.

At selection-screen.

If s_carrid-low is initial or

s_connid-low is initial or

s_date is initial.

< ... code for validation... >.

Endif.

We can validate a particular field input on selection screen under this event.

At selection-screen on s_carrid.

If s_carrid-low < > ‘LH’.

<… code for validation…>

Endif.

If any of the other event comes before

‘Select…Endselect.’ statements, then to break

that event, we require this S-O-S event.

Start-of-selection.

Select * from ……

…………

Endselect.

If we need some portion of the output (like

column headings) to appear in all the pages,

then we use this event.

Top-of-page.

Write:/ ‘Carrier’,10 ‘Connection’ 20 ‘Date’.

If there is no external output statement before

‘Top-of-page’ event, then this event will not

work.

Once the cursor reaches the last line of the

page, automatically this event will be triggered.

Report Zxxx line-count 25(3).

In this case line numbers 23, 24 and 25 are

reserved for footer.

Once the cursor reaches 23rd line, this event

will be triggered.

End-of-page.

Write:/ sy-uline(75).

Write:/ ‘This is end of page:’,sy-pagno.

Write:/ sy-uline(75).

This event is used for concluding part of List.

End-of-selection.

Write:/ ‘This is end of the Report’.

Interactive Report

A simple report or even a classical report displays a clustered list with all the requested output at one go.

What ever it is displayed, it is final. That means, the user can not interact with with that list.

A simple report or even a classical report displays a clustered list with all the requested output at one go.

What ever it is displayed, it is final. That means, the user can not interact with with that list.

In the interactive reports, we can create as many as 21 lists.

The first list is called ‘Basic list’ and all the successive lists are called ‘Secondary lists’. Each list is again an interactive.

The Basic list is not deleted when secondary list is created.

A secondary list may either overlay the basic list or appear in an additional dialog window on the same screen.

The system variable associated with list number is ‘SY-LSIND’.

For basic list SY-LSIND = 0 and for secondary lists, SY-LSIND varies from 1 to 20.

User can interact with the list by the following ways.

Double clicking or single click and pressing F2 (function key) or single click with ‘hotspot on’.

OR

Selecting from menu bar or from application tool bar.

All the events used in classical reports can be used in Basic List.

The event ‘End-of-page’ can be used in Secondary Lists also.(the other six events can not be used in secondary lists)

You can not place ‘select-options’ in secondary lists.

The following additional events are

applicable to secondary lists.

Top-of-page during line-selection.

At line-selection.

At user-command.

When you double click on any field in the basic list, you will be navigating to secondary list with detailed information pertaining to clicked field.

As such we need to store the clicked field information at some variable.

‘Hide’ temporarily stores the content of clicked field for later use.

The default title of the out put is the text what we enter during creation of program.

This title can be changed using:

SET TITLEBAR ‘AAA’.

GUI status includes:

Menu bar

Application tool bar and

Activating standard tool bar

GUI status can be created using

SET PF-STATUS ‘BBB’.

You can have 8 menus ( out of which, 2 menus are reserved for ‘System’ and ‘Help’).

Each menu can have 15 menu items.

Each menu item can have 3 levels of submenus.

You can create 35 items in application tool bar.

for example Code

REPORT zs_stockreport3

NO STANDARD PAGE HEADING

LINE-SIZE 255

MESSAGE-ID zz1.

************************************************************************

  • Table Declaration *

************************************************************************

TABLES: mara,

marc,

mard.

************************************************************************

  • Types Declaration *

************************************************************************

TYPES: BEGIN OF typ_mara,

matnr TYPE mara-matnr, "Material Number"

mbrsh TYPE mara-mbrsh, "Industrial Sector"

mtart TYPE mara-mtart, "Material Type"

meins TYPE mara-meins, "Base Unit of Measure"

END OF typ_mara.

TYPES: BEGIN OF typ_makt,

matnr TYPE makt-matnr, "Material Number"

maktx TYPE makt-maktx, "Material Description"

END OF typ_makt.

TYPES: BEGIN OF typ_marc,

matnr TYPE marc-matnr, "Material Number"

werks TYPE marc-werks, "Plant Number"

END OF typ_marc.

TYPES: BEGIN OF typ_mard,

matnr TYPE marc-matnr, "Material Number"

werks TYPE marc-werks, "Plant Number"

lgort TYPE mard-lgort, "Storage Location"

END OF typ_mard.

************************************************************************

  • Intrnal tables Declaration *

************************************************************************

DATA: it_mara TYPE STANDARD TABLE OF typ_mara WITH HEADER LINE.

DATA: it_makt TYPE STANDARD TABLE OF typ_makt WITH HEADER LINE.

DATA: it_marc TYPE STANDARD TABLE OF typ_marc WITH HEADER LINE.

DATA: it_mard TYPE STANDARD TABLE OF typ_mard WITH HEADER LINE.

************************************************************************

  • Variable Declaration *

************************************************************************

DATA: v_count TYPE i.

************************************************************************

  • Selection Screen *

************************************************************************

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_matnr FOR mara-matnr.

SELECTION-SCREEN : SKIP.

PARAMETERS : p_mtart LIKE mara-mtart.

SELECTION-SCREEN : END OF BLOCK b1.

************************************************************************

  • Start Events *

************************************************************************

************************************************************************

  • Initialization *

************************************************************************

INITIALIZATION.

***

PERFORM initial_input.

************************************************************************

  • At Selection-screen *

************************************************************************

AT SELECTION-SCREEN.

***

PERFORM validte_inputdata.

************************************************************************

  • Start of Selection *

************************************************************************

START-OF-SELECTION.

***

SELECT matnr

mbrsh

mtart

meins

INTO TABLE it_mara

FROM mara

WHERE matnr IN s_matnr and

mtart = p_mtart.

if sy-subrc = 0.

sort it_mara by matnr.

else.

MESSAGE e001 WITH 'No data Found' ' For the Given'

'Selection Criteria'(400).

endif.

IF NOT it_mara[] IS INITIAL.

SELECT matnr

maktx

INTO TABLE it_makt FROM makt

FOR ALL ENTRIES IN it_mara

WHERE matnr = it_mara-matnr

AND spras = sy-langu.

if sy-subrc = 0.

sort it_makt by matnr.

endif.

ENDIF.

IF NOT it_mara[] IS INITIAL.

select matnr

werks

from marc

into table it_marc

for all entries in it_mara

where matnr = it_mara-matnr.

if sy-subrc = 0.

sort it_marc by matnr werks.

endif.

endif.

IF NOT it_marc[] IS INITIAL.

select matnr

werks

lgort

from mard

into table it_mard

for all entries in it_marc

where matnr = it_marc-matnr and

werks = it_marc-werks.

if sy-subrc = 0.

sort it_mard by matnr werks lgort.

endif.

endif.

DATA: a TYPE i.

loop at it_mara.

a = sy-tabix MOD 2.

IF a = 1.

FORMAT COLOR 5.

ELSE.

FORMAT COLOR OFF.

ENDIF.

read table it_marc with key matnr = it_mara-matnr

binary search.

if sy-subrc = 0.

read table it_mard with key matnr = it_marc-matnr

werks = it_marc-werks

binary search.

if sy-subrc = 0.

read table it_makt with key matnr = it_mara-matnr

binary search.

if sy-subrc = 0.

WRITE:/ sy-vline.

WRITE: 2 it_mara-matnr,

18 sy-vline, it_mara-mbrsh,

38 sy-vline, it_mara-mtart,

54 sy-vline, it_mara-meins,

78 sy-vline, it_makt-maktx,

120 sy-vline, it_marc-werks,

135 sy-vline, it_mard-lgort, 155 sy-vline.

clear : it_mara.

endif.

clear : it_makt.

endif.

endif.

endloop.

WRITE: /(155) sy-uline.

************************************************************************

  • Top of Page *

************************************************************************

TOP-OF-PAGE.

***

FORMAT COLOR 1.

WRITE: /(155) sy-uline.

WRITE:/ sy-vline.

WRITE: 2 'Material Number',

18 sy-vline, 'Industrial Sector',

38 sy-vline, 'Material Type',

54 sy-vline, 'Base Unit of Measure',

78 sy-vline, 'Material Description',

120 sy-vline, 'Plant',

135 sy-vline, 'Storage Location',155 sy-vline.

WRITE: /(155) sy-uline.

FORMAT RESET.

************************************************************************

  • End of Page *

************************************************************************

&----


*& Form Initial_Input

&----


  • Initailization of Select Option

----


FORM initial_input .

CLEAR s_matnr.

REFRESH s_matnr.

s_matnr-low = '100-100'.

s_matnr-high = '111-111'.

s_matnr-sign = 'I'.

s_matnr-option = 'BT'.

APPEND s_matnr.

p_mtart = 'ROH'.

ENDFORM. " Initial_Input

&----


*& Form Validte_Inputdta

&----


  • Validation of Select Option

----


FORM validte_inputdata .

SELECT SINGLE * FROM mara

WHERE matnr IN s_matnr.

IF sy-subrc <> 0.

MESSAGE e001 WITH 'Material'(002) 'Type'(003) 'Does Not Exit'(400).

ENDIF.

ENDFORM. " Validte_Inputdta

************************************************************************

  • End of Selection *

************************************************************************

Regards

Sreenivasulu P