Professional Documents
Culture Documents
Objectives
2 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
Titlebar Menubar
Application Standard
Toolbar Toolbar
3 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
Menu Painter
Menu Painter
4 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
GUI Status
The GUI Status (Graphical User Interface Status)
5 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
GUI Title
The GUI Title (Graphical User Interface Title)
6 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
ABAP Code
START-OF-SELECTION.
SET PF-STATUS ‘TEST1’. SELECT *
SELECT * FROM LFA1 INTO WA_LFA1.
WRITE: / WA_LFA1-LIFNR, 30 WA_ LFA1-NAME1.
ENDSELECT.
AT USER-COMMAND.
CASE SY-UCOMM. CHECK
WHEN ‘RUNX’. SY-SUBRC
SET PF-STATUS ‘TEST2’.
SET TITLEBAR ‘TB2’.
WHEN ‘RUNY’.
....
ENDCASE.
7 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
1st. The user clicks on a button that the programmer created on the
GUI Status.
2nd. The system detects that ‘RUNY’ has been assigned as the function
code behind this button.
3rd. Behind the scenes, the ABAP processor reacts and triggers the AT
USER-COMMAND event.
8 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
A New
ABAP
Event
SYNTAX: AT USER-COMMAND.
9 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
A New
ABAP
System Field
10 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
WHEN ‘RUNY’.
WRITE: / ‘The user just pressed button Y’.
ENDCASE.
11 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
This is what our first interactive report, that utilises a GUI status, will look like.
12 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
Demonstration
13 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
Practice
14 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
Summary
15 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation
IBM Global Services
Questions
16 The AT USER-COMMAND Event and Menu Painter | Dec-2008 © 2005 IBM Corporation