Selection-screen programming
selection screen in sap abap |
Selection-screen is used for reading the user
input. As part of selection-screen we can design following selection screen
elements:
a.
Labels
b.
Input fields
c.
Push buttons
d.
Check boxes
e.
Radio buttons
f.
Blocks
g.
Tabbed blocks
h.
List box
Syntax for selection-screen Blocks:
Selection-screen begin of block <block
name> [with frame title <title variable>.
Selection-screen elements.
Selection-screen end of block<block name>.
Syntax for labels (comment):
Selection-screen
comment <start position>(<width>) <label variable>.
Syntax for pushbuttons:
Selection-screen push button <start
position> <width> <button variable> user-command <function
code>.
Event Handling in Selection Screen:
As part
of ABAP programming language, there are many events provided by SAP which are triggered at
different places. These events can be handled to provide dynamic features to
the applications; these events are raised by SAP itself.
As part of selection-screen also, the following
are the events:-
1.
Initialization.
2.
At selection-screen output.
3.
At selection-screen on field.
4.
At selection-screen.
5.
At selection-screen on
value-request.
6.
At selection-screen on
help-request.
7.
At selection-screen on radio
button group
Initialization:
This is
the first event triggered/raised whenever a selection-screen is displayed. This
event is triggered only once in the life time of a selection-screen.
This
event can be handled to initialize the selection-screen fields.
At selection-screen output:
This event is triggered in the following two
cases:
Case 1:
Whenever the selection screen is displayed for the first time (triggers after
the initialization event)
Case 2:
It is also triggered after the at selection-screen event.
This event can be handled to refresh the
selection-screen elements dynamically. i.e screen refreshing logic should be
implemented as part of this event.
At selection-screen on field:
This event is triggered whenever the user press
enter key in the input field.
This event can be handled to validate the field.
At selection-screen:
This event is triggered when the user performs
the following actions on the selection screen field.
a.
Clicking a push button.
b.
Pressing enter key in the input
field.
c.
Selecting a value in the drop
down.
d.
On selection / deselection of a
checkbox
At selection-screen on value request:
This event is triggered when the user presses
“F4” Key in a selection screen input field.
This event can be handled to provide “custom F4 “
Help for a selection screen input field.
As part of this event handling, we need to call the function module ‘F4IF_INT_TABLE_VALUE_REQUEST’
to populate custom F4 values.
At selection-screen on help request:
This event is triggered when the user press “F1”
key on a selection screen field.
This event can be handled to provide “custom f1
help” for the selection screen field.
At selection-screen on radio button group:
This
event is triggered whenever the user selects a radio button in the radio button
group of a selection screen. In this case, the function code of the radio
button group is captured in the system field ‘SY-UCOMM’ and the radio button
value is set to ‘X’.
**Some important notes about selection screen:
What is Screen:
Screen
is a dictionary structure provided by SAP. This structure acts as an internal
table during the execution of executable or module pool programs.
This
internal table contains information of screen-elements.
The
information includes the name of the field,
“visible or invisible”, “enable”/”disable”, “optional/mandatory’.
By
looping the screen internal table, we can control the behavior or appearance of
screen display.
Grouping screen elements:
Whenever
we need to assign common properties for multiple screen elements, then we can
group them into a screen group and they compare with this group as part of
looping the screen internal table. In case of selection-screen elements, we use
the addition ‘MODIF ID’ as part of parameters statements to provide the screen
group name.
Note:- If anybody want some example of these all topic then kindly send/comment your mail id, i will send the all examples through mail in word format.
**Kindly like and share these all topic with your friends**
0 Comments