Вы находитесь на странице: 1из 10

1. What are different types of reports?

 Classical Reports
 Interactive Reports
 Logical Database Reports
 ABAP query
 ALV Reports (ALV stands for ABAP List Viewer)
 Report Writer/Report Painter

2. Classical Reports
These are the simplest reports. It is just an output of data using the Write statement inside a
loop.
Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING
ONLY ONE SCREEN/LIST FOR OUTPUT
3. Interactive Reports
As the name suggests, the user can Interact with the report. We can have a drill down into the
report data. For example, Column one of the report displays the material numbers, and the user
feels that he needs some more specific data about the vendor for that material, he can HIDE
that data under those material numbers.
And when the user clicks the material number, another report (actually sub report/secondary
list) which displays the vendor details will be displayed.
We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
4. Logical Database Reports
Logical database is another tool for ABAP reports. Using LDB we can provide extra features for
ABAP reports.
While using LDB there is no need for us to declare Parameters.
Selection-screen as they will be generated automatically.
We have to use the statement NODES in ABAP report.
5. ABAP Query Reports
ABAP query is another tool for ABAP. It provides efficiency for ABAP reports. These reports are
very accurate.
Transaction Code: SQ01
6. Report Writer / Report painter
Super users and end users can use Report Painter/Report Writer tools to write their own
reports.
Giving them the ability to report on additional fields at their discretion shifts the report
maintenance burden to them, saving SAP support groups time and effort normally spent
creating and maintaining the reports.
ALV reports
Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to
embellish the output of a report. This set of ALV functions is used to enhance the readability and
functionality of any report output. Cases arise in sap when the output of a report contains
columns extending more than 255 characters in length.
In such cases, this set of ALV functions can help choose selected columns and arrange the
different columns from a report output and also save different variants for report display. This is
a very efficient tool for dynamically sorting and arranging the columns from a report output.
The report output can contain up to 90 columns in the display with the wide array of display
options.
There is no difference between drill down and interactive report, they are the same.
With drilldown reporting, SAP provides you with an interactive information system to let you
evaluate the data collected in your application. This information system is capable of analyzing
all the data according to any of the characteristics that describe the data. You can also use any
key figures you wish to categorize your data. You can display a number of objects for a given key
figure, or a number of key figures for a given object. In addition, the system lets you carry out
any number of variance analyses (such as plan/actual comparisons, fiscal year comparisons,
comparisons of different objects, and so on).

7. What are the events of classical reports?


LOAD-OF-PROGRAM
INITIALISATION
AT SELECTION-SCREEN
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN ON <fieldname>
AT SELECTION-SCREEN ON VALUE EQUEST FOR <fieldname>
AT SELECTION-SCREEN ON HELP REQUEST FOR <fieldname>
START OF SELECTION
END OF SELECTION
TOP OF PAGE
END OF PAGE
Load-of-praogram
This event is used to load program into memory for execution and this is the first event in
execution sequence.
Initialization
This event is used to initialize variables, screen default values and other default actions.
At Selection-Screen output
By using this event we can manipulate dynamic selection-screen changes.
At Selection-Screen on field
This event is used to validate a single selection-screen input parameter.
At Selection-Screen on value request
This event is used to provide value help ( field help ) for a input field.
At Selection-Screen
This event is used to validate multiple input fields
At Selection-Screen on help request
By using this event we can provide F1 help for a input field.
Top-of-Page
This event prints constant heading for all pages.
End-of-Page
This event prints constant footer for all pages.
Before using this event, we need to reserve some lines for displaying footer.

What is LINE-COUNT ?
LINE-COUNT page_lines[(footer_lines)]

REPORT ZPROGRAM LINE-COUNT 27(3). " Here we reserve 3 lines for footer

In interactive reports in addition to the above mentioned EVENTS some more events are used .
Which is the event keywords used in interactive reporting?
A6: AT LINE-SELECTION-this is a time when we choose a line with a double-click on the line or by
moving the cursor over the line and hitting F2.
AT USER-COMMAND- this is a time when we hit a function key. TOP-OF-PAGE DURING LINE-
SELECTION-this is a time when, while the list is processing a secondary list, a new page is
starting.

Please note, in classical list if there is no data for your loop then the top of page and end of page
will also not be displayed. No screen will generate .

