Introduction to ABAP Selection Screens
Slide 2
Screens (Types) There are three types of screens
Selection screens get parameter input for reports
List outputs, which appear at the end of a report
Classic ABAP Dynpros are the transaction codes with which you are familiar
All of these are components of programs We will talk about selection screens here
Slide 3
Selection Screens (Introduction) They can be housed in various types of
programs Executable programs, function groups,
and module pools Selection screens are triggered by
events Unlike VB, the order of selection screen
events is predefined by ABAP The order that they (event procedures)
appear in the program does not matter
Slide 4
ABAP Events (1) LOAD-OF-PROGRAM fires immediately
after the program loads It’s typically used to initialize global data In OOP terms, this is really a constructor
Slide 5
ABAP Events (2) INITIALIZATION fires after LOAD-OF-
PROGRAM but BEFORE selection screen processing Use this event to initialize input fields for
the selection screen
Slide 6
ABAP Events (3) AT SELECTION-SCREEN fires after the
user sees and fills out the selection screen Perform error checking here
START-OF-SELECTION fires and control passes back to the ABAP process This event is implicit if no events are listed So your previous programs have belonged
to START-OF-SELECTION
Slide 7
Creating Selection Screen Parameters Instead of using the DATA statement use
the PARAMETERS statement The syntax is the same as the DATA
statement but parameter names (variables) are limited to 8 characters in length
Each parameter is displayed on the selection screen in the order it is listed
Parameter types can be ABAP dictionary types too
Slide 8
PARAMETERS (First Example)
Slide 9
PARAMETERS (Customizing) Add a default value using the DEFAULT
keywordPARAMETERS INPUT TYPE i DEFAULT 10 Mark a field as required using the OBILGATORY keyword
Use VALUE CHECK to verify that the values are in the valid list for the data type
Slide 10
PARAMETERS (CHECKBOX) To complete boolean parameters, use
the CHECKBOX type
Slide 11
PARAMETERS (RADIO BUTTON) The PARAMETER type is RADIOBUTTON Make sure that each button belongs to
the same group
Slide 12
PARAMETERS (Selection Ranges) You have seen selection ranges in many
screens
Slide 13
PARAMETERS (Selection Ranges) Create an internal SELECTION table as
follows:
Slide 14
PARAMETERS (Selection Ranges) (Screen Options) OBILIGAOTRY make the option required VISIBLE LENGTH defines the number of
visible characters NO-EXTENSION prohibits multiple
selection
Slide 15
PARAMETERS (Selection Ranges) (Value Options)
Requires value to be between val1 and val2
SIGN contains the logical operand
Slide 16
Selection Texts (1) Selection texts are more than just
textual prompts They provide a language independent
way of displaying text Note that the program must be
activated for this to all work correctly
Slide 17
Selection Texts (2) There are three types of text elements
List Headings are used to build list headers
Selection Texts appear in selection screens in place of parameter names and selection tables
Text Symbols replace hard-coded literal values
Slide 18
Selection Texts (Illustration)
Slide 19
Selection Texts (Text Symbols) Here you can avoid using literal values
and replace them with text symbols As usual, there is a bit of SAP magic
here Symbols are numbered 001, 002, 003,…
Slide 20
Selection Texts (Text Symbols) The selection text variable is named
text-xxx where xxx is the number of the selection text
Slide 21
Messages Unlike text elements, messages are not
part of the report Instead, they are stored in a system
table T100 is the table name
Message can be between 1 and 72 characters
Messages must be activated too Use transaction code SE91 to create
Slide 22
Table T100
Slide 23
Table T100 (Data)
Slide 24
Message (Creating) First, create the Message class
Naming rules (Z) apply
Slide 25
Message (Creating) Then create the messages
Slide 26
Displaying the Message Call the MESSAGE function
First character is e Followed by the message number Followed by the class you created
Slide 27
Selection Screen Layout You have limited layout capabilities for
selection screens You can position line elements You cannot do much with fonts and
typefaces
Top Related