Scrol

SAP Trainings contact sap.sreeram@gmail.com or 091-9916083157, 001-210-399-8414

SAP ABAP General Reporting



What are reports? and how do you set up reports?
A report program reads and analyzes data from one or more database tables without modifying the database. Usually, the result of such a report program is in the form of a list which is output to the screen or sent to a printer.

What are the different types of programs?
I           Include Program
M         Module Pool
F          Function Modules
S          External Subroutines
1          Online program


Events in Reporting ? Explain ?

The following events occur at runtime of a typical report program which uses logical databases:

Event keyword                                        Event
--------------------------------------------------------------------------------------------------
INITIALIZATION                                                        Point before the selection screen
                                                                                    is displayed

When you start a program in which a selection screen is defined (either in the program itself or in the linked logical database program), the system normally processes this selection screen first. If you want to execute a processing block before the selection screen is processed, you can assign it to the event keyword INITIALIZATION.




AT SELECTION-SCREEN                                                   Point after processing user
input on the selection screen while the selection screen is still active

The event keyword AT SELECTION-SCREEN provides you with several possibilities to carry out processing blocks while the system is processing the selection screen.

START-OF-SELECTION                                          Point after processing the selection screen

The event START-OF-SELECTION gives you the possibility of creating a processing block after processing the selection screen and before accessing database tables using a logical database. You can use this processing block, for example, to set the values of internal fields or to write informational statements onto the output screen.

At the START-OF-SELECTION event, also all statements are processed that are not attached to an event keyword except those that are written behind a FORM-ENDFORM block

GET <table>                                                  Point at which the logical database
offers a line of the database table                  <table>.

The most important event for report programs with an attached logical database is the moment at which the logical database program has read a line from a database table (see Accessing Data Using Logical Databases ). To start a processing block at this event, use the GET statement as follows:

Syntax
GET <table> [FIELDS <list>].
After this statement, you can work with the current line of the database table <table>. The data is provided in the table work area <table>.


GET <table> LATE                                       Point after processing all tables which
are hierarchically subordinate to the database table <table> in the structure  of the logical database.

To start a processing block at the moment after the system has processed all database tables of a logical database that are hierarchically inferior to a specific database table, use the event keyword GET as follows:

Syntax
GET <table> LATE [FIELDS <list>].

In analogy to report programs that use only SELECT statements (see table in Comparison of Access Methods ), the processing block of a GET <table> LATE statement would appear directly before the ENDSELECT statement in the SELECT loop for the database table <table>.


END-OF-SELECTION                                   Point after processing all lines offered
by the logical database.

To define a processing block after the system has read and processed all database tables of a logical database, use the keyword END-OF-SELECTION.

The following events occur during the processing of the output list of a report program:
Event keyword                                                            Event
--------------------------------------------------------------------------------------------------

TOP-OF-PAGE                                              Point during list processing when
a new page is started
END-OF-PAGE                                              Point during list processing when a page
is ended

The following events occur during the display of the output list of a report program:
Event keyword                                                            Event
----------------------------------------------------------------------------------------------------

AT LINE-SELECTION                                  Point at which the user selects a line

AT USER-COMMAND                                  Point at which the user presses a
function key or enters a command in the       command field.

AT PF<nn>                                                    Point at which the user presses the
function key with the function code                PF<n>


With the selection screen, ABAP/4 offers an interactive element also for report programs. You can define a selection screen without having to bother about all the details required in dialog programming.
The selection screen is always processed directly after a report program is started. The user can enter field values and selection criteria on this screen.

The main purpose of the selection screen is to enable the user to control the database selections of the report program. If a report program is started from another ABAP/4 program with the SUBMIT statement (see Calling Reports), the selection screen objects also serve as a data interface,
With a selection screen defined in the report program, you can enable the user to

·           assign values to variables with the PARAMETERS statement
·           determine selection criteria with the SELECT-OPTIONS statement

How do you read selected lines of database table into an internal table in packages of predefined size.
·         SELECT * FROM  <SPFLI>  INTO TABLE  <ITAB>  PACKAGE SIZE <N>.
                                                                                    where   'n'   is  variable.

Name the WILDCARD characters which are used for comparisons with character strings & numeric strings.
·         '%'       and       '_'.


How to specify a client for database table processing.
    TABLES SPFLI.
SELECT * FROM SPFLI CLIENT SPECIFIED
         WHERE MANDT BETWEEN '001' AND '003'.
  ...
ENDSELECT.


Activation – During activation, the runtime object of aggregate object or tables is created. The runtime object is buffered so that the application program can access it quickly. Runtime object has information about the following objects of table

- domain – data elements – field definition – table definition


Lock Mechanism – prevents a new database operation being started an existing one has been correctly completed. When conversion is done, lock is created automatically and released only when conversion is successful.

Clearing of locks
·         restart adjustment – attempt is made to continue conversion at the point of termination 
Cancel adjustment – lock entry is simply deleted from table


Version  Management functions –

·         Canceling changes – reset revised version to active version
·         Storing changes – active version will be temporarily stored in version
Switching changes – switch between active and revised versions

Version catalog – list of all existing versions of an object

·         Revised version – produced when we edit an existing object
·         Active version – produced when we activate an object
·         Temporary version – produced when we copy the active version temporarily to the database with store version functions
·         Historical versions – created when 1. Correction is created 2 correction is 
      released


Table Buffering : Possible buffering types

·         full buffering – either, whole table or none of the table is located in the buffer (Tables up to 30 kb done in client dependent fully buffered tables)
·         Generic buffering – generic areas of the table are fully buffered.
·         Generic key – left justified section of primary key of a table.
·         generic area – all records for which fields of generic key correspond
·         Single record buffering – records actually being accessed are loaded to buffers,   large records where few records are accessed.