What is sy-lisel? It will fetch the data of the line that u selected
in hotspot of classical list.
Q1: What is the significance of a stacked list?
A1: The secondary list is also called the stacked list and it will be
shown on the entire screen if we don’t write its coordinates of the
command window.
Q2: When it’s the right time to utilize the command GET CURSOR in
interactive lists?
A2: The command GET CURSOR will be utilized when the hidden information
is not enough for tracing the selected line, this command will give us
the field name where the cursor is positioned in field that will be
specified subsequently to the addition field. The selected field value
will be in a field specified subsequently to the value.
Q3: How do we keep lists?
A3: The return from a high level in the list on the immediate lower
position (SY-LSIND) is made by using Back from the secondary list. In
this way the actual list that is displayed will disappear and we will
see the previously made list. The list that disappeared was released by
the system and deleted. The SY-LSIND field must be configured for
indicating the list level at which we want the output to be. Just the
index values that are the same with the levels of the list are accepted
by the system and the list levels that have a higher index than the one
we indicate or equal with it will be erased by the system. For instance
when we configure SY-LSIND to be 0, every secondary list will be erased
by the system and the basic list will be replaced by the actual
secondary list.
Q4: What is the meaning of secondary lists?
A4: With secondary lists, the details from the basic list can be
improved and if for instance, we want to choose a line from the basic
list and we want more details about it to be displayed we can do it.
The secondary information will be shown on the secondary list, which
can be as an overlay of the basic list or it can appear in a separate
window and this secondary list can be dynamical as well.
Q5: What is interactive reporting?
A5: With the use of interactive reporting we can be present in an
active mode at the data presentation in a session. Actually,
interactive reporting generates a simple list that encapsulates the
details, it can be extended and we can see the details with the aid of
the cursor or commands. Interactive reporting lowers the amount of
retrieved details to the real requirement of data.
Q6: Which are the event keywords used in interactive reporting?
A6: AT LINE-SELECTION-this is a time when we choose a line with a
double-click on the line or by moving the cursor over the line and
hitting F2.
AT USER-COMMAND- this is a time when we hit a function key. TOP-OF-PAGE
DURING LINE-SELECTION-this is a time when, while the list is processing
a secondary list, a new page is starting.
Q7: Is it possible to invoke transactions or reports from the
interactive reporting lists?
A7: Yes, it is possible because with interactive reporting we can as
well invoke transactions or different reports from the lists, in this
way the programs will use the values that are shown in the list as
their input information. As an example, a transaction can be invoked
from a list and the database table that shows its data in the list can
be modified.
Q8: How can we make user interfaces for a list?
A8: A graphical user interface or GUI is made automatically if we have
a list with simple functions regarding list processing like list
printing or saving, the GUI is made by the R/3 system. For more
complicated functions like pushbuttons for example, we have to define
our personal interface status and for making a new status we have the
Menu Painter from the Development Workbench. In this way we can
generate toolbars or menus for the program, we can also put shortcut
keys for various functions.When the statement block of
AT END_OF_SELECTION is started the status of the main list can be
enabled with the SET PF-STATUS “STATUS” statement.
Q9: What page headers do the secondary lists have?
A9: There is no standard page header regarding secondary lists and also
there is no event TOP-OF-PAGE triggered by the system, so for making
page headers for secondary lists we have to improve the TOP-OF-PAGE.
When we use TOP-OF-PAGE DURING LINE-SELECTION this event will be
invoked for every secondary list, when we want to make separate page
headers for each specific list level, the processing block
correspondent to this event has to be configured for this like for
instance when we use SY-LSIND(system field) and SY-PFKEY.
Q10: Which is the best way to choose valid lines for a secondary list?
A10: There are many ways for us to avoid the use of invalid lines
in ABAP/4 like the ones below. When the processing block END-OF-
SELECTION finishes we have to erase the field content that we deposited
in the past for valid lines with the aid of the HIDE statement. We must
verify if the work place is the default one or if the HIDE statement
deposited the content of the field in this place, this is done when the
AT LINE-SELECTION event occurs. We can make a secondary list because we
deposited the content of the field just for valid lines, we have to
clean the workplace one more time for avoiding the creation of other
secondary lists by the user starting from the secondary list on the
screen.
Q11: When we make a new list, is it true that the main list will be
erased?
A11: No way, the main list will not be erased and we can access it with
the aid of the standard navigation functions such as the back or cancel
buttons.
Q12: In what way should we transfer data from a list to a report?
A12: In ABAP/4 this can be made in 3 ways:
a) By fetching the data with the aid of statements.
b) By making an automated data transfer with the aid of the system
fields.
c) By transferring the attributes of the list.
Q13: What is the standard construction of an ABAP application?
A13: The basic construction of an ABAP program is made of these steps:
a) The Reports are defined.
b) The Data and tables are defined.
c) The events are initialized.
d) We have the Screen Select Options and Inputs.
e) The selection screen events.
f) The start of selection events.
g) Performs and Events Statements.
h) The End-of selection event
i) The Initialization.
Q14: What is the significance of hotspots?
A14: The list place that makes our mouse pointer looking like an
upright hand is called a hotspot, when a hotspot is active, single
clicking is equivalent to double-clicking. This feature is compatible
with versions 3.0c and above of SAP R/3.
Q15: What is the system field that has the name of the actual GUI
STATUS?
A15: The System field SY-PFKEY contains the actual GUI STATUS name.
Q16: What is the meaning of report transaction and how are
programscalled??
A16: The reports in ABAP can be called like transactions: for calling
and returning- SUBMIT AND RETURN CALL TRANSACTION, for calling and not
returning- SUBMIT LEAVE TO TRANSACTION. When we make an extensive
application and we make one program, it will be very complicated and
for reading the program in a simple way it is recommended to split the
functions needed among the programs.
Q17: What is the meaning of Form Event?
A17: Form Event is just like PERFORM/SUBROUTINES, it STARTS by FORM and
finishes by ENDFORM and the statements from ENDFORM to the finish of
the application are not processed at all, every statement from ENDFORM
to the event keyword will not be processed.
Q18: How do we describe START –OF-SELECTION and END-OF-SELECTION?
A18: The start and the finish of the main processing logic, which is
default for every ABAP/4 application; the statements from START-OF-
SELECTION to END-OF-SELECTION are executed automatically, there is no
requirement for having END-OF-SELECTION. Every procedural statement in
ABAP applications are dependent by default on the START-OF-SELECTION.
Q19: How do we transfer data by program statements?
A19: For transferring single output fields or supplementary details
from lines to the processing blocks in the time of interactive events
the following statements will be written: HIDE, READ LINE, GET CURSOR,
SET CURSOR and others.
Q20: What system fields do we use for interactive reporting?
A20: The index of the actual list is found in the system field SY-LSIND
, at the time of making the main list SY-LSIND is 0. The system fields
below are configured automatically by the system at every interactive
event: the system field information, SY-LINCT the whole line number of
a list, SY-LINNO the number of line where the cursor is found, SY-LSIND
is the index of the presently made list( in the time of the actual
event-0), SY-LISTI is the index of the level that invoked the event,
SYLILLI is the line number that invoked the event, SY-LISEL represents
the content of the line that invoked the event, SY-CUROW represents the
place in the window that the line which invoked the event has
(beginning from 1), SY-CUCOL is the place in the window where the
column that invoked the event is found (beginning from 2), SY-UCOMM
represents the function code which invoked the event, SY-PFKEY has the
actual list status.
Q21: How do we describe the HIDE AREA?
A21: With the aid of the HIDE command we can deploy the field content
from actual line in a place that is named the HIDE AREA. This place a
system controlled memory and the field content will be moved from the
HIDE AREA when the interactive event occurs. If we invoke a secondary
list from the HIDE AREA the values that were deposited will be moved in
the program variables. When we write the program we have to use the
HIDE statement in the present line after we use the WRITE statement.
Q22: What is the usage of GET CURSOR and SET CURSOR?
A22: GET CURSOR LINE and GET CURSOR FIELDare statements that we use to
transfer an output fieldand an output line where, in the time of the
interactive event the cursor was placed. Example of syntax: GET CUROSR
FIELD [OFFSET] [LINE] [VALUE] [LENGTH]. SET CURSORis a statement used
to set the cursor the latest list made which when we make a basic or
main list, the latest will be exactly this one: the basic list. The
basic list will become previous when we make a secondary list. The set
cursor statement also places the cursor on the column that is on the
output window’s line.
Q23: How do we get data from the system fields of interactive lists?
A23: The details that we get from the system fields are: the list
index, the coordinates of the list in the output window and the place
where the cursor is found. The system field which has the chosen line
contents is SY-LISEL only.
Q24: What is the role of the READ LINE and READ CURRENT LINE
statements?
A24: These statements are used for reading the current list level data
lines explicitly and they are linked together with the technique named
HIDE. The syntax looks like this: READ LINE [INDEX] [FIELD VALUE
[INTO]] [OF CURRENT PAGE | OF PAGE]. We can see this example: READ LINE
SY-INDEX FIELD VALUE BOX.
SECONDARY LISTS ( MAX 20)
Every user action on a displayed list, which triggers a list event for
which an event block is defined in the ABAP program, creates a new
details list. The list index of this details list is always one more
than the list index of the list on which the event was triggered. This
index is contained in the sy-listi system field. The output statements
of the event block write to the current details list. If the event
block is finished normally, the details list is displayed automatically
in the list dynpro.
User actions on displayed lists can cause a stack of up to 20 details
lists to be created in the list buffer. The list with the highest list
index (sy-lsind) is always the current list of the ABAP program, while
the list with the list index one below the highest (sy-listi) is
displayed on the screen. In certain list processing statements, the
list index can be used to access all lists within the stack for reading
or changing.
The details list stack in a list buffer can be reduced in two ways:
1. A user action on a displayed details list is linked to function code
"BACK". This function code causes the previous list to be displayed and
reduces the value of sy-lsind by 1. In the basic list, "BACK" causes
the current dynpro sequence to be exited.
2. Within an event block for a list event, a value is assigned to the
system field sy-lsind. If the value of sy-lsind after the event block
is closed is less than the list index of the current list and greater
than or equal to 0, then the current list replaces the list of this
list level and all lists whose list index is greater than the value of
sy-lsind are deleted from the list buffer. Other values of sy-lsind are
reset to the index of the current list after the event block is closed.
Structure of a List

