Google+ User Dialog Lists for SAP ABAP Lesson Seven - SAP ABAP

User Dialog Lists for SAP ABAP Lesson Seven

The main purpose of a list is to output data in a manner that can be easily understood by the user; this output often takes on the form of a table. Lists in R/3 take into account special business data requirements:

They are language-independent. Texts and headers appear in the logon language whenever the appropriate translation is available.
They can output monetary values in numerous currencies.
You can output list data in the following ways:
to the screen; here you can add colors and icons
to the printer
to the Internet/intranet: Automatic conversion to HTML
you can also save lists in the R/3 System or output them for processing by external commercial software applications like spreadsheet programs
The standard list interface offers the user several navigation features:

Each list can have a list header and up to four lines of column headers . There are two different ways to go about using these tools:

from within the Editor using the text element maintenance functions
from within the list itself. If you save your program, activate it and then run it to create the list, you can enter both list and column headers by choosing the menu path System -> List -> List headers.
The main advantage of using this method is that the list is still displayed on the screen. This makes it easier to position column headers.
The next time you start the program, the new headers will appear in the list automatically.
When no header text is entered, the program title is inserted in the header.
Titles and headers are part of a program's text elements. You can translate all text elements into other languages. The logon language setting on the logon screen detemines in which language text elements will be displayed.
Text symbols are another kind of text element. These are special text literal data objects. Compared to normal text literals, text symbols have the advantage that they can be translated into different languages without having to change a program's source code. Text symbols allow you to create lists independent of language.

You can write text symbols into your program in either of the following ways:
TEXT- (where xxx is a character string three characters long)
''() (where xxx is a character string three characters long)
In executable programs (type 1), lists are automatically displayed after their corresponding event blocks have been processed. These processing blocks must, however, contain a list creation statement. These are WRITE, SKIP, and ULINE.
Event blocks are called in a sequence designed for list processing:
Prior to sending the selection screen: INITIALIZATION
After leaving the selection screen: START-OF-SELECTION
All output from START-OF-SELECTION event blocks, subroutines, and function modules that is processed before a list is displayed is temporarily stored in the list buffer.
Once all list creation processing blocks (for example START-OF-SELECTION) have been processed, all data from the list buffer is output in the form of a list.
In executable programs, you can use the event block AT LINE-SELECTION to create detail lists.
The ABAP runtime system:

Displays the basic list after the appropriate event blocks have been processed (for example, after START-OF-SELECTION). In this case, system field sy-lsind contains the value 0.
Processes the event block AT LINE-SELECTION each time you double -click on an entry. If you are using a standard status, this happens automatically every time you choose the Choose icon, the Choose menu item in the Edit menu, or the function key F2.
Displays detail lists after the AT LINE-SELECTION event block has been processed and increases the value contained in sy-lsind by one.
Displays the detail list from the previous level in the list hierarchy (n-1) every time you choose the green arrow icon from the current detail list (n).
The lists in the example program should function as follows:
The basic list should display the text 'Basic List' and system field sy-lsind.
The user should be able to call the initial detail list using a double -click or by choosing its
corresponding icon from the application toolbar or its menu entry or by using the function key F2. Then the 'Detail list' appears and the system field sy-lsind has the value 1.
Repeating this action should call the second detail list, where system field sy-lsind contains the value 2 (representing the current detail list level).
Repeating this action increases the sy-lsind value by one every time up to a value of twenty (the total number of detail lists supported).
Choosing the green arrow takes the user back a single detail list level at a time until the basic
list is reached.
A detail list can be programmed as follows:
You create a basic list by filling the basic list buffer at an appropriate event block (here
Use the event block AT LINE-SELECTION when programming detail lists. Whenever you use WRITE, SKIP, or ULINE with this event block, you fill the detail list buffer for the next level (the detail list buffer with a level value one greater than the level on which the user
performed his or her action).
You can pre-determine navigation between detail lists by querying system field sy-lsind at the event block AT LINE-SELECTION.
We will now write a program using both basic lists and detail lists:

When the event AT LINE-SELECTION is processed, a program's data objects contain the same values as they did before the basic list display. A detail list, however, often needs data selected within the basic list itself. You can use the HIDE area to store certain data from the line that you have selected and then automatically insert where you need it in the corresponding data object for a detail list. You can predetermine which information should be classified by its line position when you are creating a basic list.

To do this, you use the ABAP keyword HIDE followed by a list of the data objects that you need. The runtime system automatically records the name and contents of the data object in relation to its line position in the list currently being created.
As soon as the interactive event (AT LINE-SELECTION in this example) is called by placing the cursor on a specific line and then either double -clicking or choosing the Choose icon, the values for this line stored in the HIDE area are inserted into their corresponding data objects.
You create a detail list by filling the detail list buffer at the AT LINE-SELECTION event block using either WRITE, SKIP, or ULINE. In this sample program, the key fields for the airline are displayed and the flights available for this airline in the database table SFLIGHT are read using a SELECT loop. Note that the line-specific information on the airline is only available by double - clicking in the data objects if the relevant data objects have been placed in the HIDE area when the basic list was created.




  1. nice work guys .....

  2. if you provide screen shots and block of code then its easy and interesting to learn .