Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to ABAP Selection Screens. Slide 2 Screens (Types) There are three types of screens Selection screens get parameter input for reports List.

Similar presentations


Presentation on theme: "Introduction to ABAP Selection Screens. Slide 2 Screens (Types) There are three types of screens Selection screens get parameter input for reports List."— Presentation transcript:

1 Introduction to ABAP Selection Screens

2 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

3 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

4 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

5 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

6 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

7 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

8 Slide 8 PARAMETERS (First Example)

9 Slide 9 PARAMETERS (Customizing) Add a default value using the DEFAULT keyword PARAMETERS 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

10 Slide 10 PARAMETERS (CHECKBOX) To complete boolean parameters, use the CHECKBOX type

11 Slide 11 PARAMETERS (RADIO BUTTON) The PARAMETER type is RADIOBUTTON Make sure that each button belongs to the same group

12 Slide 12 PARAMETERS (Selection Ranges) You have seen selection ranges in many screens

13 Slide 13 PARAMETERS (Selection Ranges) Create an internal SELECTION table as follows:

14 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

15 Slide 15 PARAMETERS (Selection Ranges) (Value Options) Requires value to be between val1 and val2 SIGN contains the logical operand

16 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

17 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

18 Slide 18 Selection Texts (Illustration)

19 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,…

20 Slide 20 Selection Texts (Text Symbols) The selection text variable is named text-xxx where xxx is the number of the selection text

21 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

22 Slide 22 Table T100

23 Slide 23 Table T100 (Data)

24 Slide 24 Message (Creating) First, create the Message class Naming rules (Z) apply

25 Slide 25 Message (Creating) Then create the messages

26 Slide 26 Displaying the Message Call the MESSAGE function First character is e Followed by the message number Followed by the class you created

27 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


Download ppt "Introduction to ABAP Selection Screens. Slide 2 Screens (Types) There are three types of screens Selection screens get parameter input for reports List."

Similar presentations


Ads by Google