Top 30 Sap Abap Report Developer Interview Questions You Must Prepare 02.Mar.2024

  • 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 list, you must enhance TOP-OF-PAGE: Syntax TOP-OF-PAGE DURING LINE-SELECTION.  
  • The system triggers this event for each secondary list.  If you want to create different page headers for different list levels, you must program the processing block of this event accordingly, for example by using system fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).

Yes.  You can create a GUI STATUS in a program using SET PF-STATUS.

Yes, we can display a list in a pop-up screen using the command WINDOW with the additions starting at X1 Y1 and ending at X2 Y2 to set the upper-left and the lower-right corners where x1 y1 and x2 y2 are the coordinates.

It helps you to create easy-to-read lists.  You can display an overview list first that contains general information and provide the user with the possibility of choosing detailed information that you display on further lists.

  • From within the program, you can use the SY-UCOMM system field to access the function code.  You can define individual interfaces for your report and assign them in the report to any list level.  
  • If you do not specify self-defined interfaces in the report but use at least one of the three interactive event keywords.  AT LINE-SELECTION, AT PF, OR AT USER-COMMAND in the program, the system automatically uses appropriate predefined standard interfaces.  These standard interfaces provide the same functions as the standard list described under the standard list.

  • Scrolling through Interactive Lists.
  • Setting the Cursor from within the Program.
  • Modifying List Lines.

Each program can produce up to 21 lists: one basic list and 20 secondary lists.  If the user creates a list on the next level (that is, SY-LSIND increases), the system stores the previous list and displays the new one.  Only one list is active, and that is always the most recently created list.

The hide command temporarily stores the contents of the field at the current line in a system-controlled memory called the HIDE AREA.  At an interactive event, the contents of the field are restored from the HIDE AREA.

The user can actively control data retrieval and display during the session.  Instead of an extensive and detailed list, you create a basic list with condensed information from which the user can switch to detailed displays by positioning the cursor and entering commands.  The detailed information appears in secondary lists.

  • If the hidden information is not sufficient to uniquely identify the selected line, the command GET CURSOR is used.  
  • The GET CURSOR command returns the name of the field at the cursor position in a field specified after the addition field, and the value of the selected field in a field specified after value.

  • ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-COMMAND (pressing a button). 
  • You can use these events to move through layers of information about individual items in a list.

  • It allows you to enhance the information presented in the basic list.  The user can, for example, select a line of the basic list for which he wants to see more detailed information.  
  • You display these details on a secondary list.  Secondary lists may either 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.

  • You can display tabular lists with horizontal and vertical lines (FRAMES) using the ULINE command and the system field SY-VLINE.  
  • The corners arising at the intersection of horizontal and vertical lines are automatically drawn by the system.

The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.

  • For displaying the details on secondary lists requires that you have previously stored the contents of the selected line from within the program.  
  • To do this, ABAP/4 provides the HIDE statement.  This statement stores the current field contents for the current list line.  
  • When calling a secondary list from a list line for which the HIDE fields are stored, the system fills the stored values back into the variables in the program. 
  • In the program code, insert the HIDE statement directly after the WRITE statement for the current line.  
  • Interactive lists provide the user with the so-called ‘INTERACTIVE REPORTING’ facility.  For background processing the only possible method of picking the relevant data is through ‘NON INTERACTIVE REPORT’.  
  • After starting a background job, there is no way of influencing the program.  But whereas for dialog sessions there are no such restrictions.

The name of the current GUI STATUS is available in the system field SY-PFKEY.

  • If you want the user to communicate with the system during list display, the list must be interactive.  You can define specific interactive possibilities in the status of the list’s user interface (GUI).  
  • To define the statuses of interfaces in the R/3 system, use the Menu Painter tool.  In the Menu Painter, assign function codes to certain interactive functions.  After an user action occurs on the completed interface, the ABAP/4 processor checks the function code and, if valid, triggers the corresponding event.

ABAP/4 provides three ways of passing data:

  • Passing data automatically using system fields.
  • Using statements in the program to fetch data.
  • Passing list attributes.

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

  • 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 then deletes all existing list levels whose index is greater or equal to the index specify.  For example, if you set SY-LSIND to 0, the system deletes all secondary lists and overwrites the basic list with the current secondary list.

SY-LSIND: Index of the list created during the current event (basic list = 0)

SY-LIST1:  Index of the list level from which the event was triggered.

SY-LILL1:  Absolute number of the line from which the event was triggered.

SY-LISEL:  Contents of the line from which the event was triggered.

SY-CUROW: Position of the line in the window from which the event was triggered   (counting starts with 1)

SY-CUCOL: Position of the column in the window from which the event was triggered             (counting starts with 2).

SY-CPAGE: Page number of the first displayed page of the list from which the event was triggered.

SY-STARO: Number of the first line of the first page displayed of the list from which the event was triggered (counting starts with 1).  Possibly, a page header occupies this line.

SY-STACO: Number of the first column displayed in the list from which the event was triggered (counting starts with 1).

SY-UCOMM: Function code that triggered the event.

SY-PFKEY: Status of the displayed list.

  • ABAP/4  allows you to react to incorrect or doubtful user input by displaying messages that influence the program flow depending on how serious the error was. 
  • Handling messages is mainly a topic of dialog programming.  You store and maintain messages in Table T100.  Messages are sorted by language, by a two-character ID, and by a three-digit number.  
  • You can assign different message types to each message you output.  The influence of a message on the program flow depends on the message type.  In our program, use the MESSAGE statement to output messages statically or dynamically and to determine the message type.

Syntax: REPORT <rep> MESSAGE-ID <id>.

The AT USER-COMMAND event serves mainly to handle own function codes.  In this case, you should create an individual interface with the Menu Painter and define such function codes.

A stacked list is nothing but secondary list and is displayed on a full-size screen unless you have specified its coordinates using the window command.

Each menu function, push button, or function key has an associated function code of length FOUR (for example, FREE), which is available in the system field SYUCOMM after the user action.

A Hotspot is a list area where the mouse pointer appears as an upright hand symbol. When a user points to that area (and the hand cursor is active), a single click does the same thing as a double-click.  Hotspots are supported from R/3 release 3.0c.

A message can have five different types.  These message types have the following effects during list processing:

.A (=Abend)

.E (=Error) or W (=Warning)

.I (=Information)

.S (=Success)

  • The R/3 system automatically, generates a graphical user interface (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 push buttons, 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 tool bars.  And you can assign Function Keys to certain functions.  At the beginning of the statement block of AT END-OF-SELECTION, active the status of the basic list using the statement: SET PF-STATUS ‘STATUS’.

  • Yes.  It 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 of change the database table whose data is displayed in the list.

No.  It is not deleted and you can return back to it using one of the standard navigation functions like clicking on the back button or the cancel button.