Classical Interactive Reports Events

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

CLASSICAL REPORTS A report with single input screen (selection screen) and single output screen (list screen)

is called a classical report. Events in Classical Reports: - All the ABAP programs are developed using events because ABAP is EVENT DRIVEN PROGRAMMING LANGUAGE i.e. the entire ABAP program execution is based on order of events. The List of the events is: Initialization At Selection-screen output At Selection-screen on field At Selection-screen Start of selection End of selection Top of page End of page Initialization: - This event is used to initialization the default values to program variables and selectionscreen variables. Examples: v_land1 = IN v_bukrs = 1001 p_werks = US p_mtart = FERT AT Selection-screen output: - This event is used to modify the selection screen dynamically based on user actions on the selection screen. This event is triggered (or) executed for every action on the selection screen. AT Selection-screen on field: - This event is used to validate a single input field on the selection-screen. AT Selection-screen: - This event is used to validate multiple fields of the selection-screen,whereas AT Selection-screen on field is used to validate a single input field. Start of selection: - This event is used to write the original business logic statements i.e all select statements. It is also used to indicate the starting point of a program.It is the default event. End of selection: - It is used to indicate the start of selection as been ended. It doesnt have any importance in ABAP. It is mainly used with logical database, which are absolute in ABAP (LDBs are used inold version of ABAP). But LDBs are stilled used in HR -ABAP, so end of selection is mainly used in HR-ABAP. Top of page: - This event is use to display constant page heading for all the pages of list screen. This event is triggered after the first WRITE statement. End of page: - This event is used to provide constant footer information across the all pages of the listscreen.To display end of page (or) footer information we have to reserve some lines as footer lines using the statement. REPORT ZCLASSICAL_REP1 NO STANDARD PAGE HEADING LINE-COUNT 26(3).

INTERACTIVE REPORT Display the basic information on the basic list and the detailed information in the Secondary list is called Interactive report. The first list is called basic list and the number is 0. The remaining lists are called as secondary lists and the number start from 1 to 20.So totally there are 21 lists. The lists no are stored in a system variable SY-LSIND. If you select any line, then the selected line data is stored in SY-LISEL. Interactive Reports Events:AT Line selection AT User command Top of page during line selection AT PF<Function Key>. AT Line Selection: - This event is triggered whenever the user double clicks on any list line.To know the selected line contents, we have two keywords or statements 1)HIDE 2)GET CURSOR At User command: - This event is triggered whenever the user clicks on custom GUI buttons. Top of page during line selection: - This event is used for providing the constant page heading for all the secondary lists. AT PF <Function Key>:- This event is used or triggered whenever the user clicks on function keys (f1, f2, .etc) This event is absolute in new versions (ECC 5.0 or 6.0) HIDE: - It is a keyword which is used to hide the data into a temporarily memory called as hide area. The hide statement must be used within loop.end loop. So that it will hide the value into hide area. Functionality of hide: - Whenever the user double clicks on any list line, the event at line selection will be triggered. The system automatically identifies the line no where the user has double clicked and reads the corresponding record into hide variable. Ex Program: Will be discussed separately. GET CURSOR: - This statement is used to read or get the selected line content i.e. fieldname, field value into the variables. Syntax: - GET CURSOR field <v_fname> Value <v_fvalue>. The main Advantage of get cursor is, We dont have any hide area or temporary memory We can generate interactive report based on field name and field value which is not possible with HIDE statement. The other difference between hide and get cursor is, with the hide statement the system uses line no and gets the value into hide variable without knowing what is the fieldname. Whereas the get cursor will get the exact field name and field value with which we can generate various interactive reports based on filed names. Ex Program: Will be discussed separately. AT user command: - This event is triggered whenever the user clicks on Custom GUI button. Custom GUI: - It is used to create our menus in the menu bar, our own buttons in the application toolbar, enabling or disabling the standard buttons on the standard toolbar. Syntax: - SET PF-status <CustomGUIMenuName> SE41is the tcode for creating custom GUI (also called as MENU PAINTER) FCT CODE (Function code):-It is a shortcut code assigned to a button or menu to identify the button or menu which is clicked. The FCT codes are automatically stored in a system variable SY-UCOMM.

You might also like