Docsity

Selection Screens - Advanced Business Application Programming - Lecture Slides, Slides of Computer Programming

Partial preview of the text

Download Selection Screens - Advanced Business Application Programming - Lecture Slides and more Slides Computer Programming in PDF only on Docsity!

Introduction to ABAP

Selection Screens

Screens (Types)

 There are three types of screens  Classic dynpros are the transaction codes with which you are familiar  Selection screens get parameter input for reports  List outputs, which appear at the end of a report  All of these are components of programs

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

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

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 they are listed  Parameter types can be ABAP dictionary types too  Options to configure parameters are discussed in a moment docsity.com

PARAMETERS (First Example)

PARAMETERS (CHECKBOX)

 To complete boolean parameters, use the CHECKBOX type

PARAMETERS (RADIO

BUTTON)

 The PARAMETER type is RADIOBUTTON  Make sure that each button belongs to the same group

PARAMETERS (Selection

Ranges)

 Create an internal SELECTION table as follows:

PARAMETERS (Selection

Ranges) (Screen Options)

 OBILIGAOTRY make the option required  VISIBLE LENGTH defines the number of visible characters  NO-EXTENSION prohibits multiple selection

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

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

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

Selection Texts (Text

Symbols)

 The selection text variable is named text-xxx

where xxx is the number of the selection text