1Q: What are the event key words in interactive reporting?
Ans:
-
AT LINE-SELECTION
Moment at which the user selects a line by double-clicking on it or by positioning the cursor on it and pressing F2. -
AT USER-COMMAND
Moment at which the user presses a function key. -
TOP-OF-PAGE DURING LINE-SELECTION
Moment during list processing of a secondary list at which a new page starts.
2Q: What is secondary list?
Ans:
-
Secondary lists allow you to enhance the information presented in the basic list.
-
The user can, for example, select a line of the basic list for which they want to see more detailed information.
-
You display these details on a secondary list.
-
Either secondary lists may overlay the basic list completely or you can display them in an extra window on the screen.
-
The secondary lists can themselves be interactive again.
3Q: How to select valid lines for secondary list?
Ans:
-
To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities.
-
At the end of the processing block END-OF-SELECTION, delete the contents of one or more fields you previously stored for valid lines using the HIDE statement.
-
At the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field contents there.
-
In the latter case, create a secondary list, since you previously stored field contents for valid lines only.
-
After processing the secondary list, clear the work area again.
-
This prevents the user from trying to create further secondary lists from the secondary list displayed.
4Q: How to create user interfaces for lists?
Ans:
-
The R/3 system automatically generates a GUI for your lists that offers the basic functions for list processing, such as saving or printing the list.
-
If you want to include additional functionality, such as pushbuttons, you must define your own interface status.
-
To create a new status, the Development Workbench offers the Menu Painter.
-
With the Menu Painter, you can create menus and application toolbars.
-
You can assign function keys to certain functions.
-
At the beginning of the AT END-OF-SELECTION block, activate the status using:
SET PF-STATUS 'STATUS'.
5Q: Can we call reports and transactions from interactive reporting lists?
Ans:
-
YES, interactive reporting also allows you to call transactions or other reports from lists.
-
These programs then use values displayed in the list as input values.
-
The user can, for example, call a transaction from within a list to change the database table whose data is displayed.
6Q: How to maintain lists?
Ans:
-
To return from a high list level to the next-lower level (
SY-LSIND
), the user chooses Back on a secondary list. -
The system then releases the currently displayed list and activates the list created one step earlier.
-
The system deletes the contents of the released list.
-
To explicitly specify the list level into which you want to place output, set the SY-LSIND field.
-
The system accepts only index values which correspond to existing list levels.
-
It deletes all list levels whose index is greater or equal to the specified index.
-
Example: If you set
SY-LSIND = 0
, all secondary lists are deleted, and the current secondary list overwrites the basic list.
7Q: What are the page headers for secondary lists?
Ans:
-
On secondary lists, the system does not display a standard page header and it does not trigger the event TOP-OF-PAGE.
-
To create page headers for secondary lists, enhance TOP-OF-PAGE using:
TOP-OF-PAGE DURING LINE-SELECTION
-
This event is triggered for each secondary list.
-
Use system fields such as
SY-LSIND
orSY-PFKEY
for different headers using control statements likeIF
,CASE
.
8Q: What is meant by stacked list?
Ans:
-
Stacked list is another name for a secondary list.
-
It is displayed on a full-size screen unless coordinates are specified using the WINDOW command.
9Q: Is the basic list deleted when the new list is created?
Ans:
-
No. It is not deleted.
-
You can return to it using standard navigation functions like Back or Cancel.
10Q: What is meant by hotspots?
Ans:
-
Hotspot is a list area where the mouse pointer becomes an upright hand.
-
A single-click on a hotspot acts like a double-click.
-
Supported from R/3 release 3.0c.
11Q: In which system field does the name of current GUI status exist?
Ans:
-
The current GUI STATUS is stored in the system field:
SY-PFKEY
12Q: What is meant by hide area?
Ans:
-
The
HIDE
command stores field contents temporarily in the HIDE AREA. -
During interactive events, values are restored from the hide area.
-
Place the
HIDE
statement after theWRITE
statement for that line.
13Q: When is GET CURSOR used in interactive lists?
Ans:
-
When hidden info is insufficient to identify the selected line.
-
GET CURSOR
fetches the name and value of the field under the cursor.
14Q: How to pass data from list to report?
Ans:
ABAP provides 3 methods:
-
Automatically using system fields
-
Statements in the program to fetch data
-
Passing list attributes
15Q: How to call other programs?
Ans:
Report | Transaction |
---|---|
SUBMIT AND RETURN | CALL TRANSACTION |
SUBMIT | LEAVE TO TRANSACTION |
System Fields Used in Interactive Reporting:
Field | Description |
---|---|
SY-LSIND | Index of current list created (Basic list = 0) |
SY-LINCT | Total line count of a list |
SY-LINNO | Current line number |
SY-LISTI | List level index from which event was triggered |
SY-LILLI | Absolute line number from which event triggered |
SY-LISEL | Content of the selected line |
SY-CUROW | Cursor row position |
SY-CUCOL | Cursor column position |
SY-UCOMM | Function code triggering the event |
SY-PFKEY | GUI status of current list |
Interactive Techniques:
-
TOP-OF-PAGE DURING LINE-SELECTION:
Used for different page headers in secondary lists. -
HIDE:
Stores field content temporarily. Example:
HIDE: SPFLI-CARRID, SPFLI-CONNID, NUM.
-
READ LINE:
Reads content of a list line. Example:
READ LINE SY-INDEX FIELD VALUE BOX.
-
GET CURSOR:
Captures field or line from cursor position. Syntax:
GET CURSOR FIELD <field> VALUE <val>.
-
SET CURSOR:
Sets cursor in the current or previous list.
Typical Structure of ABAP Program:
-
Report Definitions *
-
Table and Data definitions *
-
Initialization event
-
Screen Select Options / Inputs *
-
Selection-screen event
-
Start-of-selection event
-
Performs and other Events *
-
End-of-selection event
-
Initialization
No comments:
Post a Comment