SAP---ABAP

Saturday, November 24, 2007


>>>PREVIOUS>>>


Question Database


Q) What are Reports and how do you setup Reports?

A report program reads and analyzes data from one or more database tables without modifying database. Usually, the result of such a program is in the form of list which is output to the screen or sent to a printer.


Q) What are the different types of programs?

I Include Program
M Module Pool

F Function Modules
S External Subroutines

1 On line program

Q) What are the events in report programming Explain?

The following events occur at runtime of a typical report program which uses logical databases. 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 logical database program), the system normally processes the selection screen first. If you want to execute a processing block before the selection screen is processed, you can assign it to the 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 the 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. 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 inferior to a specific data base table, use the event keyword GET as follows

GET ..table.. LATE [FIELDS ..list..]

In analogy to report programs that use only SELECT statements, 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 the lines offered by a 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.


>>NEXT>>

No comments: