Register Login

System Fields & Interactive Reports

What is System Fields & Interactive Reports?

Interactive reporting

  • What are interactive lists
  • Basic & secondary lists
  • The HIDE statement
  • Event control
  • At line-selection
  • SY-LSIND
  • AT pf
  • At user-command
  • System fields for secondary lists

Non-interactive Reporting

Non-interactive-Reporting

Interactive Reporting

Interactive-Reporting

Non-interactive Vs. Interactive Lists

  • Non-interactive
    • Static structure
    • Single, extensive and detailed list
      • User searches through the list to find the relevant parts
  • Interactive
    • User selectively retrieves and presents data
      • Select lines, enter commands from menus, function keys or pushbuttons, type input
    • Detailed information presented in secondary lists
    • Ability to call transactions or other reports

Interactive Reports Are Event Driven

Interactive-Reports-Are-Event-Driven

The Basic List

  • Output of the data created while processing either
    • Start-of-selection
    • GET <dbtable>
  • By default a basic list has a standard page header
    • If TOP-OF-PAGE / END-OF-PAGE event occurs
      • System writes data to page header / page footer and then displays basic list data on the output screen
  • System field SY-LSIND = 0

Secondary Lists

  • Basic list + up to 20 secondary lists can exist in parallel
  • On moving to (next) secondary list
    • Current list added to memory area
    • SY-LSIND incremented by one
  • Using back Back or exit 
    • Logically superior list is displayed again
    • SY-LSIND decremented by one
  • No standard heading for secondary lists

REPORT-ZSAPTEST

Page Headers for Secondary Lists

  • On secondary lists
    • System does not display a standard page header
    • Does not trigger the TOP-OF-PAGE event
  • Top-of-page during line-selection
    • Triggered for each secondary list
    • To create different page headers for each secondary list you must program a processing block for each value of SY-LSIND

The HIDE Statement

HIDE <f>

stores the contents of in relation to the current output line in the HIDE area not necessary for to appear on current line place the HIDE statement immediately after the output statement for user selection of a line for which HIDE fields are available fills the variables in the program with the values stored.

Valid Line Selection

Valid-Line-Selection

REPORT-ZSAPTEST-1

AT Events Processing

  • At line-selection
    • Processed when user double clicks on a valid line
  • At user-command
    • Processed when user
      • Presses a function key in the list
      • Makes an entry in the command field
    • Function code stored in system field SY-UCOMM
  • AT pf<nn>
    • Processed when user presses a function key with code pf (in the range 0 to 99)

AT LINE-SELECTION

Determine what action to take by checking the current list level in the report code the appropriate action

AT LINE-SELECTION.

CASE SY-LSIND.
WHEN ‘1’.
Select * from Sflight
Where Carrid …
WHEN ‘2’.
Select * from Sbook
Where…
ENDCASE.

AT USER-COMMAND

Determine what action to take by checking the current function code value stored in SY-UCOMM code the appropriate action

AT USER-COMMAND.

CASE SY-UCOMM.
WHEN ‘SORT’.
Perform Sort_List.
WHEN ‘DELE’.
Perform Del_Record.
ENDCASE.

System Fields & Interactive Reports

  • SY-CUROW
    • Cursor position (line)
  • SY-CUCOL
    • Cursor position (column)
  • SY-CPAGE
    • Number of current page
  • SY-LSIND
    • Index of the displayed list level
  • SY-LISEL
    • Contents of the selected line

 

Overview of User Messages

Overview of User Messages

Classification of Dialog Messages

Example of Dialog Message

REPORT RSAAA11B MESSAGE-ID AT.

TABLES SPFLI

PARAMETERS : P_CARRID LIKE SPFLI-CARRID.

AT SELECTION-SCREEN.

AUTHORITY-CHECK OBJECT ‘S_CARRID’

ID ‘CARRID’ FIELD P_CARRID

ID ‘ACTVT’ FIELD ‘03’.

IF SY-SUBRC NE 0.

MESSAGE E045 WITH P_CARRID.

ENDIF.

START-OF-SELECTION.

SELECT * FROM SPFLI WHERE CARRID = P_CARRID.

- - - .

ENDSELECT.

 

Summary

  • You can use the interactive reporting functionality to provide the user with additional clearly structured information in secondary lists or windows.
  • To generate secondary lists or windows, various special events are available that can be triggered by activating a function key or via mouse click.
  • Besides the basic list, up to twenty secondary lists may exist. The system field SY-LSIND contains the index of the list that is being generated by the report.
  • To save data for the secondary list, use the statement HIDE. The system stores field names and field contents per line. When an interactive event is triggered, the values stored in the HIDE area are placed back into original fields.
  • Page headings for secondary lists are defined in connection with the event TOP-OF-PAGE DURING LINE-SELECTION.

 

Conclusion

  • Interactive reporting
    • Non-static view of data for the user
      • User selectively retrieves and displays data
      • Additional clearly structured information can be presented to the user in secondary lists or windows
      • Up to 20 secondary lists may exist
    • Secondary lists generated by special events
      • AT LINE-SELECTION, AT USER-COMMAND, AT pf<nn>
      • SY-LSIND contains index of current list level
  • Interactive lists
    • To save data for the secondary list use HIDE
      • System stores field names and field contents per line (SY-LISEL)
      • At an interactive event the values stored in HIDE area are placed back into the original fields
    • Generally better performance through interactive lists
      • Only lines relevant to the user are selected and displayed as they are required


 Download attached file.

You must be Logged in to download this file