Tuesday, July 15, 2025

📘 FAQs in Interactive Reports – SAP ABAP

 

1Q: What are the event key words in interactive reporting?

Ans:

  1. 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.

  2. AT USER-COMMAND
    Moment at which the user presses a function key.

  3. 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 or SY-PFKEY for different headers using control statements like IF, 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 the WRITE 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:

  1. Automatically using system fields

  2. Statements in the program to fetch data

  3. Passing list attributes


15Q: How to call other programs?

Ans:

ReportTransaction
SUBMIT AND RETURNCALL TRANSACTION
SUBMITLEAVE TO TRANSACTION

System Fields Used in Interactive Reporting:

FieldDescription
SY-LSINDIndex of current list created (Basic list = 0)
SY-LINCTTotal line count of a list
SY-LINNOCurrent line number
SY-LISTIList level index from which event was triggered
SY-LILLIAbsolute line number from which event triggered
SY-LISELContent of the selected line
SY-CUROWCursor row position
SY-CUCOLCursor column position
SY-UCOMMFunction code triggering the event
SY-PFKEYGUI 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:

  1. Report Definitions *

  2. Table and Data definitions *

  3. Initialization event

  4. Screen Select Options / Inputs *

  5. Selection-screen event

  6. Start-of-selection event

  7. Performs and other Events *

  8. End-of-selection event

  9. Initialization

No comments:

Post a Comment