A list is made up of list rows with a fixed width of up to 1023


characters. The row width of the current list is stored in the sy-linsz
system field. The number of rows of a list is limited only by the
storage capacity of the system.

A list is divided into pages. Every list starts on page 1. The current
page of the current list is stored in the sy-pagno system field. The
output position on the current page in the list buffer is determined by
the list cursor, which is provided in the system fields sy-colno
(column) and sy-linno (row). A page can contain a maximum of 60000
rows. The number of rows per page is stored for the current list in the
sy-linct system field. The value 0 represents the maximum number of
rows per page.

1. Question 29. What Is An Abap Memory And Sap Memory And How To Use Them?

Answer :

ABAP memory is a memory area that all ABAP programs within the same
internal session can access using the EXPORT and IMPORT statements.

SAP memory is a memory area to which all main sessions within a SAPgui
have access. You can use SAP memory either to pass data from one
program to another within a session, or to pass data from one session
to another. Application programs that use SAP memory must do so using
SPA/GPA parameters (also known as SET/GET parameters).

2. Question 30. When The Top-of-page Event Does Get Triggered?

Answer :

TOP-OF-PAGE event will be triggered when the first ULINE, WRITE or SKIP
statement occurs in a program.

3. Question 31. What Is The Difference Between Skip And Reserve?

Answer :

SKIP provides empty space between lines, while RESERVE executes a page
break on the current page if the number of lines between current line
and the page footer is less than the number specified in RESERVE
statement.

4. Question 32. What Is The Difference Between Skip And New-line?

Answer :

SKIP generates a blank line, while the NEW-LINE causes the control to
move to next line.
5. Question 33. Can We Set Page Headers To Details Lists?

Answer :

Yes. Use TOP-OF-PAGE DURING LINE-SELECTION.

What Is An Abap Memory And Sap Memory And How To Use Them?

Answer :

ABAP memory is a memory area that all ABAP programs within the same
internal session can access using the EXPORT and IMPORT statements.

SAP memory is a memory area to which all main sessions within a SAPgui
have access. You can use SAP memory either to pass data from one
program to another within a session, or to pass data from one session
to another. Application programs that use SAP memory must do so using
SPA/GPA parameters (also known as SET/GET parameters).

A SINGLE LINE CAN HAVE MAXIMUM OF 255 CHARACTERS IN CLASSICAL ABAP


LIST. This is default .

We can increase it by USING LINE-SIZE . MAX POSSIBLE IS 1023

Suppose I want to print more than 255 (SAY 300) , then use LINE-SIZE
300.

The following ABAP statements are used for creating classical lists:

WRITE

ULINE

FORMAT

SET BLANK LINES

SKIP

NEW-LINE

BACK

POSITION

SET LEFT SCROLL-BOUNDARY

NEW-PAGE
RESERVE

HIDE

SET MARGIN

PRINT-CONTROL

WRITE / |{ text WIDTH = 40 ALIGN = RIGHT }|.


WRITE / to_upper( text ).
WRITE / |{ 6 * 7 }|.
WRITE / `4` && `2`.
WRITE / cl_abap_codepage=>convert_to(
source = text
codepage = `UTF-8` ).

Вам также может понравиться